OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 | 351 |
352 this.sidebarPanes.jsBreakpoints.removeBreakpoint(breakpoint.sourceFileId
, breakpoint.lineNumber); | 352 this.sidebarPanes.jsBreakpoints.removeBreakpoint(breakpoint.sourceFileId
, breakpoint.lineNumber); |
353 }, | 353 }, |
354 | 354 |
355 evaluateInSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, callback) | 355 evaluateInSelectedCallFrame: function(code, objectGroup, includeCommandLineA
PI, callback) |
356 { | 356 { |
357 var selectedCallFrame = this._presentationModel.selectedCallFrame; | 357 var selectedCallFrame = this._presentationModel.selectedCallFrame; |
358 selectedCallFrame.evaluate(code, objectGroup, includeCommandLineAPI, cal
lback); | 358 selectedCallFrame.evaluate(code, objectGroup, includeCommandLineAPI, cal
lback); |
359 }, | 359 }, |
360 | 360 |
| 361 getSelectedCallFrameVariables: function(callback) |
| 362 { |
| 363 var result = { this: true }; |
| 364 |
| 365 var selectedCallFrame = this._presentationModel.selectedCallFrame; |
| 366 if (!selectedCallFrame) |
| 367 callback(result); |
| 368 |
| 369 var pendingRequests = 0; |
| 370 |
| 371 function propertiesCollected(properties) |
| 372 { |
| 373 for (var i = 0; properties && i < properties.length; ++i) |
| 374 result[properties[i].name] = true; |
| 375 if (--pendingRequests == 0) |
| 376 callback(result); |
| 377 } |
| 378 |
| 379 for (var i = 0; i < selectedCallFrame.scopeChain.length; ++i) { |
| 380 var scope = selectedCallFrame.scopeChain[i]; |
| 381 var object = WebInspector.RemoteObject.fromPayload(scope.object); |
| 382 pendingRequests++; |
| 383 object.getAllProperties(propertiesCollected); |
| 384 } |
| 385 }, |
| 386 |
361 _debuggerPaused: function(event) | 387 _debuggerPaused: function(event) |
362 { | 388 { |
363 var callFrames = event.data.callFrames; | 389 var callFrames = event.data.callFrames; |
364 var details = event.data.details; | 390 var details = event.data.details; |
365 | 391 |
366 this._paused = true; | 392 this._paused = true; |
367 this._waitingToPause = false; | 393 this._waitingToPause = false; |
368 this._stepping = false; | 394 this._stepping = false; |
369 | 395 |
370 this._updateDebuggerButtons(); | 396 this._updateDebuggerButtons(); |
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1093 this._model.toggleFormatSourceFiles(); | 1119 this._model.toggleFormatSourceFiles(); |
1094 }, | 1120 }, |
1095 | 1121 |
1096 formatSourceFilesToggled: function() | 1122 formatSourceFilesToggled: function() |
1097 { | 1123 { |
1098 return this._model.formatSourceFilesToggled(); | 1124 return this._model.formatSourceFilesToggled(); |
1099 } | 1125 } |
1100 } | 1126 } |
1101 | 1127 |
1102 WebInspector.SourceFrameDelegateForScriptsPanel.prototype.__proto__ = WebInspect
or.SourceFrameDelegate.prototype; | 1128 WebInspector.SourceFrameDelegateForScriptsPanel.prototype.__proto__ = WebInspect
or.SourceFrameDelegate.prototype; |
OLD | NEW |