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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 } | 724 } |
725 // Remove all debug info. | 725 // Remove all debug info. |
726 while (debug_info_list_ != NULL) { | 726 while (debug_info_list_ != NULL) { |
727 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info()); | 727 RemoveDebugInfoAndClearFromShared(debug_info_list_->debug_info()); |
728 } | 728 } |
729 } | 729 } |
730 | 730 |
731 | 731 |
732 void Debug::FloodWithOneShot(Handle<JSFunction> function, | 732 void Debug::FloodWithOneShot(Handle<JSFunction> function, |
733 BreakLocatorType type) { | 733 BreakLocatorType type) { |
734 if (!function->shared()->IsSubjectToDebugging()) { | |
735 // Builtin functions are not subject to stepping, but need to be | |
736 // deoptimized, because optimized code does not check for debug | |
737 // step in at call sites. | |
738 Deoptimizer::DeoptimizeFunction(*function); | |
739 return; | |
740 } | |
741 // Make sure the function is compiled and has set up the debug info. | 734 // Make sure the function is compiled and has set up the debug info. |
742 Handle<SharedFunctionInfo> shared(function->shared()); | 735 Handle<SharedFunctionInfo> shared(function->shared()); |
743 if (!EnsureDebugInfo(shared, function)) { | 736 if (!EnsureDebugInfo(shared, function)) { |
744 // Return if we failed to retrieve the debug info. | 737 // Return if we failed to retrieve the debug info. |
745 return; | 738 return; |
746 } | 739 } |
747 | 740 |
748 // Flood the function with break points. | 741 // Flood the function with break points. |
749 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); | 742 Handle<DebugInfo> debug_info(shared->GetDebugInfo()); |
750 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) { | 743 for (BreakLocation::Iterator it(debug_info, type); !it.Done(); it.Next()) { |
(...skipping 1858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2609 } | 2602 } |
2610 | 2603 |
2611 | 2604 |
2612 void LockingCommandMessageQueue::Clear() { | 2605 void LockingCommandMessageQueue::Clear() { |
2613 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2606 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2614 queue_.Clear(); | 2607 queue_.Clear(); |
2615 } | 2608 } |
2616 | 2609 |
2617 } // namespace internal | 2610 } // namespace internal |
2618 } // namespace v8 | 2611 } // namespace v8 |
OLD | NEW |