Index: src/liveedit-debugger.js |
diff --git a/src/liveedit-debugger.js b/src/liveedit-debugger.js |
index 4463c93e2a071acafc2b0ff482d25ceb53f57abb..258d1791155e99b90026dc38e5030b12fcff98b3 100644 |
--- a/src/liveedit-debugger.js |
+++ b/src/liveedit-debugger.js |
@@ -46,6 +46,8 @@ Debug.LiveEdit = new function() { |
// Forward declaration for minifier. |
var FunctionStatus; |
+ |
+ const NEEDS_STEP_IN_PROPERTY_NAME = "stack_update_needs_step_in"; |
Yang
2012/06/14 09:09:28
Do not use const in native javascript.
Peter Rybin
2012/06/14 22:08:03
Done.
|
// Applies the change to the script. |
// The change is in form of list of chunks encoded in a single array as |
@@ -161,7 +163,7 @@ Debug.LiveEdit = new function() { |
// Our current implementation requires client to manually issue "step in" |
// command for correct stack state. |
- preview_description.stack_update_needs_step_in = |
+ preview_description[NEEDS_STEP_IN_PROPERTY_NAME] = |
preview_description.stack_modified; |
// Start with breakpoints. Convert their line/column positions and |
@@ -1077,7 +1079,19 @@ Debug.LiveEdit = new function() { |
return ProcessOldNode(old_code_tree); |
} |
- |
+ |
+ // Restarts call frame and returns value similar to what LiveEdit returns. |
+ function RestartFrame(frame_mirror) { |
+ var result = frame_mirror.restart(); |
+ if (IS_STRING(result)) { |
+ throw Failure("Failed to restrart frame: " + result); |
+ } |
+ var result = {}; |
+ result[NEEDS_STEP_IN_PROPERTY_NAME] = true; |
+ return result; |
+ } |
+ // Function is public. |
+ this.RestartFrame = RestartFrame; |
// Functions are public for tests. |
this.TestApi = { |