Changeset 166551 in webkit


Ignore:
Timestamp:
Mar 31, 2014 5:19:14 PM (10 years ago)
Author:
ap@apple.com
Message:

Crashes in PageConsole::addMessage
https://bugs.webkit.org/show_bug.cgi?id=130991
<rdar://problem/14795232>

Reviewed by Geoffrey Garen.

Source/WebCore:

Test: http/tests/misc/detached-frame-console.html

  • page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Added a null check.

It's legitimate for this to be called for a window that is not currently displayed
in a frame.

LayoutTests:

  • http/tests/misc/detached-frame-console-expected.txt: Added.
  • http/tests/misc/detached-frame-console.html: Added.
  • http/tests/misc/resources/detached-frame-console-subframe.html: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r166548 r166551  
     12014-03-31  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Crashes in PageConsole::addMessage
     4        https://bugs.webkit.org/show_bug.cgi?id=130991
     5        <rdar://problem/14795232>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        * http/tests/misc/detached-frame-console-expected.txt: Added.
     10        * http/tests/misc/detached-frame-console.html: Added.
     11        * http/tests/misc/resources/detached-frame-console-subframe.html: Added.
     12
    1132014-03-31  Alexey Proskuryakov  <ap@apple.com>
    214
  • trunk/Source/WebCore/ChangeLog

    r166542 r166551  
     12014-03-31  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Crashes in PageConsole::addMessage
     4        https://bugs.webkit.org/show_bug.cgi?id=130991
     5        <rdar://problem/14795232>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Test: http/tests/misc/detached-frame-console.html
     10
     11        * page/DOMWindow.cpp: (WebCore::DOMWindow::printErrorMessage): Added a null check.
     12        It's legitimate for this to be called for a window that is not currently displayed
     13        in a frame.
     14
    1152014-03-31  Simon Fraser  <simon.fraser@apple.com>
    216
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r166094 r166551  
    19401940        return;
    19411941
    1942     pageConsole()->addMessage(MessageSource::JS, MessageLevel::Error, message);
     1942    if (PageConsole* console = pageConsole())
     1943        console->addMessage(MessageSource::JS, MessageLevel::Error, message);
    19431944}
    19441945
Note: See TracChangeset for help on using the changeset viewer.