Modified: trunk/Source/_javascript_Core/ChangeLog (199200 => 199201)
--- trunk/Source/_javascript_Core/ChangeLog 2016-04-07 23:14:25 UTC (rev 199200)
+++ trunk/Source/_javascript_Core/ChangeLog 2016-04-07 23:28:08 UTC (rev 199201)
@@ -1,3 +1,13 @@
+2016-04-07 Joseph Pecoraro <[email protected]>
+
+ Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
+ https://bugs.webkit.org/show_bug.cgi?id=156371
+
+ Reviewed by Timothy Hatcher.
+
+ * inspector/protocol/ScriptProfiler.json:
+ Clarify that these locations are 1-based.
+
2016-04-07 Jon Davis <[email protected]>
Add Web Animations API to Feature Status Page
Modified: trunk/Source/_javascript_Core/inspector/protocol/ScriptProfiler.json (199200 => 199201)
--- trunk/Source/_javascript_Core/inspector/protocol/ScriptProfiler.json 2016-04-07 23:14:25 UTC (rev 199200)
+++ trunk/Source/_javascript_Core/inspector/protocol/ScriptProfiler.json 2016-04-07 23:28:08 UTC (rev 199201)
@@ -20,8 +20,8 @@
"id": "ExpressionLocation",
"type": "object",
"properties": [
- { "name": "line", "type": "integer" },
- { "name": "column", "type": "integer" }
+ { "name": "line", "type": "integer", "description": "1-based." },
+ { "name": "column", "type": "integer", "description": "1-based." }
]
},
{
@@ -30,8 +30,8 @@
"properties": [
{ "name": "sourceID", "$ref": "Debugger.ScriptId", "description": "Unique script identifier." },
{ "name": "name", "type": "string", "description": "A displayable name for the stack frame. i.e function name, (program), etc." },
- { "name": "line", "type": "integer" },
- { "name": "column", "type": "integer" },
+ { "name": "line", "type": "integer", "description": "-1 if unavailable. 1-based if available." },
+ { "name": "column", "type": "integer", "description": "-1 if unavailable. 1-based if available." },
{ "name": "url", "type": "string" },
{ "name": "expressionLocation", "$ref": "ExpressionLocation", "optional": true }
]
Modified: trunk/Source/WebInspectorUI/ChangeLog (199200 => 199201)
--- trunk/Source/WebInspectorUI/ChangeLog 2016-04-07 23:14:25 UTC (rev 199200)
+++ trunk/Source/WebInspectorUI/ChangeLog 2016-04-07 23:28:08 UTC (rev 199201)
@@ -1,5 +1,16 @@
2016-04-07 Joseph Pecoraro <[email protected]>
+ Web Inspector: ProfileView source links are off by 1 line, worse in pretty printed code
+ https://bugs.webkit.org/show_bug.cgi?id=156371
+
+ Reviewed by Timothy Hatcher.
+
+ * UserInterface/Views/ProfileDataGridNode.js:
+ (WebInspector.ProfileDataGridNode.prototype._displayContent):
+ Switch the 1-based locations in the CCT data structure to 0-based for SourceCodeLocation.
+
+2016-04-07 Joseph Pecoraro <[email protected]>
+
Web Inspector: Uncaught Exception: No resource with given URL found
https://bugs.webkit.org/show_bug.cgi?id=156259
<rdar://problem/25564749>
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js (199200 => 199201)
--- trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js 2016-04-07 23:14:25 UTC (rev 199200)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/ProfileDataGridNode.js 2016-04-07 23:28:08 UTC (rev 199201)
@@ -220,7 +220,8 @@
let script = WebInspector.debuggerManager.scriptForIdentifier(this._node.sourceID);
if (script && script.url && this._node.line >= 0 && this._node.column >= 0) {
- let sourceCodeLocation = script.createSourceCodeLocation(this._node.line, this._node.column);
+ // Convert from 1-based line and column to 0-based.
+ let sourceCodeLocation = script.createSourceCodeLocation(this._node.line - 1, this._node.column - 1);
let locationElement = fragment.appendChild(document.createElement("span"));
locationElement.classList.add("location");