⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 113146 in webkit


Ignore:
Timestamp:
Apr 4, 2012, 12:17:47 AM (14 years ago)
Author:
ggaren@apple.com
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.

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r113141 r113146  
     12012-04-03  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Fixed some WebKit2 crashes seen on the buildbot after my last patch.
     4
     5        Reviewed by Beth Dakin.
     6
     7        * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
     8        (WebKit::NPRuntimeObjectMap::finalize): Don't try to get our value
     9        out of the map, since Weak<T> returns NULL during finalization. Instead,
     10        use the handle we've been passed for finalization.
     11
    1122012-03-29  Geoffrey Garen  <ggaren@apple.com>
    213
  • trunk/Source/WebKit2/WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp

    r113141 r113146  
    291291void NPRuntimeObjectMap::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
    292292{
     293    JSNPObject* object = jsCast<JSNPObject*>(asObject(handle.get()));
     294
    293295    HashMap<NPObject*, JSC::Weak<JSNPObject> >::iterator found = m_jsNPObjects.find(static_cast<NPObject*>(context));
    294296    ASSERT(found != m_jsNPObjects.end());
    295     ASSERT_UNUSED(handle, asObject(handle.get()) == found->second.get());
    296     JSNPObject* object = found->second.get();
     297    ASSERT(found->second.was(object));
    297298    m_jsNPObjects.remove(found);
     299
    298300    addToInvalidationQueue(object->leakNPObject());
    299301}
Note: See TracChangeset for help on using the changeset viewer.