• beidson@apple.com's avatar
    <rdar://problem/11544454> and https://bugs.webkit.org/show_bug.cgi?id=87990 · 0e9076df
    beidson@apple.com authored
    Crashes unregistering DOMWindowProperties while releasing CachedPages
    
    Reviewed by Jessie Berlin.
    
    This patch rewrites DOMWindowProperty to always keep direct track of the DOMWindow
    it has registered with and to only ever unregister from that very same DOMWindow.
    
    No new tests. (While the direct cause of the crash is understood, reproducing it is not)
    
    * page/DOMWindowProperty.cpp:
    (WebCore::DOMWindowProperty::DOMWindowProperty):
    (WebCore::DOMWindowProperty::~DOMWindowProperty):
    (WebCore::DOMWindowProperty::disconnectFrameForPageCache):
    (WebCore::DOMWindowProperty::reconnectFrameFromPageCache):
    (WebCore::DOMWindowProperty::willDestroyGlobalObjectInCachedFrame):
    (WebCore::DOMWindowProperty::willDestroyGlobalObjectInFrame):
    (WebCore::DOMWindowProperty::willDetachGlobalObjectFromFrame):
    * page/DOMWindowProperty.h:
    (DOMWindowProperty):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@119136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    0e9076df