DOM: Hoist plugin disposal to past CreateAndAttachShadowRoot.
This patch ensures that we don't dispose plugins that are scheduled for disposal during CreateAndAttachShadowRoot (which can happen via a call to RemovedFromFlatTree). Since this function is acting in the script- forbidden state, and plugins can run script on disposal (see referenced bug), it causes a CHECK in certain cases. The fix here is to hoist the disposal up to post forbidden scope state in CreateAndAttachShadowRoot by suspending the disposal prior to suspending script. This is consistent with things like UpdateStyleAndLayoutTree, UpdateStyle, and Document::Shutdown, all of which suspend plugin disposal prior to forbidding script. R=masonfreed@chromium.org Bug: 988318 Change-Id: Ib6363ce48eeb49f64691a519b8b542e805aa6527 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1728714Reviewed-by:Mason Freed <masonfreed@chromium.org> Reviewed-by:
Chris Harrelson <chrishtr@chromium.org> Commit-Queue: vmpstr <vmpstr@chromium.org> Cr-Commit-Position: refs/heads/master@{#683274}
Showing
Please register or sign in to comment