Gracefully handle XMLDocumentParser being detached by mutation events.
commit0fabdf6aa7022ec1c6317f3dad8b90836d937e9a
authorsigbjornf@opera.com <sigbjornf@opera.com>
Wed, 5 Aug 2015 05:59:06 +0000 (5 05:59 +0000)
committersigbjornf@opera.com <sigbjornf@opera.com>
Wed, 5 Aug 2015 05:59:06 +0000 (5 05:59 +0000)
treeca48966b66276d09667bb4762a38bd7af376f0db
parent3a79f21e8e383b9bdf75a016879dc5ba032ca5f4
Gracefully handle XMLDocumentParser being detached by mutation events.

Should a mutation event handler run while flushing out parser-buffered text,
we could end up in a detached state, something the implementation wasn't
prepared for.

Firm up exitText() usage, and rename it as updateLeafTextNode(). Also attempt
to make enterText() more descriptive as createLeafTextNodeIfNeeded().

R=haraken,tkent,kouhei
BUG=516290

Review URL: https://codereview.chromium.org/1267283002

git-svn-id: svn://svn.chromium.org/blink/trunk@200026 bbb929c8-8fbe-4397-9dbb-9b2b20218538
third_party/WebKit/LayoutTests/fast/parser/resources/xhtml-overwrite-frame.xhtml [new file with mode: 0644]
third_party/WebKit/LayoutTests/fast/parser/xhtml-dom-character-data-modified-crash-expected.txt [new file with mode: 0644]
third_party/WebKit/LayoutTests/fast/parser/xhtml-dom-character-data-modified-crash.html [new file with mode: 0644]
third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.cpp
third_party/WebKit/Source/core/xml/parser/XMLDocumentParser.h