OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/runtime/runtime-utils.h" | 5 #include "src/runtime/runtime-utils.h" |
6 | 6 |
7 #include "src/arguments.h" | 7 #include "src/arguments.h" |
8 #include "src/debug/debug-evaluate.h" | 8 #include "src/debug/debug-evaluate.h" |
9 #include "src/debug/debug-frames.h" | 9 #include "src/debug/debug-frames.h" |
10 #include "src/debug/debug-scopes.h" | 10 #include "src/debug/debug-scopes.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 RUNTIME_FUNCTION(Runtime_DebugBreakOnBytecode) { | 35 RUNTIME_FUNCTION(Runtime_DebugBreakOnBytecode) { |
36 SealHandleScope shs(isolate); | 36 SealHandleScope shs(isolate); |
37 DCHECK(args.length() == 1); | 37 DCHECK(args.length() == 1); |
38 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); | 38 CONVERT_ARG_HANDLE_CHECKED(Object, value, 0); |
39 isolate->debug()->set_return_value(value); | 39 isolate->debug()->set_return_value(value); |
40 | 40 |
41 // Get the top-most JavaScript frame. | 41 // Get the top-most JavaScript frame. |
42 JavaScriptFrameIterator it(isolate); | 42 JavaScriptFrameIterator it(isolate); |
43 isolate->debug()->Break(it.frame()); | 43 isolate->debug()->Break(it.frame()); |
44 | 44 |
| 45 // If live-edit has dropped frames, we are not going back to dispatch. |
| 46 if (LiveEdit::SetAfterBreakTarget(isolate->debug())) return Smi::FromInt(0); |
| 47 |
45 // Return the handler from the original bytecode array. | 48 // Return the handler from the original bytecode array. |
46 DCHECK(it.frame()->is_interpreted()); | 49 DCHECK(it.frame()->is_interpreted()); |
47 InterpretedFrame* interpreted_frame = | 50 InterpretedFrame* interpreted_frame = |
48 reinterpret_cast<InterpretedFrame*>(it.frame()); | 51 reinterpret_cast<InterpretedFrame*>(it.frame()); |
49 SharedFunctionInfo* shared = interpreted_frame->function()->shared(); | 52 SharedFunctionInfo* shared = interpreted_frame->function()->shared(); |
50 BytecodeArray* bytecode_array = shared->bytecode_array(); | 53 BytecodeArray* bytecode_array = shared->bytecode_array(); |
51 int bytecode_offset = interpreted_frame->GetBytecodeOffset(); | 54 int bytecode_offset = interpreted_frame->GetBytecodeOffset(); |
52 interpreter::Bytecode bytecode = | 55 interpreter::Bytecode bytecode = |
53 interpreter::Bytecodes::FromByte(bytecode_array->get(bytecode_offset)); | 56 interpreter::Bytecodes::FromByte(bytecode_array->get(bytecode_offset)); |
54 return isolate->interpreter()->GetBytecodeHandler( | 57 return isolate->interpreter()->GetBytecodeHandler( |
(...skipping 1490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1545 return Smi::FromInt(isolate->debug()->is_active()); | 1548 return Smi::FromInt(isolate->debug()->is_active()); |
1546 } | 1549 } |
1547 | 1550 |
1548 | 1551 |
1549 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { | 1552 RUNTIME_FUNCTION(Runtime_DebugBreakInOptimizedCode) { |
1550 UNIMPLEMENTED(); | 1553 UNIMPLEMENTED(); |
1551 return NULL; | 1554 return NULL; |
1552 } | 1555 } |
1553 } // namespace internal | 1556 } // namespace internal |
1554 } // namespace v8 | 1557 } // namespace v8 |
OLD | NEW |