Changeset 139343 in webkit


Ignore:
Timestamp:
Jan 10, 2013 11:22:11 AM (11 years ago)
Author:
Nate Chapin
Message:

REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
https://bugs.webkit.org/show_bug.cgi?id=106137

Reviewed by Brady Eidson.

Tested manually by comparing before and after leaks output for WK1-mac.

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if

a SubstituteData load fails or is cancelled. Without this call, load counts
are not balanced on WebDocumentLoaderMac and it is retained forever.

(WebCore::MainResourceLoader::didFinishLoading):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r139339 r139343  
     12013-01-10  Nate Chapin  <japhet@chromium.org>
     2
     3        REGRESSION(r138222): WebDocumentLoaderMac-related leaks seen on Leaks bot
     4        https://bugs.webkit.org/show_bug.cgi?id=106137
     5
     6        Reviewed by Brady Eidson.
     7
     8        Tested manually by comparing before and after leaks output for WK1-mac.
     9
     10        * loader/MainResourceLoader.cpp:
     11        (WebCore::MainResourceLoader::receivedError): Call dispatchDidFailLoading() if
     12            a SubstituteData load fails or is cancelled. Without this call, load counts
     13            are not balanced on WebDocumentLoaderMac and it is retained forever.
     14        (WebCore::MainResourceLoader::didFinishLoading):
     15
    1162013-01-10  Robert Kroeger  <rjkroege@chromium.org>
    217
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r139310 r139343  
    100100    RefPtr<Frame> protectFrame(m_documentLoader->frame());
    101101
     102    if (m_substituteDataLoadIdentifier) {
     103        ASSERT(!loader());
     104        frameLoader()->client()->dispatchDidFailLoading(documentLoader(), m_substituteDataLoadIdentifier, error);
     105    }
     106
    102107    // It is important that we call DocumentLoader::mainReceivedError before calling
    103108    // ResourceLoadNotifier::didFailToLoad because mainReceivedError clears out the relevant
     
    536541    RefPtr<DocumentLoader> dl = documentLoader();
    537542
    538     if (!loader())
     543    if (!loader()) {
    539544        frameLoader()->notifier()->dispatchDidFinishLoading(documentLoader(), identifier(), finishTime);
     545        m_substituteDataLoadIdentifier = 0;
     546    }
    540547
    541548#if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
Note: See TracChangeset for help on using the changeset viewer.