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

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

Issue 2782783003: [inspector] deoptimize function in Debug::PrepareStepIn
Patch Set: ensure compilation before deoptimization Created 3 years, 8 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
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 if (!Compiler::Compile(function, Compiler::KEEP_EXCEPTION)) return;
901 Deoptimizer::DeoptimizeFunction(*function);
902 return;
903 }
900 if (*function == thread_local_.ignore_step_into_function_) return; 904 if (*function == thread_local_.ignore_step_into_function_) return;
901 thread_local_.ignore_step_into_function_ = Smi::kZero; 905 thread_local_.ignore_step_into_function_ = Smi::kZero;
902 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_)); 906 FloodWithOneShot(Handle<SharedFunctionInfo>(function->shared(), isolate_));
903 } 907 }
904 908
905 void Debug::PrepareStepInSuspendedGenerator() { 909 void Debug::PrepareStepInSuspendedGenerator() {
906 CHECK(has_suspended_generator()); 910 CHECK(has_suspended_generator());
907 if (ignore_events()) return; 911 if (ignore_events()) return;
908 if (in_debug_scope()) return; 912 if (in_debug_scope()) return;
909 if (break_disabled()) return; 913 if (break_disabled()) return;
(...skipping 1585 matching lines...) Expand 10 before | Expand all | Expand 10 after
2495 isolate_->Throw(*isolate_->factory()->NewEvalError( 2499 isolate_->Throw(*isolate_->factory()->NewEvalError(
2496 MessageTemplate::kNoSideEffectDebugEvaluate)); 2500 MessageTemplate::kNoSideEffectDebugEvaluate));
2497 } 2501 }
2498 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_); 2502 isolate_->set_needs_side_effect_check(old_needs_side_effect_check_);
2499 isolate_->debug()->UpdateHookOnFunctionCall(); 2503 isolate_->debug()->UpdateHookOnFunctionCall();
2500 isolate_->debug()->side_effect_check_failed_ = false; 2504 isolate_->debug()->side_effect_check_failed_ = false;
2501 } 2505 }
2502 2506
2503 } // namespace internal 2507 } // namespace internal
2504 } // namespace v8 2508 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/inspector/inspector.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698