Changeset 87959 in webkit


Ignore:
Timestamp:
Jun 2, 2011, 3:03:49 PM (14 years ago)
Author:
beidson@apple.com
Message:

<rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
Repro crash loading certain webarchives after r87566.

Reviewed by Oliver Hunt.

Source/WebCore:

Test: webarchive/loading/javascript-url-iframe-crash.html

  • bindings/ScriptControllerBase.cpp:

(WebCore::ScriptController::executeIfJavaScriptURL): DocumentWriter::replaceDocument can

cause the DocumentLoader to be destroyed, so protect it with a Ref here.

LayoutTests:

  • webarchive/loading/javascript-url-iframe-crash-expected.txt: Added.
  • webarchive/loading/javascript-url-iframe-crash.html: Added.
  • webarchive/loading/resources/javascript-url-iframe-crash.webarchive: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r87956 r87959  
     12011-06-02  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        <rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
     6        Repro crash loading certain webarchives after r87566.
     7
     8        * webarchive/loading/javascript-url-iframe-crash-expected.txt: Added.
     9        * webarchive/loading/javascript-url-iframe-crash.html: Added.
     10        * webarchive/loading/resources/javascript-url-iframe-crash.webarchive: Added.
     11
    1122011-06-02  Tony Chang  <tony@chromium.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r87958 r87959  
     12011-06-02  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        <rdar://problem/9539920> and https://bugs.webkit.org/show_bug.cgi?id=61950
     6        Repro crash loading certain webarchives after r87566.
     7
     8        Test: webarchive/loading/javascript-url-iframe-crash.html
     9
     10        * bindings/ScriptControllerBase.cpp:
     11        (WebCore::ScriptController::executeIfJavaScriptURL): DocumentWriter::replaceDocument can
     12          cause the DocumentLoader to be destroyed, so protect it with a Ref here.
     13
    1142011-06-02  Jay Civelli  <jcivelli@chromium.org>
    215
  • trunk/Source/WebCore/bindings/ScriptControllerBase.cpp

    r87756 r87959  
    118118        // We're still in a frame, so there should be a DocumentLoader.
    119119        ASSERT(m_frame->document()->loader());
    120         if (DocumentLoader* loader = m_frame->document()->loader())
     120       
     121        // DocumentWriter::replaceDocument can cause the DocumentLoader to get deref'ed and possible destroyed,
     122        // so protect it with a RefPtr.
     123        if (RefPtr<DocumentLoader> loader = m_frame->document()->loader())
    121124            loader->writer()->replaceDocument(scriptResult);
    122125    }
Note: See TracChangeset for help on using the changeset viewer.