-
abarth@webkit.org authored
Reviewed by Darin Adler. REGRESSION (r66428/r71892): Crash after assertion failure (!m_reachedTerminalState) in ResourceLoader::didCancel() https://bugs.webkit.org/show_bug.cgi?id=51357 Test that we don't crash when calling close immedately after print. * printing/print-close-crash-expected.txt: Added. * printing/print-close-crash.html: Added. 2011-03-10 Adam Barth <abarth@webkit.org> Reviewed by Darin Adler. REGRESSION (r66428/r71892): Crash after assertion failure (!m_reachedTerminalState) in ResourceLoader::didCancel() https://bugs.webkit.org/show_bug.cgi?id=51357 Previously, we would try to print from a callstack that didn't want a nested event loop, leading to re-entrancy problems. In this patch, we complete the print call asynchronously, giving us a clean stack on which to run the nested event loop. Test: printing/print-close-crash.html * page/DOMWindow.cpp: (WebCore::DOMWindow::DOMWindow): (WebCore::DOMWindow::print): (WebCore::DOMWindow::printTimerFired): * page/DOMWindow.h: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80812 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5079628c