Navigation Menu

Skip to content
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

fix: emit IPC event in correct context if isolation and sandbox enabled (backport: 4-0-x) #16376

Conversation

trop[bot]
Copy link
Contributor

@trop trop bot commented Jan 12, 2019

Backport of #16352

See that PR for details.

Notes: Fixed delivery of IPC events to renderer processes when both contextIsolation and sandbox are enabled.

Alex Garbutt added 2 commits January 12, 2019 13:19
IPC events were not being delivered to renderer processes when both
`contextIsolation` and `sandbox` were enabled. This is because the
`AtomSandboxedRenderFrameObserver` class was incorrectly using the
`MainWorldScriptContext`, rather than conditionally selecting the
context based on if isolation was enabled.

Fixes electron#11922
@trop trop bot requested a review from a team January 12, 2019 13:19
@trop trop bot added 4-2-x backport This is a backport PR labels Jan 12, 2019
@alexeykuzmin alexeykuzmin merged commit f3bbb5a into electron:4-0-x Jan 12, 2019
@release-clerk
Copy link

release-clerk bot commented Jan 12, 2019

Release Notes Persisted

Fixed delivery of IPC events to renderer processes when both contextIsolation and sandbox are enabled.

@@ -116,8 +116,10 @@ class AtomSandboxedRenderFrameObserver : public AtomRenderFrameObserver {

auto* isolate = blink::MainThreadIsolate();
v8::HandleScope handle_scope(isolate);
auto context = frame->MainWorldScriptContext();

auto context = renderer_client_->GetContext(frame, isolate);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be creating Cannot get property 'TMPDIR' on missing remote object 59 when trying to access object through electron.remote now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsabanin This change only landed 12 days ago and has only been released in 5.0. The error you quote there wouldn't be caused by this PR afaik

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4-2-x backport This is a backport PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants