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

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

Issue 147333004: Revert of 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
« no previous file with comments | « Source/bindings/v8/ScriptController.h ('k') | Source/bindings/v8/ScriptValue.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/ScriptController.cpp
diff --git a/Source/bindings/v8/ScriptController.cpp b/Source/bindings/v8/ScriptController.cpp
index 271c72aef0dcda8092112d0865216ae502588624..0e672cf9ba68eb828bf17c9a2ebd0929eecc7625 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -345,16 +345,16 @@
v8Context->SetErrorMessageForCodeGenerationFromStrings(v8String(m_isolate, errorMessage));
}
-ScriptValue ScriptController::createPluginWrapper(Widget* widget)
+PassRefPtr<SharedPersistent<v8::Object> > ScriptController::createPluginWrapper(Widget* widget)
{
ASSERT(widget);
if (!widget->isPluginView())
- return ScriptValue();
+ return 0;
NPObject* npObject = toPluginView(widget)->scriptableObject();
if (!npObject)
- return ScriptValue();
+ return 0;
// Frame Memory Management for NPObjects
// -------------------------------------
@@ -380,12 +380,12 @@
// NPObject as part of its wrapper. However, before accessing the object
// it must consult the _NPN_Registry.
- v8::Handle<v8::Object> wrapper = createV8ObjectForNPObject(npObject, 0, m_isolate);
+ v8::Local<v8::Object> wrapper = createV8ObjectForNPObject(npObject, 0, m_isolate);
// Track the plugin object. We've been given a reference to the object.
m_pluginObjects.set(widget, npObject);
- return ScriptValue(wrapper, m_isolate);
+ return SharedPersistent<v8::Object>::create(wrapper, m_isolate);
}
void ScriptController::cleanupScriptObjectsForPlugin(Widget* nativeHandle)
« no previous file with comments | « Source/bindings/v8/ScriptController.h ('k') | Source/bindings/v8/ScriptValue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698