-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mark scripts as shareable cross-origin #25380
Conversation
To clarify, I'm not 100% sure this is the right approach (perhaps Electron should somehow be injecting a correct origin for these scripts?) but it does fix the issue and I'm not aware of the context for deciding to mark scripts as non-cross-origin-shareable in node (if any—it seems not relevant to most non-Electron node.js use cases) |
c3cf16c
to
9a21126
Compare
Ping @nodejs/v8. The code changes themselves LGTM, but someone more knowledgeable about V8 should weigh in. From a quick search of the codebase, |
9a21126
to
98214ca
Compare
Whitespace tidied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I also did this when trying to fix #11893 (but that patch involved something more breaking than this)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. 😉
Yes. This really is just a bit set for the browser. LGTM. |
looks to me like the test failures are flakes? |
Yes, I think so. Resume CI: https://ci.nodejs.org/job/node-test-pull-request/20112/ |
Landed in 817218c, thanks for the PR! |
PR-URL: nodejs#25380 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: #25380 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This fixes an issue in Electron where errors were being incorrectly sanitized on their way to
window.onerror
. e.g.was printing "Script error" instead of "Uncaught Error: hi"
This is due to origin-checking logic in Blink: https://chromium.googlesource.com/chromium/src/+/71.0.3578.123/third_party/blink/renderer/core/execution_context/execution_context.cc#114
cc @joyeecheung who is
blame
on a lot of this code :)Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes