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

Unified Diff: content/renderer/pepper/plugin_object.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/pepper_try_catch.cc ('k') | content/renderer/pepper/ppb_var_deprecated_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/plugin_object.cc
diff --git a/content/renderer/pepper/plugin_object.cc b/content/renderer/pepper/plugin_object.cc
index c7dd883f46dad5c54415d09b329d9678b4df08a7..729b4801452aac825eb4ea879d167b0009f3c413 100644
--- a/content/renderer/pepper/plugin_object.cc
+++ b/content/renderer/pepper/plugin_object.cc
@@ -71,7 +71,9 @@ PluginObject* PluginObject::FromV8Object(v8::Isolate* isolate,
PP_Var PluginObject::Create(PepperPluginInstanceImpl* instance,
const PPP_Class_Deprecated* ppp_class,
void* ppp_class_data) {
- PepperTryCatchVar try_catch(instance, NULL);
+ V8VarConverter var_converter(instance->pp_instance(),
+ V8VarConverter::kAllowObjectVars);
+ PepperTryCatchVar try_catch(instance, &var_converter, NULL);
gin::Handle<PluginObject> object =
gin::CreateHandle(instance->GetIsolate(),
new PluginObject(instance, ppp_class, ppp_class_data));
@@ -95,8 +97,9 @@ bool PluginObject::SetNamedProperty(v8::Isolate* isolate,
return false;
ScopedPPVar identifier_var(ScopedPPVar::PassRef(),
StringVar::StringToPPVar(identifier));
- PepperTryCatchV8 try_catch(instance_, V8VarConverter::kAllowObjectVars,
- isolate);
+ V8VarConverter var_converter(instance_->pp_instance(),
+ V8VarConverter::kAllowObjectVars);
+ PepperTryCatchV8 try_catch(instance_, &var_converter, isolate);
bool has_property =
ppp_class_->HasProperty(ppp_class_data_, identifier_var.get(),
@@ -127,8 +130,9 @@ std::vector<std::string> PluginObject::EnumerateNamedProperties(
if (!instance_)
return result;
- PepperTryCatchV8 try_catch(instance_, V8VarConverter::kAllowObjectVars,
- isolate);
+ V8VarConverter var_converter(instance_->pp_instance(),
+ V8VarConverter::kAllowObjectVars);
+ PepperTryCatchV8 try_catch(instance_, &var_converter, isolate);
PP_Var* name_vars;
uint32_t count = 0;
@@ -180,8 +184,9 @@ v8::Local<v8::Value> PluginObject::GetPropertyOrMethod(v8::Isolate* isolate,
if (!instance_)
return v8::Local<v8::Value>();
- PepperTryCatchV8 try_catch(instance_, V8VarConverter::kAllowObjectVars,
- isolate);
+ V8VarConverter var_converter(instance_->pp_instance(),
+ V8VarConverter::kAllowObjectVars);
+ PepperTryCatchV8 try_catch(instance_, &var_converter, isolate);
bool has_property =
ppp_class_->HasProperty(ppp_class_data_, identifier_var,
try_catch.exception());
@@ -225,8 +230,9 @@ void PluginObject::Call(const std::string& identifier,
if (!instance_)
return;
- PepperTryCatchV8 try_catch(instance_, V8VarConverter::kAllowObjectVars,
- args->isolate());
+ V8VarConverter var_converter(instance_->pp_instance(),
+ V8VarConverter::kAllowObjectVars);
+ PepperTryCatchV8 try_catch(instance_, &var_converter, args->isolate());
ScopedPPVar identifier_var(ScopedPPVar::PassRef(),
StringVar::StringToPPVar(identifier));
ScopedPPVarArray argument_vars(args->Length());
« no previous file with comments | « content/renderer/pepper/pepper_try_catch.cc ('k') | content/renderer/pepper/ppb_var_deprecated_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698