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

Unified Diff: content/renderer/pepper/ppb_var_deprecated_impl.cc

Issue 588083002: Use the correct v8 context for conversions when calling into the plugin from JS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « content/renderer/pepper/pepper_try_catch.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/ppb_var_deprecated_impl.cc
diff --git a/content/renderer/pepper/ppb_var_deprecated_impl.cc b/content/renderer/pepper/ppb_var_deprecated_impl.cc
index d8ac026ed9d865a216ffd460c5d28201a96d86e3..9f86e6b5141fe09806ba98d806a93cff88f6991a 100644
--- a/content/renderer/pepper/ppb_var_deprecated_impl.cc
+++ b/content/renderer/pepper/ppb_var_deprecated_impl.cc
@@ -220,7 +220,7 @@ PP_Var CallDeprecatedInternal(PP_Var var,
v8::Handle<v8::Object> function = accessor.GetObject();
v8::Handle<v8::Object> recv =
- accessor.instance()->GetContext()->Global();
+ accessor.instance()->GetMainWorldContext()->Global();
if (v8_method_name.As<v8::String>()->Length() != 0) {
function = function->Get(v8_method_name)->ToObject();
recv = accessor.GetObject();
@@ -290,7 +290,7 @@ bool IsInstanceOfDeprecated(PP_Var var,
return false; // Not an object at all.
v8::HandleScope handle_scope(object->instance()->GetIsolate());
- v8::Context::Scope context_scope(object->instance()->GetContext());
+ v8::Context::Scope context_scope(object->instance()->GetMainWorldContext());
PluginObject* plugin_object = PluginObject::FromV8Object(
object->instance()->GetIsolate(), object->GetHandle());
if (plugin_object && plugin_object->ppp_class() == ppp_class) {
« no previous file with comments | « content/renderer/pepper/pepper_try_catch.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698