feat: contextBridge.executeInMainWorld (#45330)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
This commit is contained in:
parent
9d696ceffe
commit
fa03b92f7e
8 changed files with 528 additions and 130 deletions
|
@ -150,13 +150,11 @@ class ScriptExecutionCallback {
|
|||
"An unknown exception occurred while getting the result of the script";
|
||||
{
|
||||
v8::TryCatch try_catch(isolate);
|
||||
context_bridge::ObjectCache object_cache;
|
||||
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);
|
||||
maybe_result = PassValueToOtherContext(
|
||||
source_context, promise_.GetContext(), result,
|
||||
source_context->Global(), false, BridgeErrorTarget::kSource);
|
||||
if (maybe_result.IsEmpty() || try_catch.HasCaught()) {
|
||||
success = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue