fix: correctly track receiver for methods called via ctx bridge (#39978)
* fix: correctly track receiver for methods called via ctx bridge * spec: test for correct contextBridge passage --------- Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
		
					parent
					
						
							
								5b105f911f
							
						
					
				
			
			
				commit
				
					
						fd2861117e
					
				
			
		
					 5 changed files with 90 additions and 47 deletions
				
			
		|  | @ -140,9 +140,12 @@ class ScriptExecutionCallback { | |||
|     { | ||||
|       v8::TryCatch try_catch(isolate); | ||||
|       context_bridge::ObjectCache object_cache; | ||||
|       maybe_result = PassValueToOtherContext( | ||||
|           result->GetCreationContextChecked(), promise_.GetContext(), result, | ||||
|           &object_cache, false, 0, BridgeErrorTarget::kSource); | ||||
|       v8::Local<v8::Context> source_context = | ||||
|           result->GetCreationContextChecked(); | ||||
|       maybe_result = | ||||
|           PassValueToOtherContext(source_context, promise_.GetContext(), result, | ||||
|                                   source_context->Global(), &object_cache, | ||||
|                                   false, 0, BridgeErrorTarget::kSource); | ||||
|       if (maybe_result.IsEmpty() || try_catch.HasCaught()) { | ||||
|         success = false; | ||||
|       } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Samuel Attard
				Samuel Attard