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

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: Address aandrey's comments #2 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
« no previous file with comments | « Source/devtools/front_end/sdk/DOMModel.js ('k') | Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 74d1216a2166dc7a4110e4cb9eb0f04ba86654d2..057b1705bb337459d099b83ddba9a320c27441ac 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;
/**
@@ -550,7 +550,7 @@ WebInspector.DebuggerModel.prototype = {
},
/**
- * @param {!DebuggerAgent.ScriptId} scriptId
+ * @param {?DebuggerAgent.ScriptId} scriptId
* @param {string} sourceUrl
* @param {number} lineNumber
* @param {number} columnNumber
@@ -558,23 +558,11 @@ 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);
},
/**
- * @param {!ConsoleAgent.CallFrame} callFrame
- * @return {!WebInspector.DebuggerModel.Location}
- */
- createRawLocationByConsoleCallFrame: function(callFrame)
- {
- // FIXME(62725): console stack trace line/column numbers are one-based.
- var lineNumber = callFrame.lineNumber ? callFrame.lineNumber - 1 : 0;
- var columnNumber = callFrame.columnNumber ? callFrame.columnNumber - 1 : 0;
- return new WebInspector.DebuggerModel.Location(this.target(), callFrame.scriptId, lineNumber, columnNumber);
- },
-
- /**
* @return {boolean}
*/
isPaused: function()
@@ -740,7 +728,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});
}
},
« no previous file with comments | « Source/devtools/front_end/sdk/DOMModel.js ('k') | Source/devtools/front_end/sdk/InspectorBackend.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698