DescriptionPostpone mutation event dispatch in Selection.deleteFromDocument.
A crash bug which an attached test case causes is following:
1. Selection.deleteFromDocument calls Range.deleteContents which removes a node through Node.removeChild.
2. Node.removeChild calls a DOMNodeRemoved event which removes the node.
3. Then Node.removeChild asserts a DOM exception NOT_FOUND_ERR.
4. Range.deleteContents picks the exception and it causes crash because Selection.deleteFromDocument calls Range.deleteContents with ASSERT_NO_EXCEPTION.
This cl changes Selection.deleteFromDocument to delay the mutation event dispatching when it calls Range.deleteContents.
Especially, DOMNodeRemoved will be not kicked.
BUG=339186
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=174944
Patch Set 1 #
Total comments: 3
Patch Set 2 : Scoping Range event #
Messages
Total messages: 16 (0 generated)
|