fix contextIsolation issue while webPreference sandbox is on
contextIsolation didn't work while sandbox is on. The fix is contextIsolation picked up while sandbox on
This commit is contained in:
parent
485b9099f1
commit
bf07c5aebd
8 changed files with 63 additions and 22 deletions
|
@ -41,8 +41,6 @@ AtomRendererClient::AtomRendererClient()
|
|||
: node_integration_initialized_(false),
|
||||
node_bindings_(NodeBindings::Create(NodeBindings::RENDERER)),
|
||||
atom_bindings_(new AtomBindings(uv_default_loop())) {
|
||||
isolated_world_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kContextIsolation);
|
||||
}
|
||||
|
||||
AtomRendererClient::~AtomRendererClient() {
|
||||
|
@ -171,14 +169,6 @@ void AtomRendererClient::WillDestroyWorkerContextOnWorkerThread(
|
|||
}
|
||||
}
|
||||
|
||||
v8::Local<v8::Context> AtomRendererClient::GetContext(
|
||||
blink::WebFrame* frame, v8::Isolate* isolate) {
|
||||
if (isolated_world())
|
||||
return frame->WorldScriptContext(isolate, World::ISOLATED_WORLD);
|
||||
else
|
||||
return frame->MainWorldScriptContext();
|
||||
}
|
||||
|
||||
void AtomRendererClient::SetupMainWorldOverrides(
|
||||
v8::Handle<v8::Context> context) {
|
||||
// Setup window overrides in the main world context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue