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

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js

Issue 2484833003: DevTools: teach automapping to deal with network resources with file:// urls (Closed)
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-absolute-paths-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js b/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
index fb1afe9e43d7de22110db92d657dc949ee61afb8..e1df48b7ffbfa1f950d3749f1b2d119d0511ae97 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/Automapping.js
@@ -198,6 +198,12 @@ WebInspector.Automapping = class {
* @return {!Promise<?WebInspector.PersistenceBinding>}
*/
_createBinding(networkSourceCode) {
+ if (networkSourceCode.url().startsWith('file://')) {
+ var fileSourceCode = this._fileSystemUISourceCodes.get(networkSourceCode.url());
+ var binding = fileSourceCode ? new WebInspector.PersistenceBinding(networkSourceCode, fileSourceCode, false) : null;
+ return Promise.resolve(binding);
+ }
+
var networkPath = WebInspector.ParsedURL.extractPath(networkSourceCode.url());
if (networkPath === null)
return Promise.resolve(/** @type {?WebInspector.PersistenceBinding} */ (null));
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/inspector/persistence/automapping-absolute-paths-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698