mark scripts as shareable cross-origin
This fixes an issue in Electron where errors were being incorrectly sanitized on their way to window.onerror
. e.g.
process.nextTick(() => throw new Error('hi'))
window.onerror = e => console.log(e)
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 -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines