Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Side by Side Diff: src/runtime/runtime-debug.cc

Issue 1973213003: [liveedit] fix stepping after replacing bytecode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditbreaks
Patch Set: add another testcase Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/debug/liveedit.cc ('k') | test/mjsunit/debug-liveedit-exceptions.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/debug/liveedit.cc ('k') | test/mjsunit/debug-liveedit-exceptions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698