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

Unified Diff: Source/WebCore/bindings/v8/npruntime.cpp

Issue 8493015: Merge 99311 - [V8] Null out V8NPObject::rootObject when the owning (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 1 month 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/WebCore/bindings/v8/V8Helpers.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/bindings/v8/npruntime.cpp
===================================================================
--- Source/WebCore/bindings/v8/npruntime.cpp (revision 99451)
+++ Source/WebCore/bindings/v8/npruntime.cpp (working copy)
@@ -418,6 +418,13 @@
set->remove(sub_object);
liveObjectMap.remove(sub_object);
+ // Script objects hold a refernce to their DOMWindow*, which is going away if
+ // we're unregistering the associated owner NPObject. Clear it out.
+ if (sub_object->_class == npScriptObjectClass) {
+ V8NPObject* v8npObject = reinterpret_cast<V8NPObject*>(sub_object);
+ v8npObject->rootObject = 0;
+ }
+
// Remove the JS references to the object.
forgetV8ObjectForNPObject(sub_object);
« no previous file with comments | « Source/WebCore/bindings/v8/V8Helpers.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698