Chromium Code Reviews| Index: third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| diff --git a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| index c1c0279ca26fc9e1d7a8b630dcfa68e2d673ce04..deac2847500b20f1227d3cf851c61fc87e486a35 100644 |
| --- a/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| +++ b/third_party/WebKit/Source/devtools/front_end/components/Linkifier.js |
| @@ -160,19 +160,20 @@ WebInspector.Linkifier.prototype = { |
| * @param {number} lineNumber |
| * @param {number=} columnNumber |
| * @param {string=} classes |
| - * @return {!Element} |
| + * @return {?Element} |
| */ |
| linkifyScriptLocation: function(target, scriptId, sourceURL, lineNumber, columnNumber, classes) |
|
dgozman
2016/07/15 23:24:22
This is used in ConsoleViewMessage._tryFormatAsErr
|
| { |
| - var fallbackAnchor = WebInspector.linkifyResourceAsNode(sourceURL, lineNumber, columnNumber, classes); |
| + var fallbackAnchor = sourceURL ? WebInspector.linkifyResourceAsNode(sourceURL, lineNumber, columnNumber, classes) : null; |
| if (!target || target.isDetached()) |
| return fallbackAnchor; |
| var debuggerModel = WebInspector.DebuggerModel.fromTarget(target); |
| if (!debuggerModel) |
| return fallbackAnchor; |
| - var rawLocation = scriptId ? debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber || 0) : |
| - debuggerModel.createRawLocationByURL(sourceURL, lineNumber, columnNumber || 0); |
| + var rawLocation = scriptId && scriptId !== "0" |
|
dgozman
2016/07/15 23:24:22
Let's rather fix backend to send empty string or b
|
| + ? debuggerModel.createRawLocationByScriptId(scriptId, lineNumber, columnNumber || 0) |
| + : debuggerModel.createRawLocationByURL(sourceURL, lineNumber, columnNumber || 0); |
| if (!rawLocation) |
| return fallbackAnchor; |
| @@ -189,7 +190,7 @@ WebInspector.Linkifier.prototype = { |
| * @param {!WebInspector.DebuggerModel.Location} rawLocation |
| * @param {string} fallbackUrl |
| * @param {string=} classes |
| - * @return {!Element} |
| + * @return {?Element} |
| */ |
| linkifyRawLocation: function(rawLocation, fallbackUrl, classes) |
|
dgozman
2016/07/15 23:24:22
This is used in ObjectPopoverHelper._showObjectPop
|
| { |
| @@ -200,7 +201,7 @@ WebInspector.Linkifier.prototype = { |
| * @param {?WebInspector.Target} target |
| * @param {!RuntimeAgent.CallFrame} callFrame |
| * @param {string=} classes |
| - * @return {!Element} |
| + * @return {?Element} |
| */ |
| linkifyConsoleCallFrame: function(target, callFrame, classes) |
| { |
| @@ -211,7 +212,7 @@ WebInspector.Linkifier.prototype = { |
| * @param {?WebInspector.Target} target |
| * @param {!RuntimeAgent.CallFrame} callFrame |
| * @param {string=} classes |
| - * @return {!Element} |
| + * @return {?Element} |
| */ |
| linkifyConsoleCallFrameForTimeline: function(target, callFrame, classes) |
| { |