Changeset 139150 in webkit


Ignore:
Timestamp:
Jan 8, 2013 7:30:43 PM (11 years ago)
Author:
Nate Chapin
Message:

REGRESSION(r138222?): [Mac WK1] http/tests/appcache/main-resource-redirect.html asserts in WebFrameLoaderClient::dispatchDidFinishLoading
https://bugs.webkit.org/show_bug.cgi?id=106123

Reviewed by Alexey Proskuryakov.

Source/WebCore:

No new tests, fixing an existing test.

  • loader/MainResourceLoader.cpp:

(WebCore::MainResourceLoader::continueAfterNavigationPolicy): Before calling m_resource->removeClient(this)

and potentially canceling the ResourceLoader, ensure it won't send resource load callbacks.

  • loader/ResourceLoader.h:

(WebCore::ResourceLoader::setSendCallbackPolicy):

LayoutTests:

  • platform/mac-wk2/TestExpectations:
  • platform/mac/TestExpectations: main-resource-redirect.html is no longer crashing.
Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139149 r139150  
     12013-01-08  Nate Chapin  <japhet@chromium.org>
     2
     3        REGRESSION(r138222?): [Mac WK1] http/tests/appcache/main-resource-redirect.html asserts in WebFrameLoaderClient::dispatchDidFinishLoading
     4        https://bugs.webkit.org/show_bug.cgi?id=106123
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * platform/mac-wk2/TestExpectations:
     9        * platform/mac/TestExpectations: main-resource-redirect.html is no longer crashing.
     10
    1112013-01-08  Martin Robinson  <mrobinson@igalia.com>
    212
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r139148 r139150  
    296296webkit.org/b/93552 inspector/device-orientation-success.html [ Failure ]
    297297
    298 webkit.org/b/106123 http/tests/appcache/main-resource-redirect.html [ Pass ]
    299 
    300298webkit.org/b/106187 platform/mac/tiled-drawing/fixed/absolute-inside-out-of-view-fixed.html [ Failure ]
    301299webkit.org/b/106187 platform/mac/tiled-drawing/fixed/four-bars-zoomed.html [ Failure ]
  • trunk/LayoutTests/platform/mac/TestExpectations

    r139131 r139150  
    12641264webkit.org/b/106075 [ Debug ] fast/regions/full-screen-video-from-region.html [ Crash ]
    12651265
    1266 webkit.org/b/106123 http/tests/appcache/main-resource-redirect.html [ Crash ]
    1267 
    12681266webkit.org/b/106151 [ Lion ] http/tests/misc/link-rel-icon-beforeload.html [ Pass Failure ]
    12691267
  • trunk/Source/WebCore/ChangeLog

    r139146 r139150  
     12013-01-08  Nate Chapin  <japhet@chromium.org>
     2
     3        REGRESSION(r138222?): [Mac WK1] http/tests/appcache/main-resource-redirect.html asserts in WebFrameLoaderClient::dispatchDidFinishLoading
     4        https://bugs.webkit.org/show_bug.cgi?id=106123
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        No new tests, fixing an existing test.
     9
     10        * loader/MainResourceLoader.cpp:
     11        (WebCore::MainResourceLoader::continueAfterNavigationPolicy): Before calling m_resource->removeClient(this)
     12            and potentially canceling the ResourceLoader, ensure it won't send resource load callbacks.
     13        * loader/ResourceLoader.h:
     14        (WebCore::ResourceLoader::setSendCallbackPolicy):
     15
    1162013-01-08  Alexandru Chiculita  <achicu@adobe.com>
    217
  • trunk/Source/WebCore/loader/MainResourceLoader.cpp

    r138962 r139150  
    182182        // A redirect resulted in loading substitute data.
    183183        ASSERT(documentLoader()->timing()->redirectCount());
     184
     185        // We need to remove our reference to the CachedResource in favor of a SubstituteData load.
     186        // This will probably trigger the cancellation of the CachedResource's underlying ResourceLoader, though there is a
     187        // small chance that the resource is being loaded by a different Frame, preventing the ResourceLoader from being cancelled.
     188        // If the ResourceLoader is indeed cancelled, it would normally send resource load callbacks.
     189        // However, from an API perspective, this isn't a cancellation. Therefore, sever our relationship with the network load via clearResource(),
     190        // but prevent the ResourceLoader from sending ResourceLoadNotifier callbacks.
     191        RefPtr<ResourceLoader> resourceLoader = loader();
     192        ASSERT(!resourceLoader || resourceLoader->shouldSendResourceLoadCallbacks());
     193        if (resourceLoader)
     194            resourceLoader->setSendCallbackPolicy(DoNotSendCallbacks);
    184195        clearResource();
     196        if (resourceLoader)
     197            resourceLoader->setSendCallbackPolicy(SendCallbacks);
    185198        handleSubstituteDataLoadSoon(request);
    186199    }
  • trunk/Source/WebCore/loader/ResourceLoader.h

    r138285 r139150  
    141141    ResourceHandle* handle() const { return m_handle.get(); }
    142142    bool shouldSendResourceLoadCallbacks() const { return m_options.sendLoadCallbacks == SendCallbacks; }
     143    void setSendCallbackPolicy(SendCallbackPolicy sendLoadCallbacks) { m_options.sendLoadCallbacks = sendLoadCallbacks; }
    143144    bool shouldSniffContent() const { return m_options.sniffContent == SniffContent; }
    144145
Note: See TracChangeset for help on using the changeset viewer.