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

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

Issue 2860993002: [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (Closed)
Patch Set: update Modulator.h comment too 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModuleMap.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea685c364e41b72adcecbe5c4afa28caeeee8a35..f5e15a513c5b63fa00ea937407b0c4897aa9da42 100644
--- a/third_party/WebKit/Source/core/dom/ModuleMap.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleMap.cpp
@@ -96,7 +96,6 @@ void ModuleMap::Entry::NotifyNewSingleModuleFinished(
}
ModuleScript* ModuleMap::Entry::GetModuleScript() const {
- DCHECK(!is_fetching_);
return module_script_.Get();
}
@@ -146,7 +145,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;
return it->value->GetModuleScript();
}
« no previous file with comments | « third_party/WebKit/Source/core/dom/ModuleMap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698