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

Unified Diff: gin/modules/module_registry.cc

Issue 757703002: Creates a JavaScript Applicaiton (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Changes per review feedback Created 6 years, 1 month 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: gin/modules/module_registry.cc
diff --git a/gin/modules/module_registry.cc b/gin/modules/module_registry.cc
index a92a5461af1a20910415b32111118ce73e9a136c..8341337829d18dc3b08d72a052cc5b345b233b8f 100644
--- a/gin/modules/module_registry.cc
+++ b/gin/modules/module_registry.cc
@@ -168,6 +168,12 @@ void ModuleRegistry::LoadModule(Isolate* isolate,
return;
}
waiting_callbacks_.insert(std::make_pair(id, callback));
+
+ for (size_t i = 0; i < pending_modules_.size(); ++i) {
+ if (pending_modules_[i]->id == id)
+ return;
+ }
+
unsatisfied_dependencies_.insert(id);
}
« no previous file with comments | « examples/js/world.js ('k') | services/js/BUILD.gn » ('j') | services/js/js_app_shell.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698