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 905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
916 // Skip step_count frames starting with the current one. | 916 // Skip step_count frames starting with the current one. |
917 while (step_count-- > 0 && !frames_it.done()) { | 917 while (step_count-- > 0 && !frames_it.done()) { |
918 frames_it.Advance(); | 918 frames_it.Advance(); |
919 } | 919 } |
920 } else { | 920 } else { |
921 DCHECK(location.IsReturn()); | 921 DCHECK(location.IsReturn()); |
922 frames_it.Advance(); | 922 frames_it.Advance(); |
923 } | 923 } |
924 // Skip native and extension functions on the stack. | 924 // Skip native and extension functions on the stack. |
925 while (!frames_it.done() && | 925 while (!frames_it.done() && |
926 !frames_it.frame()->function()->IsSubjectToDebugging()) { | 926 !frames_it.frame()->function()->shared()->IsSubjectToDebugging()) { |
927 frames_it.Advance(); | 927 frames_it.Advance(); |
928 } | 928 } |
929 // Step out: If there is a JavaScript caller frame, we need to | 929 // Step out: If there is a JavaScript caller frame, we need to |
930 // flood it with breakpoints. | 930 // flood it with breakpoints. |
931 if (!frames_it.done()) { | 931 if (!frames_it.done()) { |
932 // Fill the function to return to with one-shot break points. | 932 // Fill the function to return to with one-shot break points. |
933 JSFunction* function = frames_it.frame()->function(); | 933 JSFunction* function = frames_it.frame()->function(); |
934 FloodWithOneShot(Handle<JSFunction>(function)); | 934 FloodWithOneShot(Handle<JSFunction>(function)); |
935 // Set target frame pointer. | 935 // Set target frame pointer. |
936 ActivateStepOut(frames_it.frame()); | 936 ActivateStepOut(frames_it.frame()); |
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2237 if (!is_active()) return; | 2237 if (!is_active()) return; |
2238 | 2238 |
2239 StackLimitCheck check(isolate_); | 2239 StackLimitCheck check(isolate_); |
2240 if (check.HasOverflowed()) return; | 2240 if (check.HasOverflowed()) return; |
2241 | 2241 |
2242 { JavaScriptFrameIterator it(isolate_); | 2242 { JavaScriptFrameIterator it(isolate_); |
2243 DCHECK(!it.done()); | 2243 DCHECK(!it.done()); |
2244 Object* fun = it.frame()->function(); | 2244 Object* fun = it.frame()->function(); |
2245 if (fun && fun->IsJSFunction()) { | 2245 if (fun && fun->IsJSFunction()) { |
2246 // Don't stop in builtin functions. | 2246 // Don't stop in builtin functions. |
2247 if (!JSFunction::cast(fun)->IsSubjectToDebugging()) return; | 2247 if (!JSFunction::cast(fun)->shared()->IsSubjectToDebugging()) return; |
2248 JSGlobalObject* global = | 2248 JSGlobalObject* global = |
2249 JSFunction::cast(fun)->context()->global_object(); | 2249 JSFunction::cast(fun)->context()->global_object(); |
2250 // Don't stop in debugger functions. | 2250 // Don't stop in debugger functions. |
2251 if (IsDebugGlobal(global)) return; | 2251 if (IsDebugGlobal(global)) return; |
2252 } | 2252 } |
2253 } | 2253 } |
2254 | 2254 |
2255 // Collect the break state before clearing the flags. | 2255 // Collect the break state before clearing the flags. |
2256 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && | 2256 bool debug_command_only = isolate_->stack_guard()->CheckDebugCommand() && |
2257 !isolate_->stack_guard()->CheckDebugBreak(); | 2257 !isolate_->stack_guard()->CheckDebugBreak(); |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2581 } | 2581 } |
2582 | 2582 |
2583 | 2583 |
2584 void LockingCommandMessageQueue::Clear() { | 2584 void LockingCommandMessageQueue::Clear() { |
2585 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2585 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2586 queue_.Clear(); | 2586 queue_.Clear(); |
2587 } | 2587 } |
2588 | 2588 |
2589 } // namespace internal | 2589 } // namespace internal |
2590 } // namespace v8 | 2590 } // namespace v8 |
OLD | NEW |