Postpone 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 Review URL: https://codereview.chromium.org/199383004 git-svn-id: svn://svn.chromium.org/blink/trunk@174944 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment