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

Unified Diff: extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc

Issue 861073004: Use the main world script context for mime handler postMessage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
diff --git a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
index 9c502565f6f0bf0d19912e2bcaa86211f381395e..f5ded41b4f148333f8906f4298f14a7ce9dcaf60 100644
--- a/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
+++ b/extensions/renderer/guest_view/mime_handler_view/mime_handler_view_container.cc
@@ -203,6 +203,8 @@ void MimeHandlerViewContainer::PostMessage(v8::Isolate* isolate,
if (!guest_proxy_frame)
return;
+ v8::Context::Scope context_scope(
+ render_frame()->GetWebFrame()->mainWorldScriptContext());
v8::Local<v8::Object> guest_proxy_window =
guest_proxy_frame->mainWorldScriptContext()->Global();
gin::Dictionary window_object(isolate, guest_proxy_window);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698