Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1793)

Unified Diff: third_party/WebKit/Source/core/loader/modulescript/ModuleTreeLinker.cpp

Issue 2886593002: [ES6 modules] ModuleTreeLinker::Instantiate shouldn't proceed on invalid context (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698