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

Unified Diff: src/debug/liveedit.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/liveedit.cc
diff --git a/src/debug/liveedit.cc b/src/debug/liveedit.cc
index de0eaef76b8b0e11ba549d9507afcb3958b9b46b..ec85689a710aab697a343c33a89d8510e1350d32 100644
--- a/src/debug/liveedit.cc
+++ b/src/debug/liveedit.cc
@@ -1121,6 +1121,11 @@ void LiveEdit::ReplaceFunctionCode(
DCHECK(old_code->kind() == Code::FUNCTION);
ReplaceCodeObject(old_code, new_code);
}
+ if (shared_info->HasDebugInfo()) {
+ // Existing break points will be re-applied. Reset the debug info here.
+ isolate->debug()->RemoveDebugInfoAndClearFromShared(
+ handle(shared_info->GetDebugInfo()));
+ }
Handle<Object> code_scope_info = compile_info_wrapper.GetCodeScopeInfo();
if (code_scope_info->IsFixedArray()) {
shared_info->set_scope_info(ScopeInfo::cast(*code_scope_info));
@@ -1820,7 +1825,8 @@ static const char* DropActivationsInActiveThreadImpl(Isolate* isolate,
// Adjust break_frame after some frames has been dropped.
StackFrame::Id new_id = StackFrame::NO_ID;
for (int i = bottom_js_frame_index + 1; i < frames.length(); i++) {
- if (frames[i]->type() == StackFrame::JAVA_SCRIPT) {
+ if (frames[i]->type() == StackFrame::JAVA_SCRIPT ||
+ frames[i]->type() == StackFrame::INTERPRETED) {
new_id = frames[i]->id();
break;
}
« no previous file with comments | « no previous file | src/runtime/runtime-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698