| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 * @return {!Array<!JavaScriptCallFrame>} | 246 * @return {!Array<!JavaScriptCallFrame>} |
| 247 */ | 247 */ |
| 248 DebuggerScript.currentCallFrames = function(execState, limit) | 248 DebuggerScript.currentCallFrames = function(execState, limit) |
| 249 { | 249 { |
| 250 var frames = []; | 250 var frames = []; |
| 251 for (var i = 0; i < execState.frameCount() && (!limit || i < limit); ++i) | 251 for (var i = 0; i < execState.frameCount() && (!limit || i < limit); ++i) |
| 252 frames.push(DebuggerScript._frameMirrorToJSCallFrame(execState.frame(i))
); | 252 frames.push(DebuggerScript._frameMirrorToJSCallFrame(execState.frame(i))
); |
| 253 return frames; | 253 return frames; |
| 254 } | 254 } |
| 255 | 255 |
| 256 /** | |
| 257 * @param {!ExecutionState} execState | |
| 258 */ | |
| 259 DebuggerScript.stepIntoStatement = function(execState) | |
| 260 { | |
| 261 execState.prepareStep(Debug.StepAction.StepIn); | |
| 262 } | |
| 263 | |
| 264 /** | |
| 265 * @param {!ExecutionState} execState | |
| 266 */ | |
| 267 DebuggerScript.stepFrameStatement = function(execState) | |
| 268 { | |
| 269 execState.prepareStep(Debug.StepAction.StepFrame); | |
| 270 } | |
| 271 | |
| 272 /** | |
| 273 * @param {!ExecutionState} execState | |
| 274 */ | |
| 275 DebuggerScript.stepOverStatement = function(execState) | |
| 276 { | |
| 277 execState.prepareStep(Debug.StepAction.StepNext); | |
| 278 } | |
| 279 | |
| 280 /** | |
| 281 * @param {!ExecutionState} execState | |
| 282 */ | |
| 283 DebuggerScript.stepOutOfFunction = function(execState) | |
| 284 { | |
| 285 execState.prepareStep(Debug.StepAction.StepOut); | |
| 286 } | |
| 287 | |
| 288 DebuggerScript.clearStepping = function() | |
| 289 { | |
| 290 Debug.clearStepping(); | |
| 291 } | |
| 292 | |
| 293 // Returns array in form: | 256 // Returns array in form: |
| 294 // [ 0, <v8_result_report> ] in case of success | 257 // [ 0, <v8_result_report> ] in case of success |
| 295 // or [ 1, <general_error_message>, <compiler_message>, <line_number>, <column
_number> ] in case of compile error, numbers are 1-based. | 258 // or [ 1, <general_error_message>, <compiler_message>, <line_number>, <column
_number> ] in case of compile error, numbers are 1-based. |
| 296 // or throws exception with message. | 259 // or throws exception with message. |
| 297 /** | 260 /** |
| 298 * @param {number} scriptId | 261 * @param {number} scriptId |
| 299 * @param {string} newSource | 262 * @param {string} newSource |
| 300 * @param {boolean} preview | 263 * @param {boolean} preview |
| 301 * @return {!Array<*>} | 264 * @return {!Array<*>} |
| 302 */ | 265 */ |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 break; | 640 break; |
| 678 } | 641 } |
| 679 return result; | 642 return result; |
| 680 } | 643 } |
| 681 | 644 |
| 682 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. | 645 // We never resolve Mirror by its handle so to avoid memory leaks caused by Mirr
ors in the cache we disable it. |
| 683 ToggleMirrorCache(false); | 646 ToggleMirrorCache(false); |
| 684 | 647 |
| 685 return DebuggerScript; | 648 return DebuggerScript; |
| 686 })(); | 649 })(); |
| OLD | NEW |