Changeset 140174 in webkit


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

Cannot abort multiple XHR POSTs made to same url
https://bugs.webkit.org/show_bug.cgi?id=106937

Reviewed by Alexey Proskuryakov.

Source/WebCore:

Test: http/tests/cache/cancel-multiple-post-xhrs.html

  • loader/cache/CachedResource.cpp:

(WebCore::CachedResource::removeClient): Call allClientsRemoved() regardless

of whether this resource is inCache(). Otherwise, CachedRawResources will
not have the opportunity to cancel as expected. However, don't cancel
if the last client was removed because we're in the middle of switching
the clients over to a successfully revalidated resource.

LayoutTests:

  • http/tests/cache/cancel-multiple-post-xhrs-expected.txt: Added.
  • http/tests/cache/cancel-multiple-post-xhrs.html: Added.
  • platform/mac/TestExpectations:
Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r140173 r140174  
     12013-01-18  Nate Chapin  <japhet@chromium.org>
     2
     3        Cannot abort multiple XHR POSTs made to same url
     4        https://bugs.webkit.org/show_bug.cgi?id=106937
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        * http/tests/cache/cancel-multiple-post-xhrs-expected.txt: Added.
     9        * http/tests/cache/cancel-multiple-post-xhrs.html: Added.
     10        * platform/mac/TestExpectations:
     11
    1122013-01-18  Dima Gorbik  <dgorbik@apple.com>
    213
  • trunk/LayoutTests/platform/mac/TestExpectations

    r140106 r140174  
    379379http/tests/inspector/network/network-size-chunked.html
    380380http/tests/inspector/network/network-size-sync.html
    381 
    382 # https://bugs.webkit.org/show_bug.cgi?id=64097
    383 http/tests/inspector/network/network-disable-cache-memory.html
    384 http/tests/inspector/network/network-disable-cache-xhrs.html
    385381
    386382# Quota API is not supported.
  • trunk/Source/WebCore/ChangeLog

    r140173 r140174  
     12013-01-18  Nate Chapin  <japhet@chromium.org>
     2
     3        Cannot abort multiple XHR POSTs made to same url
     4        https://bugs.webkit.org/show_bug.cgi?id=106937
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Test: http/tests/cache/cancel-multiple-post-xhrs.html
     9
     10        * loader/cache/CachedResource.cpp:
     11        (WebCore::CachedResource::removeClient): Call allClientsRemoved() regardless
     12            of whether this resource is inCache(). Otherwise, CachedRawResources will
     13            not have the opportunity to cancel as expected. However, don't cancel
     14            if the last client was removed because we're in the middle of switching
     15            the clients over to a successfully revalidated resource.
     16
    1172013-01-18  Dima Gorbik  <dgorbik@apple.com>
    218
  • trunk/Source/WebCore/loader/cache/CachedResource.cpp

    r140105 r140174  
    526526
    527527    bool deleted = deleteIfPossible();
    528     if (!deleted && !hasClients() && inCache()) {
    529         memoryCache()->removeFromLiveResourcesSize(this);
    530         memoryCache()->removeFromLiveDecodedResourcesList(this);
    531         allClientsRemoved();
     528    if (!deleted && !hasClients()) {
     529        if (inCache()) {
     530            memoryCache()->removeFromLiveResourcesSize(this);
     531            memoryCache()->removeFromLiveDecodedResourcesList(this);
     532        }
     533        if (!m_switchingClientsToRevalidatedResource)
     534            allClientsRemoved();
    532535        destroyDecodedDataIfNeeded();
    533536        if (response().cacheControlContainsNoStore()) {
Note: See TracChangeset for help on using the changeset viewer.