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:
sungpark 2017-07-27 17:08:24 -07:00
parent 485b9099f1
commit bf07c5aebd
8 changed files with 63 additions and 22 deletions

View file

@ -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