Null check in traverseNodesForSerialization
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Oct 2021 04:31:56 +0000 (04:31 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Oct 2021 04:31:56 +0000 (04:31 +0000)
commit498c76e6f1dc81c0096fc48c7f9bec440f9e928b
tree55d9a13f3635f12dedf91c3c5e04204b2fc18e25
parent15cd24cc96797c98eae0062b965c5e6a13675723
Null check in traverseNodesForSerialization
https://bugs.webkit.org/show_bug.cgi?id=230704

Patch by Rob Buis <rbuis@igalia.com> on 2021-10-23
Reviewed by Wenson Hsieh.

Source/WebCore:

Pass startNode by value instead of by pointer to
traverseNodesForSerialization.

Test: editing/pasteboard/copy-with-shadow-tree-crash.html

* editing/markup.cpp:
(WebCore::StyledMarkupAccumulator::serializeNodes):
(WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):

LayoutTests:

* editing/pasteboard/copy-with-shadow-tree-crash-expected.txt: Added.
* editing/pasteboard/copy-with-shadow-tree-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@284754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/editing/pasteboard/copy-with-shadow-tree-crash-expected.txt [new file with mode: 0644]
LayoutTests/editing/pasteboard/copy-with-shadow-tree-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/editing/markup.cpp