Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Issue 11320014: Merge 132371 - Crash when trying to write exception message to null console (Closed)

Created:
8 years, 1 month ago by karen
Modified:
8 years, 1 month ago
Reviewers:
commit-queue
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1271/
Visibility:
Public.

Description

Merge 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, --1 lines) Patch
A + LayoutTests/fast/workers/resources/worker-exception.js View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/workers/worker-exception-during-navigation.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/workers/worker-exception-during-navigation-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/dom/Document.cpp View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
karen
8 years, 1 month ago (2012-10-26 20:57:19 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698