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

Unified Diff: gin/modules/module_runner_delegate.cc

Issue 90203002: [Mojo] Remove static "bootstrap" state in mojo_js (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CHECK, CHECK, CHECK Created 7 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
« no previous file with comments | « gin/modules/module_runner_delegate.h ('k') | mojo/apps/js/bootstrap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/modules/module_runner_delegate.cc
diff --git a/gin/modules/module_runner_delegate.cc b/gin/modules/module_runner_delegate.cc
index 9e0b762cadc67d27a339c64c930ffd6e403cd769..9bf2863c203dcd3a9b7b2a3a7c129578f7f13259 100644
--- a/gin/modules/module_runner_delegate.cc
+++ b/gin/modules/module_runner_delegate.cc
@@ -21,6 +21,13 @@ void ModuleRunnerDelegate::AddBuiltinModule(const std::string& id,
builtin_modules_[id] = templ;
}
+void ModuleRunnerDelegate::AttemptToLoadMoreModules(Runner* runner) {
+ ModuleRegistry* registry = ModuleRegistry::From(runner->context());
+ registry->AttemptToLoadMoreModules(runner->isolate());
+ module_provider_.AttempToLoadModules(
+ runner, registry->unsatisfied_dependencies());
+}
+
v8::Handle<v8::ObjectTemplate> ModuleRunnerDelegate::GetGlobalTemplate(
Runner* runner) {
v8::Handle<v8::ObjectTemplate> templ = v8::ObjectTemplate::New();
@@ -42,10 +49,7 @@ void ModuleRunnerDelegate::DidCreateContext(Runner* runner) {
}
void ModuleRunnerDelegate::DidRunScript(Runner* runner) {
- ModuleRegistry* registry = ModuleRegistry::From(runner->context());
- registry->AttemptToLoadMoreModules(runner->isolate());
- module_provider_.AttempToLoadModules(
- runner, registry->unsatisfied_dependencies());
+ AttemptToLoadMoreModules(runner);
}
} // namespace gin
« no previous file with comments | « gin/modules/module_runner_delegate.h ('k') | mojo/apps/js/bootstrap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698