From 47de3f3f24a7a78a8881e477e0d83a2bc9d30e11 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 3 Feb 2016 00:05:27 +0800 Subject: [PATCH] Fix failing specs --- atom/renderer/atom_renderer_client.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index 7ff87a582a26..a996bd0efb25 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -55,7 +55,7 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver { void DidCreateScriptContext(v8::Handle context, int extension_group, int world_id) override { - if (world_id_ != -1) + if (world_id_ != -1 && world_id_ != world_id) return; world_id_ = world_id; renderer_client_->DidCreateScriptContext(context); @@ -88,9 +88,6 @@ void AtomRendererClient::WebKitInitialized() { blink::WebCustomElement::addEmbedderCustomElementName("webview"); blink::WebCustomElement::addEmbedderCustomElementName("browserplugin"); - // Allow file scheme to handle service worker by default. - blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers("file"); - OverrideNodeArrayBuffer(); node_bindings_->Initialize(); @@ -123,6 +120,9 @@ void AtomRendererClient::RenderFrameCreated( content::RenderFrame* render_frame) { new PepperHelper(render_frame); + // Allow file scheme to handle service worker by default. + blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers("file"); + // Only insert node integration for the main frame. if (!render_frame->IsMainFrame()) return;