Changeset 83290 in webkit
- Timestamp:
- Apr 8, 2011 5:36:57 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/http/tests/inspector/debugger-test.js
r82590 r83290 107 107 for (var i = 0; i < callFrames.length; i++) { 108 108 var frame = callFrames[i]; 109 var script = WebInspector.debuggerModel.scriptForSourceID(frame. sourceID);109 var script = WebInspector.debuggerModel.scriptForSourceID(frame.location.sourceID); 110 110 var url; 111 111 if (script) … … 113 113 else 114 114 url = "(internal script)" 115 var s = " " + i + ") " + frame.functionName + " (" + url + ":" + (frame.l ine+ 1) + ")";115 var s = " " + i + ") " + frame.functionName + " (" + url + ":" + (frame.location.lineNumber + 1) + ")"; 116 116 InspectorTest.addResult(s); 117 117 } -
trunk/Source/WebCore/ChangeLog
r83289 r83290 1 2011-04-08 Pavel Feldman <pfeldman@chromium.org> 2 3 Reviewed by Yury Semikhatsky. 4 5 Web Inspector: use "locations" for debugger scripts, "lineNumbers" for the UI elements. 6 https://bugs.webkit.org/show_bug.cgi?id=58118 7 8 This change reuses location for call frames in the protocol + structures script 9 location <-> source lines interaction better. When we need UI columns, we will add 10 them, but we should distinguish between script and UI terms on the type level, not naming. 11 12 * English.lproj/localizedStrings.js: 13 * bindings/v8/DebuggerScript.js: 14 * inspector/InjectedScriptSource.js: 15 * inspector/Inspector.json: 16 * inspector/front-end/CallStackSidebarPane.js: 17 (WebInspector.CallStackSidebarPane.prototype.update.didGetSourceLine): 18 (WebInspector.CallStackSidebarPane.prototype.update): 19 * inspector/front-end/DebuggerPresentationModel.js: 20 (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage.didRequestSourceMapping): 21 (WebInspector.DebuggerPresentationModel.prototype.addConsoleMessage): 22 (WebInspector.DebuggerPresentationModel.prototype.continueToLine): 23 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping): 24 (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger): 25 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded.didRequestSourceMapping): 26 (WebInspector.DebuggerPresentationModel.prototype._breakpointAdded): 27 (WebInspector.PresenationCallFrame): 28 (WebInspector.PresenationCallFrame.prototype.sourceLine.didRequestSourceMapping): 29 (WebInspector.PresenationCallFrame.prototype.sourceLine): 30 * inspector/front-end/ScriptFormatter.js: 31 (WebInspector.ScriptFormatter.locationToPosition): 32 (WebInspector.ScriptFormatter.lineToPosition): 33 * inspector/front-end/ScriptsPanel.js: 34 (WebInspector.ScriptsPanel.prototype._debuggerPaused.else.didGetSourceLocation): 35 (WebInspector.ScriptsPanel.prototype._debuggerPaused): 36 (WebInspector.ScriptsPanel.prototype.showAnchorLocation): 37 (WebInspector.ScriptsPanel.prototype._callFrameSelected.didGetSourceLocation): 38 (WebInspector.ScriptsPanel.prototype._callFrameSelected): 39 * inspector/front-end/SourceFile.js: 40 (WebInspector.SourceMapping.prototype.scriptLocationToSourceLine): 41 (WebInspector.SourceMapping.prototype.sourceLineToScriptLocation): 42 (WebInspector.FormattedSourceMapping.prototype.scriptLocationToSourceLine): 43 (WebInspector.FormattedSourceMapping.prototype.sourceLineToScriptLocation): 44 1 45 2011-04-08 Pavel Podivilov <podivilov@chromium.org> 2 46 -
trunk/Source/WebCore/bindings/v8/DebuggerScript.js
r83190 r83290 92 92 DebuggerScript.setBreakpoint = function(execState, args) 93 93 { 94 var breakId = Debug.setScriptBreakPointById(args.s criptId, args.lineNumber, args.columnNumber, args.condition);94 var breakId = Debug.setScriptBreakPointById(args.sourceID, args.lineNumber, args.columnNumber, args.condition); 95 95 96 96 var locations = Debug.findBreakPointActualLocations(breakId); … … 251 251 "column": location.column, 252 252 "functionName": functionName, 253 "type": "function",254 253 "thisObject": thisObject, 255 254 "scopeChain": scopeChain, -
trunk/Source/WebCore/bindings/v8/ScriptDebugServer.cpp
r83190 r83290 68 68 69 69 v8::Local<v8::Object> args = v8::Object::New(); 70 args->Set(v8::String::New("s criptId"), v8String(sourceID));70 args->Set(v8::String::New("sourceID"), v8String(sourceID)); 71 71 args->Set(v8::String::New("lineNumber"), v8::Integer::New(scriptBreakpoint.lineNumber)); 72 72 args->Set(v8::String::New("columnNumber"), v8::Integer::New(scriptBreakpoint.columnNumber)); -
trunk/Source/WebCore/inspector/InjectedScriptSource.js
r82609 r83290 475 475 { 476 476 this.id = "{\"ordinal\":" + ordinal + ",\"injectedScriptId\":" + injectedScriptId + "}"; 477 this.type = callFrame.type; 478 this.functionName = (this.type === "function" ? callFrame.functionName : ""); 479 this.sourceID = callFrame.sourceID; 480 this.line = callFrame.line; 481 this.column = callFrame.column; 477 this.functionName = (callFrame.type === "function" ? callFrame.functionName : ""); 478 this.location = { sourceID: callFrame.sourceID, lineNumber: callFrame.line, columnNumber: callFrame.column }; 482 479 this.scopeChain = this._wrapScopeChain(callFrame); 483 480 } -
trunk/Source/WebCore/inspector/Inspector.json
r83190 r83290 1233 1233 "sourceID": { "type": "string", "description": "Script identifier as reported by the <code>scriptParsed</code>" }, 1234 1234 "lineNumber": { "type": "integer", "description": "Line number in the script." }, 1235 "columnNumber": { "type": "integer", " description": "Column number in the script." }1235 "columnNumber": { "type": "integer", "optional": true, "description": "Column number in the script." } 1236 1236 }, 1237 1237 "description": "Location in the source code." … … 1242 1242 "properties": { 1243 1243 "id": { "type": "string", "description": "Call frame identifier" }, 1244 "type": { "type": "string", "description": "Call frame type. // FIXME" },1245 1244 "functionName": { "type": "string", "description": "Name of the function called on this frame." }, 1246 "sourceID": { "type": "string", "description": "Script identifier." }, 1247 "line": { "type": "integer", "description": "Line number in the script." }, 1248 "column": { "type": "integer", "description": "Column number in the script." }, 1245 "location": { "$ref": "Location", "description": "Location in the source code." }, 1249 1246 "scopeChain": { "type": "array", "items": { "type": "object" }, "description": "Scope chain for given call frame. // FIXME" } 1250 1247 }, … … 1285 1282 "name": "setBreakpoint", 1286 1283 "parameters": [ 1287 { "name": "sourceId", "type": "string", "description": "Source ID of the resource to set breakpoint on (as reported by <code>scriptParsed</code>)." }, 1288 { "name": "lineNumber", "type": "integer", "description": "Line number to set breakpoint at." }, 1289 { "name": "columnNumber", "type": "integer", "optional": true, "description": "Offset in the line to set breakpoint at." }, 1284 { "name": "location", "$ref": "Location", "description": "Location to set breakpoint in." }, 1290 1285 { "name": "condition", "type": "string", "optional": true, "description": "Expression to use as a breakpoint condition. When specified, debugger will only stop on the breakpoint if this expression evaluates to true." } 1291 1286 ], 1292 1287 "returns": [ 1293 1288 { "name": "breakpointId", "type": "string", "description": "Id of the created breakpoint for further manipulations." }, 1294 { "name": " location", "$ref" : "Location", "description": "Location this breakpoint resolved into." }1289 { "name": "actualLocation", "$ref" : "Location", "description": "Location this breakpoint resolved into." } 1295 1290 ], 1296 1291 "description": "Sets JavaScript breakpoint at a given location." … … 1306 1301 "name": "continueToLocation", 1307 1302 "parameters": [ 1308 { "name": "sourceId", "type": "string", "description": "Source ID of the resource to continue to (as reported by <code>scriptParsed</code>)." }, 1309 { "name": "lineNumber", "type": "integer", "description": "Line number to stop at." }, 1310 { "name": "columnNumber", "type": "integer", "description": "Column number to stop at." } 1303 { "name": "location", "$ref": "Location", "description": "Location to continue to." } 1311 1304 ], 1312 1305 "description": "Continues execution until specific location is reached." -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp
r83190 r83290 175 175 } 176 176 177 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, const String& sourceId, int lineNumber, const int* const optionalColumnNumber, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorObject>* location) 178 { 179 int columnNumber = optionalColumnNumber ? *optionalColumnNumber : 0; 177 static bool parseLocation(ErrorString* errorString, RefPtr<InspectorObject> location, String* sourceId, int* lineNumber, int* columnNumber) 178 { 179 if (!location->getString("sourceID", sourceId) || !location->getNumber("lineNumber", lineNumber)) { 180 // FIXME: replace with input validation. 181 *errorString = "sourceId and lineNumber are required."; 182 return false; 183 } 184 *columnNumber = 0; 185 location->getNumber("columnNumber", columnNumber); 186 return true; 187 } 188 189 void InspectorDebuggerAgent::setBreakpoint(ErrorString* errorString, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* outBreakpointId, RefPtr<InspectorObject>* actualLocation) 190 { 191 String sourceId; 192 int lineNumber; 193 int columnNumber; 194 195 if (!parseLocation(errorString, location, &sourceId, &lineNumber, &columnNumber)) 196 return; 197 180 198 String condition = optionalCondition ? *optionalCondition : ""; 181 199 … … 184 202 return; 185 203 ScriptBreakpoint breakpoint(lineNumber, columnNumber, condition); 186 * location = resolveBreakpoint(breakpointId, sourceId, breakpoint);187 if (* location)204 *actualLocation = resolveBreakpoint(breakpointId, sourceId, breakpoint); 205 if (*actualLocation) 188 206 *outBreakpointId = breakpointId; 189 207 else … … 205 223 } 206 224 207 void InspectorDebuggerAgent::continueToLocation(ErrorString* error , const String& sourceId, int lineNumber, int columnNumber)225 void InspectorDebuggerAgent::continueToLocation(ErrorString* errorString, PassRefPtr<InspectorObject> location) 208 226 { 209 227 if (!m_continueToLocationBreakpointId.isEmpty()) { … … 211 229 m_continueToLocationBreakpointId = ""; 212 230 } 231 232 String sourceId; 233 int lineNumber; 234 int columnNumber; 235 236 if (!parseLocation(errorString, location, &sourceId, &lineNumber, &columnNumber)) 237 return; 238 213 239 ScriptBreakpoint breakpoint(lineNumber, columnNumber, ""); 214 240 m_continueToLocationBreakpointId = scriptDebugServer().setBreakpoint(sourceId, breakpoint, &lineNumber, &columnNumber); 215 resume(error );241 resume(errorString); 216 242 } 217 243 -
trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h
r83190 r83290 82 82 83 83 void setBreakpointByUrl(ErrorString*, const String& url, int lineNumber, const int* const optionalColumnNumber, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorArray>* locations); 84 void setBreakpoint(ErrorString*, const String& sourceId, int lineNumber, const int* const optionalColumnNumber, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorObject>* location);84 void setBreakpoint(ErrorString*, PassRefPtr<InspectorObject> location, const String* const optionalCondition, String* breakpointId, RefPtr<InspectorObject>* actualLocation); 85 85 void removeBreakpoint(ErrorString*, const String& breakpointId); 86 void continueToLocation(ErrorString*, const String& sourceId, int lineNumber, int columnNumber);86 void continueToLocation(ErrorString*, PassRefPtr<InspectorObject> location); 87 87 88 88 void editScriptSource(ErrorString*, const String& sourceID, const String& newContent, RefPtr<InspectorArray>* newCallFrames); -
trunk/Source/WebCore/inspector/front-end/CallStackSidebarPane.js
r82234 r83290 47 47 } 48 48 49 var title;50 var subtitle;51 var script;52 53 49 for (var i = 0; i < callFrames.length; ++i) { 54 50 var callFrame = callFrames[i]; 55 switch (callFrame.type) { 56 case "function": 57 title = callFrame.functionName || WebInspector.UIString("(anonymous function)"); 58 break; 59 case "program": 60 title = WebInspector.UIString("(program)"); 61 break; 62 } 51 var title = callFrame.functionName || WebInspector.UIString("(anonymous function)"); 63 52 64 53 var subtitle; … … 72 61 placard.element.addEventListener("click", this._placardSelected.bind(this, placard), false); 73 62 74 function didGetSourceL ocation(placard, sourceFileId, lineNumber, columnNumber)63 function didGetSourceLine(placard, sourceFileId, lineNumber) 75 64 { 76 65 if (placard.subtitle) … … 80 69 placard._text = WebInspector.UIString("%s() at %s", placard.title, placard.subtitle); 81 70 } 82 callFrame.sourceL ocation(didGetSourceLocation.bind(this, placard));71 callFrame.sourceLine(didGetSourceLine.bind(this, placard)); 83 72 84 73 this.placards.push(placard); -
trunk/Source/WebCore/inspector/front-end/DebuggerModel.js
r83190 r83290 69 69 }, 70 70 71 continueToLocation: function( sourceID, lineNumber, columnNumber)72 { 73 DebuggerAgent.continueToLocation( sourceID, lineNumber, columnNumber);71 continueToLocation: function(location) 72 { 73 DebuggerAgent.continueToLocation(location); 74 74 }, 75 75 … … 93 93 }, 94 94 95 setBreakpointBySourceId: function( sourceID, lineNumber, columnNumber, condition, callback)96 { 97 function didSetBreakpoint(error, breakpointId, location)95 setBreakpointBySourceId: function(location, condition, callback) 96 { 97 function didSetBreakpoint(error, breakpointId, actualLocation) 98 98 { 99 99 if (callback) 100 callback(error ? null : breakpointId, [ location]);101 } 102 DebuggerAgent.setBreakpoint( sourceID, lineNumber, columnNumber, condition, didSetBreakpoint.bind(this));100 callback(error ? null : breakpointId, [actualLocation]); 101 } 102 DebuggerAgent.setBreakpoint(location, condition, didSetBreakpoint.bind(this)); 103 103 }, 104 104 -
trunk/Source/WebCore/inspector/front-end/DebuggerPresentationModel.js
r83289 r83290 236 236 var presentationMessage = {}; 237 237 presentationMessage.sourceFileId = sourceFile.id; 238 presentationMessage.lineNumber = mapping.scriptLocationToSourceL ocation(message.line - 1, 0).lineNumber;238 presentationMessage.lineNumber = mapping.scriptLocationToSourceLine({lineNumber:message.line - 1, columnNumber:0}); 239 239 presentationMessage.originalMessage = message; 240 240 sourceFile.messages.push(presentationMessage); … … 255 255 function didRequestSourceMapping(mapping) 256 256 { 257 var location = mapping.sourceL ocationToScriptLocation(lineNumber, 0);258 WebInspector.debuggerModel.continueToLocation(location .scriptId, location.lineNumber, location.columnNumber);257 var location = mapping.sourceLineToScriptLocation(lineNumber); 258 WebInspector.debuggerModel.continueToLocation(location); 259 259 } 260 260 this._sourceFiles[sourceFileId].requestSourceMapping(didRequestSourceMapping.bind(this)); … … 309 309 function didRequestSourceMapping(mapping) 310 310 { 311 var location = mapping.sourceL ocationToScriptLocation(breakpoint.lineNumber, 0);312 var script = WebInspector.debuggerModel.scriptForSourceID(location.s criptId);311 var location = mapping.sourceLineToScriptLocation(breakpoint.lineNumber); 312 var script = WebInspector.debuggerModel.scriptForSourceID(location.sourceID); 313 313 if (script.sourceURL) 314 314 WebInspector.debuggerModel.setBreakpoint(script.sourceURL, location.lineNumber, location.columnNumber, breakpoint.condition, didSetBreakpoint.bind(this)); 315 else 316 WebInspector.debuggerModel.setBreakpointBySourceId(script.sourceID, location.lineNumber, location.columnNumber, breakpoint.condition, didSetBreakpoint.bind(this)); 315 else { 316 location.sourceID = script.sourceID; 317 WebInspector.debuggerModel.setBreakpointBySourceId(location, breakpoint.condition, didSetBreakpoint.bind(this)); 318 } 317 319 } 318 320 breakpoint.sourceFile.requestSourceMapping(didRequestSourceMapping.bind(this)); … … 406 408 { 407 409 // Refine line number based on resolved location. 408 if (breakpoint.location) { 409 var sourceLocation = mapping.scriptLocationToSourceLocation(breakpoint.location.lineNumber, breakpoint.location.columnNumber); 410 breakpoint.lineNumber = sourceLocation.lineNumber; 411 } 410 if (breakpoint.location) 411 breakpoint.lineNumber = mapping.scriptLocationToSourceLine(breakpoint.location); 412 412 413 413 var existingBreakpoint = this.findBreakpoint(sourceFile.id, breakpoint.lineNumber); … … 501 501 var callFrame = callFrames[i]; 502 502 var sourceFile; 503 var script = WebInspector.debuggerModel.scriptForSourceID(callFrame. sourceID);503 var script = WebInspector.debuggerModel.scriptForSourceID(callFrame.location.sourceID); 504 504 if (script) 505 505 sourceFile = this._sourceFileForScript(script.sourceURL, script.sourceID); … … 634 634 this._index = index; 635 635 this._sourceFile = sourceFile; 636 this._script = WebInspector.debuggerModel.scriptForSourceID(callFrame. sourceID);636 this._script = WebInspector.debuggerModel.scriptForSourceID(callFrame.location.sourceID); 637 637 } 638 638 … … 684 684 }, 685 685 686 sourceL ocation: function(callback)686 sourceLine: function(callback) 687 687 { 688 688 if (!this._sourceFile) { 689 callback(undefined, this._callFrame.l ine, this._callFrame.column);689 callback(undefined, this._callFrame.location.lineNumber); 690 690 return; 691 691 } … … 693 693 function didRequestSourceMapping(mapping) 694 694 { 695 var sourceLocation = mapping.scriptLocationToSourceLocation(this._callFrame.line, this._callFrame.column); 696 callback(this._sourceFile.id, sourceLocation.lineNumber, sourceLocation.columnNumber); 695 callback(this._sourceFile.id, mapping.scriptLocationToSourceLine(this._callFrame.location)); 697 696 } 698 697 this._sourceFile.requestSourceMapping(didRequestSourceMapping.bind(this)); -
trunk/Source/WebCore/inspector/front-end/ScriptFormatter.js
r82103 r83290 37 37 } 38 38 39 WebInspector.ScriptFormatter.locationToPosition = function(lineEndings, l ineNumber, columnNumber)39 WebInspector.ScriptFormatter.locationToPosition = function(lineEndings, location) 40 40 { 41 var position = lineNumber ? lineEndings[lineNumber - 1] + 1 : 0; 42 return position + columnNumber; 41 var position = location.lineNumber ? lineEndings[location.lineNumber - 1] + 1 : 0; 42 return position + location.columnNumber; 43 } 44 45 WebInspector.ScriptFormatter.lineToPosition = function(lineEndings, lineNumber) 46 { 47 return this.locationToPosition(lineEndings, { lineNumber: lineNumber, columnNumber: 0 }); 43 48 } 44 49 … … 59 64 for (var i = 0; i < scripts.length; ++i) { 60 65 var start = { lineNumber: scripts[i].lineOffset, columnNumber: scripts[i].columnOffset }; 61 start.position = WebInspector.ScriptFormatter.locationToPosition(lineEndings, start .lineNumber, start.columnNumber);66 start.position = WebInspector.ScriptFormatter.locationToPosition(lineEndings, start); 62 67 var endPosition = start.position + scripts[i].length; 63 68 var end = WebInspector.ScriptFormatter.positionToLocation(lineEndings, endPosition); -
trunk/Source/WebCore/inspector/front-end/ScriptsPanel.js
r82847 r83290 388 388 } 389 389 } else { 390 function didGetSourceLocation(sourceFileId, lineNumber , columnNumber)390 function didGetSourceLocation(sourceFileId, lineNumber) 391 391 { 392 392 if (!sourceFileId || !this._presentationModel.findBreakpoint(sourceFileId, lineNumber)) … … 395 395 status = WebInspector.UIString("Paused on a JavaScript breakpoint."); 396 396 } 397 callFrames[0].sourceL ocation(didGetSourceLocation.bind(this));397 callFrames[0].sourceLine(didGetSourceLocation.bind(this)); 398 398 } 399 399 if (status) … … 488 488 function didRequestSourceMapping(mapping) 489 489 { 490 var l ocation = mapping.scriptLocationToSourceLocation(anchor.getAttribute("line_number") - 1, 0);491 this._showSourceLine(sourceFile.id, l ocation.lineNumber);490 var lineNumber = mapping.scriptLocationToSourceLine({lineNumber:anchor.getAttribute("line_number") - 1, columnNumber:0}); 491 this._showSourceLine(sourceFile.id, lineNumber); 492 492 } 493 493 var sourceFile = this._presentationModel.sourceFileForScriptURL(anchor.href); … … 622 622 this.sidebarPanes.callstack.selectedCallFrame = this._presentationModel.selectedCallFrame; 623 623 624 function didGetSourceLocation(sourceFileId, lineNumber , columnNumber)624 function didGetSourceLocation(sourceFileId, lineNumber) 625 625 { 626 626 if (!sourceFileId) … … 635 635 this._executionSourceFrame = sourceFrame; 636 636 } 637 callFrame.sourceL ocation(didGetSourceLocation.bind(this));637 callFrame.sourceLine(didGetSourceLocation.bind(this)); 638 638 }, 639 639 -
trunk/Source/WebCore/inspector/front-end/SourceFile.js
r82234 r83290 255 255 256 256 WebInspector.SourceMapping.prototype = { 257 scriptLocationToSourceLocation: function(lineNumber, columnNumber) 258 { 259 return { lineNumber: lineNumber, columnNumber: columnNumber }; 260 }, 261 262 sourceLocationToScriptLocation: function(lineNumber, columnNumber) 263 { 257 scriptLocationToSourceLine: function(location) 258 { 259 return location.lineNumber; 260 }, 261 262 sourceLineToScriptLocation: function(lineNumber) 263 { 264 var columnNumber = 0; 264 265 var closestScript = this._sortedScripts[0]; 265 266 for (var i = 1; i < this._sortedScripts.length; ++i) { … … 269 270 closestScript = script; 270 271 } 271 return { s criptId: closestScript.sourceID, lineNumber: lineNumber, columnNumber: columnNumber };272 return { sourceID: closestScript.sourceID, lineNumber: lineNumber, columnNumber: columnNumber }; 272 273 } 273 274 } … … 282 283 283 284 WebInspector.FormattedSourceMapping.prototype = { 284 scriptLocationToSourceL ocation: function(lineNumber, columnNumber)285 { 286 var originalPosition = WebInspector.ScriptFormatter.locationToPosition(this._originalLineEndings, l ineNumber, columnNumber);285 scriptLocationToSourceLine: function(location) 286 { 287 var originalPosition = WebInspector.ScriptFormatter.locationToPosition(this._originalLineEndings, location); 287 288 var formattedPosition = this._convertPosition(this._mapping.original, this._mapping.formatted, originalPosition); 288 return WebInspector.ScriptFormatter.positionToLocation(this._formattedLineEndings, formattedPosition) ;289 }, 290 291 sourceL ocationToScriptLocation: function(lineNumber, columnNumber)292 { 293 var formattedPosition = WebInspector.ScriptFormatter.l ocationToPosition(this._formattedLineEndings, lineNumber, columnNumber);289 return WebInspector.ScriptFormatter.positionToLocation(this._formattedLineEndings, formattedPosition).lineNumber; 290 }, 291 292 sourceLineToScriptLocation: function(lineNumber) 293 { 294 var formattedPosition = WebInspector.ScriptFormatter.lineToPosition(this._formattedLineEndings, lineNumber); 294 295 var originalPosition = this._convertPosition(this._mapping.formatted, this._mapping.original, formattedPosition); 295 296 var originalLocation = WebInspector.ScriptFormatter.positionToLocation(this._originalLineEndings, originalPosition); 296 return WebInspector.SourceMapping.prototype.sourceL ocationToScriptLocation.call(this, originalLocation.lineNumber, originalLocation.columnNumber);297 return WebInspector.SourceMapping.prototype.sourceLineToScriptLocation.call(this, originalLocation.lineNumber); 297 298 }, 298 299
Note: See TracChangeset
for help on using the changeset viewer.