DescriptionMerge 132371 - Crash when trying to write exception message to null console
https://bugs.webkit.org/show_bug.cgi?id=99658
Patch by Toni Barzic <tbarzic@chromium.org> on 2012-10-24
Reviewed by Adam Barth.
Source/WebCore:
DOMWindow::console may return NULL, so we should do a NULL check before adding message to it.
This may happen e.g. if a worker throws an exception just as the document is being replaced in the view.
The exception task could be processes after current window in the frame changes, and console in the document window is nulled.
Test: fast/workers/worker-exception-during-navigation.html
* dom/Document.cpp:
(WebCore::Document::addMessage):
LayoutTests:
The test creates bunch of workers that throw an exception as soon as they are loaded and then tries to change the current document.
The test passes if there is no crash.
Unfortuantely, the test is inherently flaky and may produce some false positive results (but should never fail if there is no bug).
* fast/workers/resources/worker-exception.js: Added.
* fast/workers/worker-exception-during-navigation-expected.txt: Added.
* fast/workers/worker-exception-during-navigation.html: Added.
TBR=commit-queue@webkit.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=132691
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|