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

Unified Diff: Source/devtools/front_end/sdk/CompilerScriptMapping.js

Issue 373743003: DevTools: Add support for adding source map to a script from the DevTools window. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined Created 6 years, 5 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/sdk/ResourceScriptMapping.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/sdk/CompilerScriptMapping.js
diff --git a/Source/devtools/front_end/sdk/CompilerScriptMapping.js b/Source/devtools/front_end/sdk/CompilerScriptMapping.js
index 6e011be461f7ac7c7ce76d4252187aa7c411f194..24ee4983662fa6e89a48fa38977ff978021bb31a 100644
--- a/Source/devtools/front_end/sdk/CompilerScriptMapping.js
+++ b/Source/devtools/front_end/sdk/CompilerScriptMapping.js
@@ -107,6 +107,24 @@ WebInspector.CompilerScriptMapping.prototype = {
addScript: function(script)
{
script.pushSourceMapping(this);
+ script.addEventListener(WebInspector.Script.Events.SourceMapURLAdded, this._sourceMapURLAdded.bind(this));
+ this._processScript(script);
+ },
+
+ /**
+ * @param {!WebInspector.Event} event
+ */
+ _sourceMapURLAdded: function(event)
+ {
+ var script = /** @type {!WebInspector.Script} */ (event.target);
+ this._processScript(script);
+ },
+
+ /**
+ * @param {!WebInspector.Script} script
+ */
+ _processScript: function(script)
+ {
this.loadSourceMapForScript(script, sourceMapLoaded.bind(this));
/**
« no previous file with comments | « Source/devtools/devtools.gypi ('k') | Source/devtools/front_end/sdk/ResourceScriptMapping.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698