Changeset 53143 in webkit


Ignore:
Timestamp:
Jan 12, 2010 10:10:14 AM (14 years ago)
Author:
eric@webkit.org
Message:

2010-01-12 Tony Chang <tony@chromium.org>

Reviewed by Maciej Stachowiak.

Add a test for a Chromium crash when loading multipart/x-mixed-replace
data.

https://bugs.webkit.org/show_bug.cgi?id=31446

  • http/tests/multipart/multipart-wait-before-boundary-expected.txt: Added.
  • http/tests/multipart/multipart-wait-before-boundary.html: Added.
  • http/tests/multipart/resources/multipart-wait-before-boundary.php: Added.

2010-01-12 Tony Chang <tony@chromium.org>

Reviewed by Maciej Stachowiak.

Fix a crash in Chromium when receiving multipart/x-mixed-replace data.
If we stop a multipart load after ResourceLoader::didReceiveResponse
but before ResourceLoader::didReceiveData, we have a NULL document
loader because it has been moved back to the provisional state. New
loads that happen after this will dereference the NULL document
loader.

Work around this by moving the provisional document loader back as
the document loader when the request is stopped.

https://bugs.webkit.org/show_bug.cgi?id=31446

Test: http/tests/multipart/multipart-wait-before-boundary.html

  • loader/FrameLoader.cpp: (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r53140 r53143  
     12010-01-12  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Add a test for a Chromium crash when loading multipart/x-mixed-replace
     6        data.
     7
     8        https://bugs.webkit.org/show_bug.cgi?id=31446
     9
     10        * http/tests/multipart/multipart-wait-before-boundary-expected.txt: Added.
     11        * http/tests/multipart/multipart-wait-before-boundary.html: Added.
     12        * http/tests/multipart/resources/multipart-wait-before-boundary.php: Added.
     13
    1142010-01-12  Petri Latvala  <petri.latvala@nomovok.com>
    215
  • trunk/WebCore/ChangeLog

    r53142 r53143  
     12010-01-12  Tony Chang  <tony@chromium.org>
     2
     3        Reviewed by Maciej Stachowiak.
     4
     5        Fix a crash in Chromium when receiving multipart/x-mixed-replace data.
     6        If we stop a multipart load after ResourceLoader::didReceiveResponse
     7        but before ResourceLoader::didReceiveData, we have a NULL document
     8        loader because it has been moved back to the provisional state.  New
     9        loads that happen after this will dereference the NULL document
     10        loader.
     11
     12        Work around this by moving the provisional document loader back as
     13        the document loader when the request is stopped.
     14
     15        https://bugs.webkit.org/show_bug.cgi?id=31446
     16
     17        Test: http/tests/multipart/multipart-wait-before-boundary.html
     18
     19        * loader/FrameLoader.cpp:
     20        (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
     21
    1222010-01-12  Enrica Casucci  <enrica@apple.com>
    223
  • trunk/WebCore/loader/FrameLoader.cpp

    r53050 r53143  
    29232923                pdl->stopLoading();
    29242924
     2925                if (isReplacing())
     2926                    setDocumentLoader(m_provisionalDocumentLoader.get());
     2927
    29252928                // Finish resetting the load state, but only if another load hasn't been started by the
    29262929                // delegate callback.
Note: See TracChangeset for help on using the changeset viewer.