Changeset 52388 in webkit


Ignore:
Timestamp:
Dec 19, 2009 10:30:40 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-19 MORITA Hajime <morrita@gmail.com>

Reviewed by Darin Adler.

WebCore::Range::surroundContents NULL pointer crash.

https://bugs.webkit.org/show_bug.cgi?id=31684

  • fast/dom/Range/31684-expected.txt: Added.
  • fast/dom/Range/31684.html: Added.
  • fast/dom/Range/script-tests/31684.js: Added.

2009-12-19 MORITA Hajime <morrita@gmail.com>

Reviewed by Darin Adler.

WebCore::Range::surroundContents NULL pointer crash.

https://bugs.webkit.org/show_bug.cgi?id=31684

Test: fast/dom/Range/31684.html

  • dom/Range.cpp: (WebCore::Range::surroundContents): throw exception when parentOfNewParent->parentNode() is NULL.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r52354 r52388  
     12009-12-19  MORITA Hajime  <morrita@gmail.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebCore::Range::surroundContents NULL pointer crash.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=31684
     8
     9        * fast/dom/Range/31684-expected.txt: Added.
     10        * fast/dom/Range/31684.html: Added.
     11        * fast/dom/Range/script-tests/31684.js: Added.
     12
    1132009-12-18  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/WebCore/ChangeLog

    r52386 r52388  
     12009-12-19  MORITA Hajime  <morrita@gmail.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        WebCore::Range::surroundContents NULL pointer crash.
     6
     7        https://bugs.webkit.org/show_bug.cgi?id=31684
     8
     9        Test: fast/dom/Range/31684.html
     10
     11        * dom/Range.cpp:
     12        (WebCore::Range::surroundContents):
     13        throw exception when parentOfNewParent->parentNode() is NULL.
     14
    1152009-12-19  Christian Dywan  <christian@twotoasts.de>
    216
  • trunk/WebCore/dom/Range.cpp

    r51324 r52388  
    14181418    if (parentOfNewParent->isCharacterDataNode())
    14191419        parentOfNewParent = parentOfNewParent->parentNode();
    1420     if (!parentOfNewParent->childTypeAllowed(newParent->nodeType())) {
     1420    if (!parentOfNewParent || !parentOfNewParent->childTypeAllowed(newParent->nodeType())) {
    14211421        ec = HIERARCHY_REQUEST_ERR;
    14221422        return;
Note: See TracChangeset for help on using the changeset viewer.