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

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

Issue 635593004: PPAPI: Make V8VarConverter longer-lived (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 6 years, 2 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/message_channel.cc ('k') | content/renderer/pepper/pepper_try_catch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_plugin_instance_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc
index cc4ae711647f2e151eb344f8663f1c4952e58466..ee9295d378830c35e3d81cf4f97420a28bd293a1 100644
--- a/content/renderer/pepper/pepper_plugin_instance_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc
@@ -2304,7 +2304,8 @@ PP_Var PepperPluginInstanceImpl::GetWindowObject(PP_Instance instance) {
if (!container_)
return PP_MakeUndefined();
- PepperTryCatchVar try_catch(this, NULL);
+ V8VarConverter converter(pp_instance_, V8VarConverter::kAllowObjectVars);
+ PepperTryCatchVar try_catch(this, &converter, NULL);
WebLocalFrame* frame = container_->element().document().frame();
if (!frame) {
try_catch.SetException("No frame exists for window object.");
@@ -2320,7 +2321,8 @@ PP_Var PepperPluginInstanceImpl::GetWindowObject(PP_Instance instance) {
PP_Var PepperPluginInstanceImpl::GetOwnerElementObject(PP_Instance instance) {
if (!container_)
return PP_MakeUndefined();
- PepperTryCatchVar try_catch(this, NULL);
+ V8VarConverter converter(pp_instance_, V8VarConverter::kAllowObjectVars);
+ PepperTryCatchVar try_catch(this, &converter, NULL);
ScopedPPVar result = try_catch.FromV8(container_->v8ObjectForElement());
DCHECK(!try_catch.HasException());
return result.Release();
@@ -2336,7 +2338,8 @@ PP_Var PepperPluginInstanceImpl::ExecuteScript(PP_Instance instance,
// a reference to ourselves so that we can still process the result after the
// WebBindings::evaluate() below.
scoped_refptr<PepperPluginInstanceImpl> ref(this);
- PepperTryCatchVar try_catch(this, exception);
+ V8VarConverter converter(pp_instance_, V8VarConverter::kAllowObjectVars);
+ PepperTryCatchVar try_catch(this, &converter, exception);
// Check for an exception due to the context being destroyed.
if (try_catch.HasException())
« no previous file with comments | « content/renderer/pepper/message_channel.cc ('k') | content/renderer/pepper/pepper_try_catch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698