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

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

Issue 573473002: DevTools: [source maps] do not consider missing target files in workspace an error. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/bindings/CompilerScriptMapping.js
diff --git a/Source/devtools/front_end/bindings/CompilerScriptMapping.js b/Source/devtools/front_end/bindings/CompilerScriptMapping.js
index 5eec05f1c3d5debc6f5f7ff5d5fc92304b8965fa..a88d1e8f1be6ba9e1c618ac96a545f311bc32575 100644
--- a/Source/devtools/front_end/bindings/CompilerScriptMapping.js
+++ b/Source/devtools/front_end/bindings/CompilerScriptMapping.js
@@ -149,6 +149,7 @@ WebInspector.CompilerScriptMapping.prototype = {
this._scriptForSourceMap.set(sourceMap, script);
var sourceURLs = sourceMap.sources();
+ var missingSources = [];
for (var i = 0; i < sourceURLs.length; ++i) {
var sourceURL = sourceURLs[i];
if (this._sourceMapForURL.get(sourceURL))
@@ -159,11 +160,21 @@ WebInspector.CompilerScriptMapping.prototype = {
this._networkWorkspaceBinding.addFileForURL(sourceURL, contentProvider, script.isContentScript());
}
var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL);
- if (uiSourceCode)
+ if (uiSourceCode) {
this._bindUISourceCode(uiSourceCode);
- else
- WebInspector.console.error(WebInspector.UIString("Failed to locate workspace file mapped to URL %s from source map %s", sourceURL, sourceMap.url()));
+ } else {
+ if (missingSources.length < 3)
+ missingSources.push(sourceURL);
+ else if (missingSources.peekLast() !== "\u2026")
+ missingSources.push("\u2026");
+ }
+ }
+ if (missingSources.length) {
+ WebInspector.console.warn(
+ WebInspector.UIString("Source map %s points to the files missing from the workspace: [%s]",
+ sourceMap.url(), missingSources.join(", ")));
}
+
this._debuggerWorkspaceBinding.updateLocations(script);
}
},
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698