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

Side by Side Diff: src/debug.h

Issue 1247743002: Debugger: fix crash when debugger is enabled between parsing and compiling. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: added assertion Created 5 years, 5 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 | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('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 #ifndef V8_DEBUG_H_ 5 #ifndef V8_DEBUG_H_
6 #define V8_DEBUG_H_ 6 #define V8_DEBUG_H_
7 7
8 #include "src/allocation.h" 8 #include "src/allocation.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/assembler.h" 10 #include "src/assembler.h"
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 void FreeThreadResources() { } 486 void FreeThreadResources() { }
487 487
488 // Record function from which eval was called. 488 // Record function from which eval was called.
489 static void RecordEvalCaller(Handle<Script> script); 489 static void RecordEvalCaller(Handle<Script> script);
490 490
491 bool CheckExecutionState(int id) { 491 bool CheckExecutionState(int id) {
492 return is_active() && !debug_context().is_null() && break_id() != 0 && 492 return is_active() && !debug_context().is_null() && break_id() != 0 &&
493 break_id() == id; 493 break_id() == id;
494 } 494 }
495 495
496 bool RequiresEagerCompilation(bool allows_lazy_without_ctx = false) {
497 return LiveEditFunctionTracker::IsActive(isolate_) ||
498 (is_active() && !allows_lazy_without_ctx);
499 }
500
501 // Flags and states. 496 // Flags and states.
502 DebugScope* debugger_entry() { 497 DebugScope* debugger_entry() {
503 return reinterpret_cast<DebugScope*>( 498 return reinterpret_cast<DebugScope*>(
504 base::NoBarrier_Load(&thread_local_.current_debug_scope_)); 499 base::NoBarrier_Load(&thread_local_.current_debug_scope_));
505 } 500 }
506 inline Handle<Context> debug_context() { return debug_context_; } 501 inline Handle<Context> debug_context() { return debug_context_; }
507 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } 502 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; }
508 bool live_edit_enabled() const { 503 bool live_edit_enabled() const {
509 return FLAG_enable_liveedit && live_edit_enabled_ ; 504 return FLAG_enable_liveedit && live_edit_enabled_ ;
510 } 505 }
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 int call_argc = -1); 797 int call_argc = -1);
803 798
804 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); 799 static void PatchDebugBreakSlot(Address pc, Handle<Code> code);
805 static void ClearDebugBreakSlot(Address pc); 800 static void ClearDebugBreakSlot(Address pc);
806 }; 801 };
807 802
808 803
809 } } // namespace v8::internal 804 } } // namespace v8::internal
810 805
811 #endif // V8_DEBUG_H_ 806 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698