Changeset 192947 in webkit
- Timestamp:
- Dec 2, 2015 11:04:07 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192945 r192947 1 2015-12-02 Jiewen Tan <jiewen_tan@apple.com> 2 3 Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html 4 https://bugs.webkit.org/show_bug.cgi?id=149305 5 <rdar://problem/22747892> 6 7 Reviewed by Brent Fulgham. 8 9 This test case is from Blink r180918: 10 https://codereview.chromium.org/495743003 11 12 * fast/loader/unload-mutation-crash-expected.txt: Added. 13 * fast/loader/unload-mutation-crash.html: Added. 14 1 15 2015-12-02 Joseph Pecoraro <pecoraro@apple.com> 2 16 -
trunk/Source/WebCore/ChangeLog
r192943 r192947 1 2015-12-02 Jiewen Tan <jiewen_tan@apple.com> 2 3 Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html 4 https://bugs.webkit.org/show_bug.cgi?id=149305 5 <rdar://problem/22747892> 6 7 Reviewed by Brent Fulgham. 8 9 Add an extra guard to replaceDocument() against rude JS in unload event handlers. 10 11 Test: fast/loader/unload-mutation-crash.html 12 13 * loader/DocumentWriter.cpp: 14 (WebCore::DocumentWriter::replaceDocument): 15 (WebCore::DocumentWriter::begin): 16 1 17 2015-12-02 Per Arne Vollan <peavo@outlook.com> 2 18 -
trunk/Source/WebCore/loader/DocumentWriter.cpp
r189771 r192947 74 74 begin(m_frame->document()->url(), true, ownerDocument); 75 75 76 // begin() might fire an unload event, which will result in a situation where no new document has been attached, 77 // and the old document has been detached. Therefore, bail out if no document is attached. 78 if (!m_frame->document()) 79 return; 80 76 81 if (!source.isNull()) { 77 82 if (!m_hasReceivedSomeData) { … … 141 146 m_frame->loader().clear(document.ptr(), !shouldReuseDefaultView, !shouldReuseDefaultView); 142 147 clear(); 148 149 // m_frame->loader().clear() might fire unload event which could remove the view of the document. 150 // Bail out if document has no view. 151 if (!document->view()) 152 return; 143 153 144 154 if (!shouldReuseDefaultView)
Note: See TracChangeset
for help on using the changeset viewer.