Changeset 17661 in webkit


Ignore:
Timestamp:
Nov 8, 2006 2:02:03 AM (17 years ago)
Author:
beidson
Message:

LayoutTests:

Reviewed by Maciej

Added test to cover bug http://bugs.webkit.org/show_bug.cgi?id=11450
-Confirm there is no assert when nuking a frame with an active XMLHttpRequest load
-Confirm the correct state-change notifications for the request are dispatched

  • http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt: Added.
  • http/tests/xmlhttprequest/frame-load-cancelled-abort.html: Added.
  • http/tests/xmlhttprequest/resources/endlessxml.php: Added.
  • http/tests/xmlhttprequest/resources/frame-load-to-cancel.html: Added.

WebCore:

Reviewed by Maciej

If the request has already been aborted, bail out of didFinishLoading()
immediately. This prevents state change notifications that aren't
needed.

  • xml/xmlhttprequest.cpp: (WebCore::XMLHttpRequest::didFinishLoading):
Location:
trunk
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r17658 r17661  
     12006-11-08  Brady Eidson <beidson@apple.com>
     2
     3        Reviewed by Maciej
     4
     5        Added test to cover bug http://bugs.webkit.org/show_bug.cgi?id=11450
     6        -Confirm there is no assert when nuking a frame with an active XMLHttpRequest load
     7        -Confirm the correct state-change notifications for the request are dispatched
     8
     9        * http/tests/xmlhttprequest/frame-load-cancelled-abort-expected.txt: Added.
     10        * http/tests/xmlhttprequest/frame-load-cancelled-abort.html: Added.
     11        * http/tests/xmlhttprequest/resources/endlessxml.php: Added.
     12        * http/tests/xmlhttprequest/resources/frame-load-to-cancel.html: Added.
     13
    1142006-11-08  Darin Adler  <darin@apple.com>
    215
  • trunk/WebCore/ChangeLog

    r17660 r17661  
     12006-11-08  Brady Eidson <beidson@apple.com>
     2
     3        Reviewed by Maciej
     4
     5        If the request has already been aborted, bail out of didFinishLoading()
     6        immediately.  This prevents state change notifications that aren't
     7        needed.
     8
     9        * xml/xmlhttprequest.cpp:
     10        (WebCore::XMLHttpRequest::didFinishLoading):
     11
    1122006-11-08  Darin Adler  <darin@apple.com>
    213
  • trunk/WebCore/xml/xmlhttprequest.cpp

    r17652 r17661  
    486486void XMLHttpRequest::didFinishLoading(ResourceHandle* loader)
    487487{
    488     ASSERT(m_aborted || loader == m_loader);
     488    if (m_aborted)
     489        return;
     490       
     491    ASSERT(loader == m_loader);
    489492
    490493    if (m_state < Sent)
Note: See TracChangeset for help on using the changeset viewer.