Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(382)

Unified Diff: extensions/renderer/app_window_custom_bindings.cc

Issue 1685003002: Plumb the correct owner document through DocumentInit::m_owner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: extensions/renderer/app_window_custom_bindings.cc
diff --git a/extensions/renderer/app_window_custom_bindings.cc b/extensions/renderer/app_window_custom_bindings.cc
index 02df6335ca2a9493d6ade12f6853dd478e1dc588..492731d1a8201abe9b2a06b6b6a65cece208ef7d 100644
--- a/extensions/renderer/app_window_custom_bindings.cc
+++ b/extensions/renderer/app_window_custom_bindings.cc
@@ -51,25 +51,13 @@ void AppWindowCustomBindings::GetFrame(
if (!app_frame)
return;
- // TODO(jeremya): it doesn't really make sense to set the opener here, but we
- // need to make sure the security origin is set up before returning the DOM
- // reference. A better way to do this would be to have the browser pass the
- // opener through so opener_id is set in RenderViewImpl's constructor.
- content::RenderFrame* context_render_frame = context()->GetRenderFrame();
- if (!context_render_frame)
- return;
-
- blink::WebFrame* opener = context_render_frame->GetWebFrame();
- blink::WebLocalFrame* app_web_frame = app_frame->GetWebFrame();
- app_web_frame->setOpener(opener);
-
if (notify_browser) {
content::RenderThread::Get()->Send(new ExtensionHostMsg_AppWindowReady(
app_frame->GetRenderView()->GetRoutingID()));
}
v8::Local<v8::Value> window =
- app_web_frame->mainWorldScriptContext()->Global();
+ app_frame->GetWebFrame()->mainWorldScriptContext()->Global();
args.GetReturnValue().Set(window);
}

Powered by Google App Engine
This is Rietveld 408576698