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

Changeset 243568 in webkit


Ignore:
Timestamp:
Mar 27, 2019, 4:32:34 PM (7 years ago)
Author:
Adrian Perez de Castro
Message:

Merged r243104 - REGRESSION(r236862): early frame decoupling leaves JSC ArrayBuffer objects lingering
https://bugs.webkit.org/show_bug.cgi?id=195322

Reviewed by Ryosuke Niwa.

Since r236862, DOMWindow objects get disconnected from their Frame object as soon as
their iframe element gets removed from the document. Previously, DOMWindow was a
FrameDestructionObserver and would stay connected to its frame until the frame died.

This means that some of the work that we were doing in DOMWindow::frameDestroyed() and
Document::willDetachPage() no longer happens for subframe windows because they get
disconnected from their frame because they get a chance to get such notifications.
To address this issue, we now also do this work in DOMWindow::willDetachDocumentFromFrame()
which gets called when the iframe gets removed from the document and the document / window
get disconnected from the Frame element.

No new tests, verified locally that the leak is gone on JetStream.

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::willDetachDocumentFromFrame):

Location:
releases/WebKitGTK/webkit-2.24/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/ChangeLog

    r242877 r243568  
     12019-03-18  Chris Dumez  <cdumez@apple.com>
     2
     3        REGRESSION(r236862): early frame decoupling leaves JSC ArrayBuffer objects lingering
     4        https://bugs.webkit.org/show_bug.cgi?id=195322
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Since r236862, DOMWindow objects get disconnected from their Frame object as soon as
     9        their iframe element gets removed from the document. Previously, DOMWindow was a
     10        FrameDestructionObserver and would stay connected to its frame until the frame died.
     11
     12        This means that some of the work that we were doing in DOMWindow::frameDestroyed() and
     13        Document::willDetachPage() no longer happens for subframe windows because they get
     14        disconnected from their frame because they get a chance to get such notifications.
     15        To address this issue, we now also do this work in DOMWindow::willDetachDocumentFromFrame()
     16        which gets called when the iframe gets removed from the document and the document / window
     17        get disconnected from the Frame element.
     18
     19        No new tests, verified locally that the leak is gone on JetStream.
     20
     21        * page/DOMWindow.cpp:
     22        (WebCore::DOMWindow::willDetachDocumentFromFrame):
     23
    1242019-03-12  Philippe Normand  <pnormand@igalia.com>
    225
  • releases/WebKitGTK/webkit-2.24/Source/WebCore/page/DOMWindow.cpp

    r242424 r243568  
    487487    if (m_performance)
    488488        m_performance->clearResourceTimings();
     489
     490    JSDOMWindowBase::fireFrameClearedWatchpointsForWindow(this);
     491    InspectorInstrumentation::frameWindowDiscarded(*frame(), this);
    489492}
    490493
Note: See TracChangeset for help on using the changeset viewer.