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

Unified Diff: third_party/WebKit/Source/core/dom/ModuleMap.cpp

Issue 2838933003: [not-for-commit] kitsune changes + pending kouhei changes (Closed)
Patch Set: Created 3 years, 8 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/dom/ModuleMap.cpp
diff --git a/third_party/WebKit/Source/core/dom/ModuleMap.cpp b/third_party/WebKit/Source/core/dom/ModuleMap.cpp
index 16b7898291bf400d385a48bb5256138544b1d8a0..9ed467f2b07e086d216ae2351a27c6f4606e7f01 100644
--- a/third_party/WebKit/Source/core/dom/ModuleMap.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleMap.cpp
@@ -102,7 +102,6 @@ void ModuleMap::Entry::NotifyNewSingleModuleFinished(
}
ModuleScript* ModuleMap::Entry::GetModuleScript() const {
- DCHECK(!is_fetching_);
kouhei (in TOK) 2017/04/26 13:03:44 The module script maybe during fetch if called fro
return module_script_.Get();
}
@@ -152,7 +151,8 @@ void ModuleMap::FetchSingleModuleScript(const ModuleScriptFetchRequest& request,
ModuleScript* ModuleMap::GetFetchedModuleScript(const KURL& url) const {
MapImpl::const_iterator it = map_.Find(url);
- CHECK_NE(it, map_.end());
+ if (it == map_.end())
+ return nullptr;
kouhei (in TOK) 2017/04/26 13:03:44 I forgot why, but we need this.
return it->value->GetModuleScript();
}

Powered by Google App Engine
This is Rietveld 408576698