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

Unified Diff: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js

Issue 2893073002: DevTools: introduce ResourceMapping (Closed)
Patch Set: cleanup test Created 3 years, 7 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
Index: third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
diff --git a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
index 1c9adacc6de6410df41370b2616c992b2b4e0712..059e9dba237c2262af1af485d1b6485763867fcb 100644
--- a/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
+++ b/third_party/WebKit/Source/devtools/front_end/bindings/ResourceScriptMapping.js
@@ -191,7 +191,12 @@ Bindings.ResourceScriptMapping = class {
_workspaceUISourceCodeForScript(script) {
if (script.isAnonymousScript())
return null;
- return Bindings.NetworkProject.uiSourceCodeForScriptURL(this._workspace, script.sourceURL, script);
+ var uiSourceCode = Bindings.NetworkProject.uiSourceCodeForScriptURL(this._workspace, script.sourceURL, script);
+ if (!uiSourceCode) {
+ var resourceBinding = Bindings.ResourceBinding.forTarget(this._debuggerModel.target());
+ uiSourceCode = resourceBinding ? resourceBinding.uiSourceCodeForURL(script.sourceURL) : null;
+ }
+ return uiSourceCode;
}
/**

Powered by Google App Engine
This is Rietveld 408576698