Index: src/runtime/runtime-debug.cc |
diff --git a/src/runtime/runtime-debug.cc b/src/runtime/runtime-debug.cc |
index 631f5e8153e82538bfc19c170749b78ce836f504..d5cfaf363014ebc041dc7b0d08eea7e00d68d6f1 100644 |
--- a/src/runtime/runtime-debug.cc |
+++ b/src/runtime/runtime-debug.cc |
@@ -18,7 +18,7 @@ namespace internal { |
RUNTIME_FUNCTION(Runtime_DebugBreak) { |
SealHandleScope shs(isolate); |
- DCHECK(args.length() == 0); |
+ DCHECK(args.length() == 1); |
// Get the top-most JavaScript frame. |
JavaScriptFrameIterator it(isolate); |
isolate->debug()->Break(args, it.frame()); |
@@ -591,31 +591,7 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) { |
// to the frame information. |
Handle<Object> return_value = isolate->factory()->undefined_value(); |
if (at_return) { |
- StackFrameIterator it2(isolate); |
- Address internal_frame_sp = NULL; |
- while (!it2.done()) { |
- if (it2.frame()->is_internal()) { |
- internal_frame_sp = it2.frame()->sp(); |
- } else { |
- if (it2.frame()->is_java_script()) { |
- if (it2.frame()->id() == it.frame()->id()) { |
- // The internal frame just before the JavaScript frame contains the |
- // value to return on top. A debug break at return will create an |
- // internal frame to store the return value (eax/rax/r0) before |
- // entering the debug break exit frame. |
- if (internal_frame_sp != NULL) { |
- return_value = |
- Handle<Object>(Memory::Object_at(internal_frame_sp), isolate); |
- break; |
- } |
- } |
- } |
- |
- // Indicate that the previous frame was not an internal frame. |
- internal_frame_sp = NULL; |
- } |
- it2.Advance(); |
- } |
+ return_value = isolate->debug()->get_return_value(); |
} |
// Now advance to the arguments adapter frame (if any). It contains all |