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

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

Issue 2748503002: [inspector] changed a way of preserving stepping between tasks (Closed)
Patch Set: removed willExecuteScript from tests Created 3 years, 9 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
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/debug/debug.h" 5 #include "src/debug/debug.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "src/api.h" 9 #include "src/api.h"
10 #include "src/arguments.h" 10 #include "src/arguments.h"
(...skipping 2061 matching lines...) Expand 10 before | Expand all | Expand 10 after
2072 } 2072 }
2073 2073
2074 void Debug::SetDebugDelegate(debug::DebugDelegate* delegate, 2074 void Debug::SetDebugDelegate(debug::DebugDelegate* delegate,
2075 bool pass_ownership) { 2075 bool pass_ownership) {
2076 RemoveDebugDelegate(); 2076 RemoveDebugDelegate();
2077 debug_delegate_ = delegate; 2077 debug_delegate_ = delegate;
2078 owns_debug_delegate_ = pass_ownership; 2078 owns_debug_delegate_ = pass_ownership;
2079 UpdateState(); 2079 UpdateState();
2080 } 2080 }
2081 2081
2082 void Debug::HandleCallCompleted() {
2083 if (thread_local_.last_step_action_ == StepOut) {
2084 ClearStepping();
2085 thread_local_.last_step_action_ = StepIn;
2086 UpdateHookOnFunctionCall();
2087 }
2088 }
2089
2082 void Debug::RemoveDebugDelegate() { 2090 void Debug::RemoveDebugDelegate() {
2083 if (debug_delegate_ == nullptr) return; 2091 if (debug_delegate_ == nullptr) return;
2084 if (owns_debug_delegate_) { 2092 if (owns_debug_delegate_) {
2085 owns_debug_delegate_ = false; 2093 owns_debug_delegate_ = false;
2086 delete debug_delegate_; 2094 delete debug_delegate_;
2087 } 2095 }
2088 debug_delegate_ = nullptr; 2096 debug_delegate_ = nullptr;
2089 } 2097 }
2090 2098
2091 void Debug::UpdateState() { 2099 void Debug::UpdateState() {
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2453 isolate_->Throw(*isolate_->factory()->NewEvalError( 2461 isolate_->Throw(*isolate_->factory()->NewEvalError(
2454 MessageTemplate::kNoSideEffectDebugEvaluate)); 2462 MessageTemplate::kNoSideEffectDebugEvaluate));
2455 } 2463 }
2456 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); 2464 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_);
2457 isolate_->debug()->UpdateHookOnFunctionCall(); 2465 isolate_->debug()->UpdateHookOnFunctionCall();
2458 isolate_->debug()->side_effect_check_failed_ = false; 2466 isolate_->debug()->side_effect_check_failed_ = false;
2459 } 2467 }
2460 2468
2461 } // namespace internal 2469 } // namespace internal
2462 } // namespace v8 2470 } // namespace v8
OLDNEW
« no previous file with comments | « src/debug/debug.h ('k') | src/inspector/v8-debugger.h » ('j') | src/inspector/v8-debugger.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698