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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 }, | 309 }, |
310 | 310 |
311 selectedCallFrameId: function() | 311 selectedCallFrameId: function() |
312 { | 312 { |
313 var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame; | 313 var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame; |
314 if (!selectedCallFrame) | 314 if (!selectedCallFrame) |
315 return null; | 315 return null; |
316 return selectedCallFrame.id; | 316 return selectedCallFrame.id; |
317 }, | 317 }, |
318 | 318 |
319 evaluateInSelectedCallFrame: function(code, updateInterface, objectGroup, ca
llback) | 319 evaluateInSelectedCallFrame: function(code, updateInterface, objectGroup, in
cludeCommandLineAPI, callback) |
320 { | 320 { |
321 var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame; | 321 var selectedCallFrame = this.sidebarPanes.callstack.selectedCallFrame; |
322 if (!this._paused || !selectedCallFrame) | 322 if (!this._paused || !selectedCallFrame) |
323 return; | 323 return; |
324 | 324 |
325 if (typeof updateInterface === "undefined") | 325 if (typeof updateInterface === "undefined") |
326 updateInterface = true; | 326 updateInterface = true; |
327 | 327 |
328 var self = this; | |
329 function updatingCallbackWrapper(result) | 328 function updatingCallbackWrapper(result) |
330 { | 329 { |
331 callback(result); | 330 if (result) { |
332 if (updateInterface) | 331 callback(WebInspector.RemoteObject.fromPayload(result)); |
333 self.sidebarPanes.scopechain.update(selectedCallFrame); | 332 if (updateInterface) |
| 333 this.sidebarPanes.scopechain.update(selectedCallFrame); |
| 334 } |
334 } | 335 } |
335 this.doEvalInCallFrame(selectedCallFrame, code, objectGroup, updatingCal
lbackWrapper); | 336 InspectorBackend.evaluateOnCallFrame(selectedCallFrame.id, code, objectG
roup, includeCommandLineAPI, updatingCallbackWrapper.bind(this)); |
336 }, | |
337 | |
338 doEvalInCallFrame: function(callFrame, code, objectGroup, callback) | |
339 { | |
340 function evalCallback(result) | |
341 { | |
342 if (result) | |
343 callback(WebInspector.RemoteObject.fromPayload(result)); | |
344 } | |
345 InspectorBackend.evaluateOnCallFrame(callFrame.id, code, objectGroup, ev
alCallback); | |
346 }, | 337 }, |
347 | 338 |
348 _debuggerPaused: function(event) | 339 _debuggerPaused: function(event) |
349 { | 340 { |
350 var callFrames = event.data.callFrames; | 341 var callFrames = event.data.callFrames; |
351 | 342 |
352 this._paused = true; | 343 this._paused = true; |
353 this._waitingToPause = false; | 344 this._waitingToPause = false; |
354 this._stepping = false; | 345 this._stepping = false; |
355 | 346 |
(...skipping 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1036 | 1027 |
1037 showGoToLineDialog: function(e) | 1028 showGoToLineDialog: function(e) |
1038 { | 1029 { |
1039 var view = this.visibleView; | 1030 var view = this.visibleView; |
1040 if (view) | 1031 if (view) |
1041 WebInspector.GoToLineDialog.show(view); | 1032 WebInspector.GoToLineDialog.show(view); |
1042 } | 1033 } |
1043 } | 1034 } |
1044 | 1035 |
1045 WebInspector.ScriptsPanel.prototype.__proto__ = WebInspector.Panel.prototype; | 1036 WebInspector.ScriptsPanel.prototype.__proto__ = WebInspector.Panel.prototype; |
OLD | NEW |