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

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

Issue 2886123002: Revert of [ES6 modules] ModuleMap::GetFetchedModuleScript to return nullptr when entry not found / "fetching" (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
« 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 f5e15a513c5b63fa00ea937407b0c4897aa9da42..ea685c364e41b72adcecbe5c4afa28caeeee8a35 100644
--- a/third_party/WebKit/Source/core/dom/ModuleMap.cpp
+++ b/third_party/WebKit/Source/core/dom/ModuleMap.cpp
@@ -96,6 +96,7 @@
}
ModuleScript* ModuleMap::Entry::GetModuleScript() const {
+ DCHECK(!is_fetching_);
return module_script_.Get();
}
@@ -145,8 +146,7 @@
ModuleScript* ModuleMap::GetFetchedModuleScript(const KURL& url) const {
MapImpl::const_iterator it = map_.find(url);
- if (it == map_.end())
- return nullptr;
+ CHECK_NE(it, map_.end());
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