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

Unified Diff: Source/bindings/v8/V8NPObject.cpp

Issue 146523002: Limit the usage of SharedPersistent to ScriptValue only (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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
Index: Source/bindings/v8/V8NPObject.cpp
diff --git a/Source/bindings/v8/V8NPObject.cpp b/Source/bindings/v8/V8NPObject.cpp
index aa96fd0e4e3cb36158b2039666f032dc1427689b..ddf276154b33f47b72cb527b5f569aa288101d85 100644
--- a/Source/bindings/v8/V8NPObject.cpp
+++ b/Source/bindings/v8/V8NPObject.cpp
@@ -82,10 +82,11 @@ static void npObjectInvokeImpl(const v8::FunctionCallbackInfo<v8::Value>& info,
element = V8HTMLEmbedElement::toNative(info.Holder());
else
element = V8HTMLObjectElement::toNative(info.Holder());
- if (RefPtr<SharedPersistent<v8::Object> > wrapper = element->pluginWrapper()) {
+ ScriptValue wrapper = element->pluginWrapper();
+ if (!wrapper.hasNoValue()) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope handleScope(isolate);
- npObject = v8ObjectToNPObject(wrapper->newLocal(isolate));
+ npObject = v8ObjectToNPObject(v8::Handle<v8::Object>::Cast(wrapper.v8Value()));
} else
npObject = 0;
} else {

Powered by Google App Engine
This is Rietveld 408576698