Index: third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp |
diff --git a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp |
index baceb7eedd23f10e52a9ea52e7ffd19e0cf300e0..8f0a0735c1bd709c240b6f3fe18566ea107ff6a1 100644 |
--- a/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp |
+++ b/third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp |
@@ -376,6 +376,13 @@ void ModuleTreeLinker::Instantiate() { |
// https://html.spec.whatwg.org/multipage/webappapis.html#internal-module-script-graph-fetching-procedure |
+ // [nospec] Abort the steps if the browsing context is discarded. |
hiroshige
2017/05/16 17:09:19
(Not blocking this CL) if we need to check the con
kouhei (in TOK)
2017/05/16 17:52:35
I checked other places when writing this CL, but t
|
+ if (!modulator_->IsContextValid()) { |
+ descendants_module_script_ = nullptr; |
+ AdvanceState(State::kFinished); |
+ return; |
+ } |
+ |
// Step 5. Let instantiationStatus be null. |
// Note: The |error| variable corresponds to spec variable |
// "instantiationStatus". If |error| is empty, it indicates successful |