OLD | NEW |
---|---|
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 "src/api.h" | 7 #include "src/api.h" |
8 #include "src/arguments.h" | 8 #include "src/arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2209 Handle<Object>(debug_context()->global_proxy(), isolate_), | 2209 Handle<Object>(debug_context()->global_proxy(), isolate_), |
2210 arraysize(argv), | 2210 arraysize(argv), |
2211 argv); | 2211 argv); |
2212 } | 2212 } |
2213 | 2213 |
2214 | 2214 |
2215 void Debug::HandleDebugBreak() { | 2215 void Debug::HandleDebugBreak() { |
2216 // Ignore debug break during bootstrapping. | 2216 // Ignore debug break during bootstrapping. |
2217 if (isolate_->bootstrapper()->IsActive()) return; | 2217 if (isolate_->bootstrapper()->IsActive()) return; |
2218 // Just continue if breaks are disabled. | 2218 // Just continue if breaks are disabled. |
2219 if (break_disabled()) return; | 2219 if (break_disabled() || |
2220 (!break_points_active_ && thread_local_.last_step_action_ == StepNone)) | |
Yang
2016/02/12 05:56:23
Why do we need to check last_step_action_? Steppin
kozy
2016/02/12 17:22:04
Hm ,thank you for explanation. I thought that this
| |
2221 return; | |
2220 // Ignore debug break if debugger is not active. | 2222 // Ignore debug break if debugger is not active. |
2221 if (!is_active()) return; | 2223 if (!is_active()) return; |
2222 | 2224 |
2223 StackLimitCheck check(isolate_); | 2225 StackLimitCheck check(isolate_); |
2224 if (check.HasOverflowed()) return; | 2226 if (check.HasOverflowed()) return; |
2225 | 2227 |
2226 { JavaScriptFrameIterator it(isolate_); | 2228 { JavaScriptFrameIterator it(isolate_); |
2227 DCHECK(!it.done()); | 2229 DCHECK(!it.done()); |
2228 Object* fun = it.frame()->function(); | 2230 Object* fun = it.frame()->function(); |
2229 if (fun && fun->IsJSFunction()) { | 2231 if (fun && fun->IsJSFunction()) { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2569 } | 2571 } |
2570 | 2572 |
2571 | 2573 |
2572 void LockingCommandMessageQueue::Clear() { | 2574 void LockingCommandMessageQueue::Clear() { |
2573 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2575 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2574 queue_.Clear(); | 2576 queue_.Clear(); |
2575 } | 2577 } |
2576 | 2578 |
2577 } // namespace internal | 2579 } // namespace internal |
2578 } // namespace v8 | 2580 } // namespace v8 |
OLD | NEW |