Chromium Code Reviews
DescriptionHTML Imports: Fix race conditions on HTMLImportsChild
There are two race conditions in HTMLImportChild.
1. ensureLoader() is called in stateDidChange(), which is triggered via a timer.
That means there is a timing in which m_customElementMicrotaskStep isn't created but
accompanying <link rel=import> is in tree. This allows some microtask can slip away
from the blocking import.
2. HTMLImport::isDone() can return true when m_customElementMicrotaskStep is YET to be
created, that can happen the call on ensureLoader().
This change covers these two cases. It also fixes a trivial flakiness in
import-custom-element-dup-resolve.html
TEST=import-custom-element-dup-resolve.html
R=dglazkov@chromium.org, dominicc@chromium.org
BUG=371654
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=173794
Patch Set 1 #
Total comments: 2
Messages
Total messages: 8 (0 generated)
|