Commit 9615c43b authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

DevTools: [source maps] do not consider missing target files in workspace an error.

BUG=413987

Review URL: https://codereview.chromium.org/573473002

git-svn-id: svn://svn.chromium.org/blink/trunk@181951 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent bb6a330b
...@@ -149,6 +149,7 @@ WebInspector.CompilerScriptMapping.prototype = { ...@@ -149,6 +149,7 @@ WebInspector.CompilerScriptMapping.prototype = {
this._scriptForSourceMap.set(sourceMap, script); this._scriptForSourceMap.set(sourceMap, script);
var sourceURLs = sourceMap.sources(); var sourceURLs = sourceMap.sources();
var missingSources = [];
for (var i = 0; i < sourceURLs.length; ++i) { for (var i = 0; i < sourceURLs.length; ++i) {
var sourceURL = sourceURLs[i]; var sourceURL = sourceURLs[i];
if (this._sourceMapForURL.get(sourceURL)) if (this._sourceMapForURL.get(sourceURL))
...@@ -159,11 +160,21 @@ WebInspector.CompilerScriptMapping.prototype = { ...@@ -159,11 +160,21 @@ WebInspector.CompilerScriptMapping.prototype = {
this._networkWorkspaceBinding.addFileForURL(sourceURL, contentProvider, script.isContentScript()); this._networkWorkspaceBinding.addFileForURL(sourceURL, contentProvider, script.isContentScript());
} }
var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL); var uiSourceCode = this._workspace.uiSourceCodeForURL(sourceURL);
if (uiSourceCode) if (uiSourceCode) {
this._bindUISourceCode(uiSourceCode); this._bindUISourceCode(uiSourceCode);
else } else {
WebInspector.console.error(WebInspector.UIString("Failed to locate workspace file mapped to URL %s from source map %s", sourceURL, sourceMap.url())); 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); this._debuggerWorkspaceBinding.updateLocations(script);
} }
}, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment