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(); |
} |