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

Changeset 167790 in webkit


Ignore:
Timestamp:
Apr 24, 2014, 11:01:34 PM (12 years ago)
Author:
Darin Adler
Message:

FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
https://bugs.webkit.org/show_bug.cgi?id=132163
rdar://problem/16720640

Reviewed by Brady Eidson.

Couldn't find a way to test this yet. Would be nice to have a test.

  • loader/FrameLoader.cpp:

(WebCore::FrameLoader::checkCompleted): Move protector until after we check
if the frame is already complete. That can happen in practice when this is
called from within the frame's destructor. All the code that runs before the
protector simply checks state and does not require protection.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167789 r167790  
     12014-04-24  Darin Adler  <darin@apple.com>
     2
     3        FrameLoader::checkCompleted can hit the "ref'ing while destroyed" assertion
     4        https://bugs.webkit.org/show_bug.cgi?id=132163
     5        rdar://problem/16720640
     6
     7        Reviewed by Brady Eidson.
     8
     9        Couldn't find a way to test this yet. Would be nice to have a test.
     10
     11        * loader/FrameLoader.cpp:
     12        (WebCore::FrameLoader::checkCompleted): Move protector until after we check
     13        if the frame is already complete. That can happen in practice when this is
     14        called from within the frame's destructor. All the code that runs before the
     15        protector simply checks state and does not require protection.
     16
    1172014-04-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    218
  • trunk/Source/WebCore/loader/FrameLoader.cpp

    r167569 r167790  
    794794void FrameLoader::checkCompleted()
    795795{
    796     Ref<Frame> protect(m_frame);
    797796    m_shouldCallCheckCompleted = false;
    798797
     
    816815    if (!allChildrenAreComplete())
    817816        return;
     817
     818    // Important not to protect earlier in this function, because earlier parts
     819    // of this function can be called the frame's destructor, and it's not legal
     820    // to ref an object while it's being destroyed.
     821    Ref<Frame> protect(m_frame);
    818822
    819823    // OK, completed.
Note: See TracChangeset for help on using the changeset viewer.