fix: blend node and blink code generation policy when both are loaded - #36567
Conversation
| // If we're running with contextIsolation enabled in the renderer process, | ||
| // fall back to Blink's logic. | ||
| if (node::Environment::GetCurrent(context) == nullptr) { | ||
| if (gin_helper::Locker::IsBrowserProcess()) { |
There was a problem hiding this comment.
Which scenario we support today might enter this block ? Don't we always have a node environment in the browser process ?
There was a problem hiding this comment.
None, hence the NOTREACHED below
There was a problem hiding this comment.
Do we even need the NOTREACHED in that case ? My understanding is that NOTREACHED is useful to abort when there is no default action for switch statements or when an method is not implemented.
There was a problem hiding this comment.
I guess this could just be a CHECK :)
|
Release Notes Persisted
|
…#36567) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
…#36567) Co-authored-by: Jeremy Rose <jeremya@chromium.org>
|
I have automatically backported this PR to "23-x-y", please check out #36667 |
|
I have automatically backported this PR to "22-x-y", please check out #36668 |
…#36668) * fix: blend node and blink code generation policy when both are loaded (#36567) Co-authored-by: Jeremy Rose <jeremya@chromium.org> * Update .patches * fix patches Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Description of Change
This fixes a crash in some situations when sandbox: false.
Checklist
npm testpassesRelease Notes
Notes: Fixed a crash that could occur when running eval in inline scripts in unsandboxed renderer processes.