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

Unified Diff: src/debug/debug.cc

Issue 1491743005: [debugger] do not predict step in target for liveedit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@liveeditstep
Patch Set: do not prepare stepping if we are not in the debugger Created 5 years 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 | « src/debug/debug.h ('k') | src/debug/ia32/debug-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/debug/debug.cc
diff --git a/src/debug/debug.cc b/src/debug/debug.cc
index d3f3b905151a02ab82f5d626353ad30b487522db..5f623f6b26aa11a1e5405a981ae60f2d17737947 100644
--- a/src/debug/debug.cc
+++ b/src/debug/debug.cc
@@ -336,7 +336,6 @@ void Debug::ThreadInit() {
// TODO(isolates): frames_are_dropped_?
base::NoBarrier_Store(&thread_local_.current_debug_scope_,
static_cast<base::AtomicWord>(0));
- thread_local_.restarter_frame_function_pointer_ = NULL;
}
@@ -828,18 +827,6 @@ void Debug::PrepareStep(StepAction step_action,
DCHECK(in_debug_scope());
- // Remember this step action and count.
- thread_local_.last_step_action_ = step_action;
- STATIC_ASSERT(StepFrame > StepIn);
- thread_local_.step_in_enabled_ = (step_action >= StepIn);
- if (step_action == StepOut) {
- // For step out target frame will be found on the stack so there is no need
- // to set step counter for it. It's expected to always be 0 for StepOut.
- thread_local_.step_count_ = 0;
- } else {
- thread_local_.step_count_ = step_count;
- }
-
// Get the frame where the execution has stopped and skip the debug frame if
// any. The debug frame will only be present if execution was stopped due to
// hitting a break point. In other situations (e.g. unhandled exception) the
@@ -857,6 +844,18 @@ void Debug::PrepareStep(StepAction step_action,
feature_tracker()->Track(DebugFeatureTracker::kStepping);
+ // Remember this step action and count.
+ thread_local_.last_step_action_ = step_action;
+ STATIC_ASSERT(StepFrame > StepIn);
+ thread_local_.step_in_enabled_ = (step_action >= StepIn);
+ if (step_action == StepOut) {
+ // For step out target frame will be found on the stack so there is no need
+ // to set step counter for it. It's expected to always be 0 for StepOut.
+ thread_local_.step_count_ = 0;
+ } else {
+ thread_local_.step_count_ = step_count;
+ }
+
// First of all ensure there is one-shot break points in the top handler
// if any.
FloodHandlerWithOneShot();
@@ -931,17 +930,6 @@ void Debug::PrepareStep(StepAction step_action,
return;
}
- STATIC_ASSERT(StepFrame > StepIn);
- if (step_action >= StepIn) {
- // If there's restarter frame on top of the stack, just get the pointer
- // to function which is going to be restarted.
- if (thread_local_.restarter_frame_function_pointer_ != NULL) {
- Handle<JSFunction> restarted_function(
- JSFunction::cast(*thread_local_.restarter_frame_function_pointer_));
- FloodWithOneShot(restarted_function);
- }
- }
-
// Fill the current function with one-shot break points even for step in on
// a call target as the function called might be a native function for
// which step in will not stop. It also prepares for stepping in
@@ -1049,6 +1037,7 @@ void Debug::ClearStepping() {
thread_local_.step_count_ = 0;
thread_local_.last_step_action_ = StepNone;
+ thread_local_.step_in_enabled_ = false;
thread_local_.last_statement_position_ = RelocInfo::kNoPosition;
thread_local_.last_fp_ = 0;
}
@@ -1522,14 +1511,11 @@ bool Debug::IsBreakAtReturn(JavaScriptFrame* frame) {
void Debug::FramesHaveBeenDropped(StackFrame::Id new_break_frame_id,
- LiveEdit::FrameDropMode mode,
- Object** restarter_frame_function_pointer) {
+ LiveEdit::FrameDropMode mode) {
if (mode != LiveEdit::CURRENTLY_SET_MODE) {
thread_local_.frame_drop_mode_ = mode;
}
thread_local_.break_frame_id_ = new_break_frame_id;
- thread_local_.restarter_frame_function_pointer_ =
- restarter_frame_function_pointer;
}
« no previous file with comments | « src/debug/debug.h ('k') | src/debug/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698