|
HTML 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
Total comments: 2
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+27 lines, -3 lines) |
Patch |
 |
M |
LayoutTests/fast/html/imports/import-custom-element-dup-resolve.html
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskImportStep.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskImportStep.cpp
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskQueue.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
1 comment
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskQueue.cpp
|
View
|
|
1 chunk |
+10 lines, -0 lines |
1 comment
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskResolutionStep.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskResolutionStep.cpp
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/dom/custom/CustomElementMicrotaskStep.h
|
View
|
|
1 chunk |
+1 line, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/html/imports/HTMLImportChild.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 8 (0 generated)
|