Chromium Code Reviews| Index: Source/devtools/front_end/Script.js |
| diff --git a/Source/devtools/front_end/Script.js b/Source/devtools/front_end/Script.js |
| index 0aba66624ca288314ff867fe64972bec3938ac52..cc75aa0d00886bdb0c55c95fe0f875f869d2ad8c 100644 |
| --- a/Source/devtools/front_end/Script.js |
| +++ b/Source/devtools/front_end/Script.js |
| @@ -306,3 +306,17 @@ WebInspector.Script.Location.prototype = { |
| __proto__: WebInspector.LiveLocation.prototype |
| } |
| + |
| +/** |
| + * @param {string} scriptId |
| + * @param {number} lineNumber |
| + * @param {number=} columnNumber |
| + */ |
| +WebInspector.Script.liveLocationText = function(scriptId, lineNumber, columnNumber) |
|
pfeldman
2014/03/26 14:13:13
This should be on a Linkifier.
|
| +{ |
| + var script = WebInspector.debuggerModel.scriptForId(scriptId); |
| + if (!script) |
| + return ""; |
| + var uiLocation = script.rawLocationToUILocation(lineNumber, columnNumber); |
| + return uiLocation.linkText(); |
| +} |