Skip to content

docs: errors in isolated world are not dispatched to foreign worlds - #23653

Merged
jkleinsc merged 1 commit into
masterfrom
doc-isolated-world-no-error
May 21, 2020
Merged

jkleinsc merged 1 commit into
masterfrom
doc-isolated-world-no-error

Conversation

@zcbenz

@zcbenz zcbenz commented May 19, 2020

Copy link
Copy Markdown
Contributor

Description of Change

Close #22490.

Chromium does not dispatch errors of isolated worlds to foreign worlds, so the promise returned by webFrame.executeJavaScriptInIsolatedWorld will not reject when execution fails.

https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/frame/pausable_script_executor.cc;l=62-72

    // Note: An error event in an isolated world will never be dispatched to
    // a foreign world.

It is possible to make the errors pass through worlds by patching Chromium, but it is risky and has few benefits, so I think we should just document the behavior.

Release Notes

Notes: none

@electron-cation electron-cation Bot added the new-pr 🌱 PR opened recently label May 19, 2020
@electron-cation electron-cation Bot removed the new-pr 🌱 PR opened recently label May 20, 2020
@jkleinsc

Copy link
Copy Markdown
Member

Merging as CI failures are unrelated to doc change.

@jkleinsc
jkleinsc merged commit ce77e33 into master May 21, 2020
@jkleinsc
jkleinsc deleted the doc-isolated-world-no-error branch May 21, 2020 15:56
@trop

trop Bot commented May 21, 2020

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "8-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot removed the target/8-x-y label May 21, 2020
@trop

trop Bot commented May 21, 2020

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "7-3-x" cleanly;
you will need to perform this backport manually.

@trop

trop Bot commented May 21, 2020

Copy link
Copy Markdown
Contributor

I have automatically backported this PR to "9-x-y", please check out #23706

@trop

trop Bot commented Jun 8, 2020

Copy link
Copy Markdown
Contributor

@ckerr has manually backported this PR to "8-x-y", please check out #24016

@trop

trop Bot commented Jun 8, 2020

Copy link
Copy Markdown
Contributor

@ckerr has manually backported this PR to "7-3-x", please check out #24018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebFrame#executeJavascriptInIsolatedWorld is not rejecting on error

4 participants