Merge pull request #6332 from Rob--W/postMessage-error
Serialize errors before invoking postMessage
This commit is contained in:
		
						commit
						ede5235d3d
					
				@ -1504,6 +1504,10 @@ function MessageHandler(name, comObj) {
 | 
			
		||||
            data: result
 | 
			
		||||
          });
 | 
			
		||||
        }, function (reason) {
 | 
			
		||||
          if (reason instanceof Error) {
 | 
			
		||||
            // Serialize error to avoid "DataCloneError"
 | 
			
		||||
            reason = reason + '';
 | 
			
		||||
          }
 | 
			
		||||
          comObj.postMessage({
 | 
			
		||||
            isReply: true,
 | 
			
		||||
            callbackId: data.callbackId,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user