Title: [113146] trunk/Source/WebKit2
- Revision
- 113146
- Author
- [email protected]
- Date
- 2012-04-04 00:17:47 -0700 (Wed, 04 Apr 2012)
Log Message
Fixed some WebKit2 crashes seen on the buildbot after my last patch.
Reviewed by Beth Dakin.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::finalize): Don't try to get our value
out of the map, since Weak<T> returns NULL during finalization. Instead,
use the handle we've been passed for finalization.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (113145 => 113146)
--- trunk/Source/WebKit2/ChangeLog 2012-04-04 07:11:55 UTC (rev 113145)
+++ trunk/Source/WebKit2/ChangeLog 2012-04-04 07:17:47 UTC (rev 113146)
@@ -1,3 +1,14 @@
+2012-04-03 Geoffrey Garen <[email protected]>
+
+ Fixed some WebKit2 crashes seen on the buildbot after my last patch.
+
+ Reviewed by Beth Dakin.
+
+ * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
+ (WebKit::NPRuntimeObjectMap::finalize): Don't try to get our value
+ out of the map, since Weak<T> returns NULL during finalization. Instead,
+ use the handle we've been passed for finalization.
+
2012-03-29 Geoffrey Garen <[email protected]>
First step toward incremental Weak<T> finalization
Modified: trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp (113145 => 113146)
--- trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp 2012-04-04 07:11:55 UTC (rev 113145)
+++ trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp 2012-04-04 07:17:47 UTC (rev 113146)
@@ -290,11 +290,13 @@
void NPRuntimeObjectMap::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
+ JSNPObject* object = jsCast<JSNPObject*>(asObject(handle.get()));
+
HashMap<NPObject*, JSC::Weak<JSNPObject> >::iterator found = m_jsNPObjects.find(static_cast<NPObject*>(context));
ASSERT(found != m_jsNPObjects.end());
- ASSERT_UNUSED(handle, asObject(handle.get()) == found->second.get());
- JSNPObject* object = found->second.get();
+ ASSERT(found->second.was(object));
m_jsNPObjects.remove(found);
+
addToInvalidationQueue(object->leakNPObject());
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes