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

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

Issue 404953004: DevTools: Refactor linkifyRawLocation to use fallback url (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/devtools/front_end/sdk/DebuggerModel.js
diff --git a/Source/devtools/front_end/sdk/DebuggerModel.js b/Source/devtools/front_end/sdk/DebuggerModel.js
index a5f6b746b3e60f92f6fb401a0f67f75062f487ad..ad2d5f5d0064b2e0cafe0a70e7667e38da378eb8 100644
--- a/Source/devtools/front_end/sdk/DebuggerModel.js
+++ b/Source/devtools/front_end/sdk/DebuggerModel.js
@@ -63,7 +63,7 @@ WebInspector.DebuggerModel = function(target)
this._applySkipStackFrameSettings();
}
-/** @typedef {{location: ?WebInspector.DebuggerModel.Location, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */
+/** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?string, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */
WebInspector.DebuggerModel.FunctionDetails;
/**
@@ -564,7 +564,7 @@ WebInspector.DebuggerModel.prototype = {
},
/**
- * @param {!DebuggerAgent.ScriptId} scriptId
+ * @param {?DebuggerAgent.ScriptId} scriptId
* @param {string} sourceUrl
* @param {number} lineNumber
* @param {number} columnNumber
@@ -572,7 +572,7 @@ WebInspector.DebuggerModel.prototype = {
*/
createRawLocationByScriptId: function(scriptId, sourceUrl, lineNumber, columnNumber)
{
- var script = this.scriptForId(scriptId);
+ var script = scriptId ? this.scriptForId(scriptId) : null;
return script ? this.createRawLocation(script, lineNumber, columnNumber) : this.createRawLocationByURL(sourceUrl, lineNumber, columnNumber);
},
@@ -742,7 +742,8 @@ WebInspector.DebuggerModel.prototype = {
var location = response.location;
var script = this.scriptForId(location.scriptId);
var rawLocation = script ? this.createRawLocation(script, location.lineNumber + 1, location.columnNumber + 1) : null;
- callback({location: rawLocation, functionName: response.functionName, scopeChain: response.scopeChain || null});
+ var sourceURL = script ? script.contentURL() : null;
+ callback({location: rawLocation, sourceURL: sourceURL, functionName: response.functionName, scopeChain: response.scopeChain || null});
}
},

Powered by Google App Engine
This is Rietveld 408576698