diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index c923578065..a00b5d4b80 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -36,7 +36,6 @@ #include "brightray/browser/inspectable_web_contents_view.h" #include "chrome/browser/printing/print_view_manager_basic.h" #include "chrome/browser/printing/print_preview_message_handler.h" -#include "content/common/view_messages.h" #include "content/public/browser/browser_plugin_guest_manager.h" #include "content/public/browser/favicon_status.h" #include "content/public/browser/native_web_keyboard_event.h" @@ -83,14 +82,6 @@ void SetUserAgentInIO(scoped_refptr getter, namespace mate { -template<> -struct Converter { - static v8::Local ToV8( - v8::Isolate* isolate, content::WebContents* web_contents) { - return atom::api::WebContents::CreateFrom(isolate, web_contents).ToV8(); - } -}; - template<> struct Converter { static bool FromV8(v8::Isolate* isolate, diff --git a/atom/browser/lib/guest-window-manager.js b/atom/browser/lib/guest-window-manager.js index fec5bbf6f9..5a62bd0cbc 100644 --- a/atom/browser/lib/guest-window-manager.js +++ b/atom/browser/lib/guest-window-manager.js @@ -91,11 +91,11 @@ var guestWindowOpen = function() { } else { return event.returnValue = createGuest(event.sender, url, frameName, options); } -} +}; process.on('ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', function() { return guestWindowOpen.apply(null, arguments); -}) +}); // Routed window.open messages. ipcMain.on('ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', function() { diff --git a/atom/renderer/atom_renderer_client.cc b/atom/renderer/atom_renderer_client.cc index ccff44f91d..e625a88b11 100644 --- a/atom/renderer/atom_renderer_client.cc +++ b/atom/renderer/atom_renderer_client.cc @@ -18,7 +18,6 @@ #include "atom/common/node_bindings.h" #include "atom/common/node_includes.h" #include "atom/common/options_switches.h" -#include "atom/common/native_mate_converters/string16_converter.h" #include "atom/renderer/atom_render_view_observer.h" #include "atom/renderer/guest_view_container.h" #include "atom/renderer/node_array_buffer_bridge.h" @@ -65,14 +64,14 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver { return; world_id_ = world_id; renderer_client_->DidCreateScriptContext( - render_frame()->GetWebFrame(), context); + render_frame()->GetWebFrame(), context); } void WillReleaseScriptContext(v8::Local context, int world_id) override { if (world_id_ != world_id) return; renderer_client_->WillReleaseScriptContext( - render_frame()->GetWebFrame(), context); + render_frame()->GetWebFrame(), context); } private: @@ -140,10 +139,6 @@ void AtomRendererClient::RenderFrameCreated( // 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; - new AtomRenderFrameObserver(render_frame, this); } @@ -215,6 +210,7 @@ void AtomRendererClient::DidCreateScriptContext( } void AtomRendererClient::WillReleaseScriptContext( + blink::WebFrame* frame, v8::Handle context) { node::Environment* env = node::Environment::GetCurrent(context); if (env != nullptr && env == node_bindings_->uv_env()) { diff --git a/vendor/brightray b/vendor/brightray index 2a5cd7178b..d06de26dff 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit 2a5cd7178b641de91ca6eb0bca826fea588f923a +Subproject commit d06de26dff8b641d9aee4c78ee830b416710f554 diff --git a/vendor/node b/vendor/node index a130651f86..a507a3c381 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit a130651f868f5ad23cb366abacea02f9ed50b769 +Subproject commit a507a3c3816d6ac085ed46250c489a3d76ab8b3c