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

Unified Diff: Source/devtools/front_end/Runtime.js

Issue 451713002: DevTools: Introduce module initializers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 4 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 | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/audits/AuditsPanel.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/Runtime.js
diff --git a/Source/devtools/front_end/Runtime.js b/Source/devtools/front_end/Runtime.js
index 767552393e2ed7560b68c6aa3c839d0d03923817..364bbd560b9ee49e243a06b0429720969de0c042 100644
--- a/Source/devtools/front_end/Runtime.js
+++ b/Source/devtools/front_end/Runtime.js
@@ -116,6 +116,15 @@ var Runtime = function(descriptors)
this._descriptorsMap[descriptors[i]["name"]] = descriptors[i];
}
+/**
+ * @param {string} moduleName
+ * @return {!Worker}
+ */
+Runtime.startWorker = function(moduleName)
+{
+ return new Worker(moduleName + "/_module.js");
+}
+
Runtime.prototype = {
/**
* @param {!Array.<string>} configuration
@@ -434,9 +443,8 @@ Runtime.Module.prototype = {
var dependencies = this._descriptor.dependencies;
for (var i = 0; dependencies && i < dependencies.length; ++i)
this._manager.loadModule(dependencies[i]);
- var scripts = this._descriptor.scripts;
- for (var i = 0; scripts && i < scripts.length; ++i)
- loadScript(this._name + "/" + scripts[i]);
+ if (this._descriptor.scripts)
+ loadScript(this._name + "/_module.js");
this._isLoading = false;
this._loaded = true;
}
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/audits/AuditsPanel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698