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 <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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
889 break_points_hit->Shrink(break_points_hit_count); | 889 break_points_hit->Shrink(break_points_hit_count); |
890 return break_points_hit; | 890 return break_points_hit; |
891 } | 891 } |
892 | 892 |
893 void Debug::PrepareStepIn(Handle<JSFunction> function) { | 893 void Debug::PrepareStepIn(Handle<JSFunction> function) { |
894 CHECK(last_step_action() >= StepIn); | 894 CHECK(last_step_action() >= StepIn); |
895 if (ignore_events()) return; | 895 if (ignore_events()) return; |
896 if (in_debug_scope()) return; | 896 if (in_debug_scope()) return; |
897 if (break_disabled()) return; | 897 if (break_disabled()) return; |
898 Handle<SharedFunctionInfo> shared(function->shared()); | 898 Handle<SharedFunctionInfo> shared(function->shared()); |
899 if (IsBlackboxed(shared)) return; | 899 if (IsBlackboxed(shared)) { |
900 EnsureDebugInfo(shared); | |
Yang
2017/03/31 07:20:42
We don't want a DebugInfo, since we are not going
| |
901 return; | |
902 } | |
900 if (*function == thread_local_.ignore_step_into_function_) return; | 903 if (*function == thread_local_.ignore_step_into_function_) return; |
901 thread_local_.ignore_step_into_function_ = Smi::kZero; | 904 thread_local_.ignore_step_into_function_ = Smi::kZero; |
902 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_)); | 905 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_)); |
903 } | 906 } |
904 | 907 |
905 void Debug::PrepareStepInSuspendedGenerator() { | 908 void Debug::PrepareStepInSuspendedGenerator() { |
906 CHECK(has_suspended_generator()); | 909 CHECK(has_suspended_generator()); |
907 if (ignore_events()) return; | 910 if (ignore_events()) return; |
908 if (in_debug_scope()) return; | 911 if (in_debug_scope()) return; |
909 if (break_disabled()) return; | 912 if (break_disabled()) return; |
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2495 isolate_->Throw(*isolate_->factory()->NewEvalError( | 2498 isolate_->Throw(*isolate_->factory()->NewEvalError( |
2496 MessageTemplate::kNoSideEffectDebugEvaluate)); | 2499 MessageTemplate::kNoSideEffectDebugEvaluate)); |
2497 } | 2500 } |
2498 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); | 2501 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); |
2499 isolate_->debug()->UpdateHookOnFunctionCall(); | 2502 isolate_->debug()->UpdateHookOnFunctionCall(); |
2500 isolate_->debug()->side_effect_check_failed_ = false; | 2503 isolate_->debug()->side_effect_check_failed_ = false; |
2501 } | 2504 } |
2502 | 2505 |
2503 } // namespace internal | 2506 } // namespace internal |
2504 } // namespace v8 | 2507 } // namespace v8 |
OLD | NEW |