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

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

Issue 23537048: Reduce usage of v8::Isolate::GetCurrent() in NPV8Object (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 | « Source/bindings/v8/NPV8Object.cpp ('k') | Source/bindings/v8/V8NPObject.cpp » ('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 031928d25d45369d9925ab5f6ba0fedbf1f9e193..1e94aa1e4d921d20290b0d73633205a5068e2be9 100644
--- a/Source/bindings/v8/ScriptController.cpp
+++ b/Source/bindings/v8/ScriptController.cpp
@@ -116,7 +116,7 @@ void ScriptController::clearScriptObjects()
// to it, so that if a plugin fails to release it properly we will
// only leak the NPObject wrapper, not the object, its document, or
// anything else they reference.
- disposeUnderlyingV8Object(m_windowScriptNPObject);
+ disposeUnderlyingV8Object(m_windowScriptNPObject, m_isolate);
_NPN_ReleaseObject(m_windowScriptNPObject);
m_windowScriptNPObject = 0;
}
@@ -467,7 +467,7 @@ static NPObject* createScriptObject(Frame* frame, v8::Isolate* isolate)
v8::Handle<v8::Value> global = toV8(window, v8::Handle<v8::Object>(), v8Context->GetIsolate());
ASSERT(global->IsObject());
- return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(global), window);
+ return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(global), window, isolate);
}
NPObject* ScriptController::windowScriptNPObject()
@@ -506,7 +506,7 @@ NPObject* ScriptController::createScriptObjectForPluginElement(HTMLPlugInElement
if (!v8plugin->IsObject())
return createNoScriptObject();
- return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(v8plugin), window);
+ return npCreateV8ScriptObject(0, v8::Handle<v8::Object>::Cast(v8plugin), window, v8Context->GetIsolate());
}
void ScriptController::clearWindowShell()
« no previous file with comments | « Source/bindings/v8/NPV8Object.cpp ('k') | Source/bindings/v8/V8NPObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698