OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt
ackTracesStateChanged, this); | 57 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt
ackTracesStateChanged, this); |
58 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged,
this._profilingStateChanged, this); | 58 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged,
this._profilingStateChanged, this); |
59 | 59 |
60 this.enableDebugger(); | 60 this.enableDebugger(); |
61 | 61 |
62 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySk
ipStackFrameSettings, this); | 62 WebInspector.settings.skipStackFramesPattern.addChangeListener(this._applySk
ipStackFrameSettings, this); |
63 this._applySkipStackFrameSettings(); | 63 this._applySkipStackFrameSettings(); |
64 } | 64 } |
65 | 65 |
66 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, functionName: str
ing, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ | 66 /** @typedef {{location: ?WebInspector.DebuggerModel.Location, sourceURL: ?strin
g, functionName: string, scopeChain: (Array.<!DebuggerAgent.Scope>|null)}} */ |
67 WebInspector.DebuggerModel.FunctionDetails; | 67 WebInspector.DebuggerModel.FunctionDetails; |
68 | 68 |
69 /** | 69 /** |
70 * Keep these in sync with WebCore::ScriptDebugServer | 70 * Keep these in sync with WebCore::ScriptDebugServer |
71 * | 71 * |
72 * @enum {string} | 72 * @enum {string} |
73 */ | 73 */ |
74 WebInspector.DebuggerModel.PauseOnExceptionsState = { | 74 WebInspector.DebuggerModel.PauseOnExceptionsState = { |
75 DontPauseOnExceptions : "none", | 75 DontPauseOnExceptions : "none", |
76 PauseOnAllExceptions : "all", | 76 PauseOnAllExceptions : "all", |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 continue; | 557 continue; |
558 if (script.endLine < lineNumber || (script.endLine === lineNumber &&
script.endColumn <= columnNumber)) | 558 if (script.endLine < lineNumber || (script.endLine === lineNumber &&
script.endColumn <= columnNumber)) |
559 continue; | 559 continue; |
560 closestScript = script; | 560 closestScript = script; |
561 break; | 561 break; |
562 } | 562 } |
563 return closestScript ? new WebInspector.DebuggerModel.Location(this.targ
et(), closestScript.scriptId, lineNumber, columnNumber) : null; | 563 return closestScript ? new WebInspector.DebuggerModel.Location(this.targ
et(), closestScript.scriptId, lineNumber, columnNumber) : null; |
564 }, | 564 }, |
565 | 565 |
566 /** | 566 /** |
567 * @param {!DebuggerAgent.ScriptId} scriptId | 567 * @param {?DebuggerAgent.ScriptId} scriptId |
568 * @param {string} sourceUrl | 568 * @param {string} sourceUrl |
569 * @param {number} lineNumber | 569 * @param {number} lineNumber |
570 * @param {number} columnNumber | 570 * @param {number} columnNumber |
571 * @return {?WebInspector.DebuggerModel.Location} | 571 * @return {?WebInspector.DebuggerModel.Location} |
572 */ | 572 */ |
573 createRawLocationByScriptId: function(scriptId, sourceUrl, lineNumber, colum
nNumber) | 573 createRawLocationByScriptId: function(scriptId, sourceUrl, lineNumber, colum
nNumber) |
574 { | 574 { |
575 var script = this.scriptForId(scriptId); | 575 var script = scriptId ? this.scriptForId(scriptId) : null; |
576 return script ? this.createRawLocation(script, lineNumber, columnNumber)
: this.createRawLocationByURL(sourceUrl, lineNumber, columnNumber); | 576 return script ? this.createRawLocation(script, lineNumber, columnNumber)
: this.createRawLocationByURL(sourceUrl, lineNumber, columnNumber); |
577 }, | 577 }, |
578 | 578 |
579 /** | 579 /** |
580 * @return {boolean} | 580 * @return {boolean} |
581 */ | 581 */ |
582 isPaused: function() | 582 isPaused: function() |
583 { | 583 { |
584 return !!this.debuggerPausedDetails(); | 584 return !!this.debuggerPausedDetails(); |
585 }, | 585 }, |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 function didGetDetails(error, response) | 735 function didGetDetails(error, response) |
736 { | 736 { |
737 if (error) { | 737 if (error) { |
738 console.error(error); | 738 console.error(error); |
739 callback(null); | 739 callback(null); |
740 return; | 740 return; |
741 } | 741 } |
742 var location = response.location; | 742 var location = response.location; |
743 var script = this.scriptForId(location.scriptId); | 743 var script = this.scriptForId(location.scriptId); |
744 var rawLocation = script ? this.createRawLocation(script, location.l
ineNumber + 1, location.columnNumber + 1) : null; | 744 var rawLocation = script ? this.createRawLocation(script, location.l
ineNumber + 1, location.columnNumber + 1) : null; |
745 callback({location: rawLocation, functionName: response.functionName
, scopeChain: response.scopeChain || null}); | 745 var sourceURL = script ? script.contentURL() : null; |
| 746 callback({location: rawLocation, sourceURL: sourceURL, functionName:
response.functionName, scopeChain: response.scopeChain || null}); |
746 } | 747 } |
747 }, | 748 }, |
748 | 749 |
749 /** | 750 /** |
750 * @param {!DebuggerAgent.BreakpointId} breakpointId | 751 * @param {!DebuggerAgent.BreakpointId} breakpointId |
751 * @param {function(!WebInspector.Event)} listener | 752 * @param {function(!WebInspector.Event)} listener |
752 * @param {!Object=} thisObject | 753 * @param {!Object=} thisObject |
753 */ | 754 */ |
754 addBreakpointListener: function(breakpointId, listener, thisObject) | 755 addBreakpointListener: function(breakpointId, listener, thisObject) |
755 { | 756 { |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1205 this.asyncStackTrace.dispose(); | 1206 this.asyncStackTrace.dispose(); |
1206 }, | 1207 }, |
1207 | 1208 |
1208 __proto__: WebInspector.SDKObject.prototype | 1209 __proto__: WebInspector.SDKObject.prototype |
1209 } | 1210 } |
1210 | 1211 |
1211 /** | 1212 /** |
1212 * @type {!WebInspector.DebuggerModel} | 1213 * @type {!WebInspector.DebuggerModel} |
1213 */ | 1214 */ |
1214 WebInspector.debuggerModel; | 1215 WebInspector.debuggerModel; |
OLD | NEW |