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

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

Issue 1292533003: Debugger: simplify calling into Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 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 | src/debug/debug.cc » ('j') | src/debug/debug.cc » ('J')
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_DEBUG_H_ 5 #ifndef V8_DEBUG_DEBUG_H_
6 #define V8_DEBUG_DEBUG_H_ 6 #define V8_DEBUG_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 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 return is_active() && !debug_context().is_null() && break_id() != 0 && 487 return is_active() && !debug_context().is_null() && break_id() != 0 &&
488 break_id() == id; 488 break_id() == id;
489 } 489 }
490 490
491 // Flags and states. 491 // Flags and states.
492 DebugScope* debugger_entry() { 492 DebugScope* debugger_entry() {
493 return reinterpret_cast<DebugScope*>( 493 return reinterpret_cast<DebugScope*>(
494 base::NoBarrier_Load(&thread_local_.current_debug_scope_)); 494 base::NoBarrier_Load(&thread_local_.current_debug_scope_));
495 } 495 }
496 inline Handle<Context> debug_context() { return debug_context_; } 496 inline Handle<Context> debug_context() { return debug_context_; }
497 inline Handle<Object> debug_utils() {
498 AssertDebugContext();
499 return isolate_->natives_utils_object();
500 }
501 497
502 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } 498 void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; }
503 bool live_edit_enabled() const { 499 bool live_edit_enabled() const {
504 return FLAG_enable_liveedit && live_edit_enabled_ ; 500 return FLAG_enable_liveedit && live_edit_enabled_ ;
505 } 501 }
506 502
507 inline bool is_active() const { return is_active_; } 503 inline bool is_active() const { return is_active_; }
508 inline bool is_loaded() const { return !debug_context_.is_null(); } 504 inline bool is_loaded() const { return !debug_context_.is_null(); }
509 inline bool in_debug_scope() const { 505 inline bool in_debug_scope() const {
510 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_); 506 return !!base::NoBarrier_Load(&thread_local_.current_debug_scope_);
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
546 // Check whether there are commands in the command queue. 542 // Check whether there are commands in the command queue.
547 inline bool has_commands() const { return !command_queue_.IsEmpty(); } 543 inline bool has_commands() const { return !command_queue_.IsEmpty(); }
548 inline bool ignore_events() const { return is_suppressed_ || !is_active_; } 544 inline bool ignore_events() const { return is_suppressed_ || !is_active_; }
549 inline bool break_disabled() const { 545 inline bool break_disabled() const {
550 return break_disabled_ || in_debug_event_listener_; 546 return break_disabled_ || in_debug_event_listener_;
551 } 547 }
552 548
553 void OnException(Handle<Object> exception, Handle<Object> promise); 549 void OnException(Handle<Object> exception, Handle<Object> promise);
554 550
555 // Constructors for debug event objects. 551 // Constructors for debug event objects.
556 MUST_USE_RESULT MaybeHandle<Object> MakeJSObject(
557 const char* constructor_name,
558 int argc,
559 Handle<Object> argv[]);
560 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState(); 552 MUST_USE_RESULT MaybeHandle<Object> MakeExecutionState();
561 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent( 553 MUST_USE_RESULT MaybeHandle<Object> MakeBreakEvent(
562 Handle<Object> break_points_hit); 554 Handle<Object> break_points_hit);
563 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent( 555 MUST_USE_RESULT MaybeHandle<Object> MakeExceptionEvent(
564 Handle<Object> exception, 556 Handle<Object> exception,
565 bool uncaught, 557 bool uncaught,
566 Handle<Object> promise); 558 Handle<Object> promise);
567 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent( 559 MUST_USE_RESULT MaybeHandle<Object> MakeCompileEvent(
568 Handle<Script> script, v8::DebugEvent type); 560 Handle<Script> script, v8::DebugEvent type);
569 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent( 561 MUST_USE_RESULT MaybeHandle<Object> MakePromiseEvent(
(...skipping 23 matching lines...) Expand all
593 void InvokeMessageHandler(MessageImpl message); 585 void InvokeMessageHandler(MessageImpl message);
594 586
595 void ClearOneShot(); 587 void ClearOneShot();
596 void ActivateStepIn(StackFrame* frame); 588 void ActivateStepIn(StackFrame* frame);
597 void ClearStepIn(); 589 void ClearStepIn();
598 void ActivateStepOut(StackFrame* frame); 590 void ActivateStepOut(StackFrame* frame);
599 void ClearStepNext(); 591 void ClearStepNext();
600 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info); 592 void RemoveDebugInfoAndClearFromShared(Handle<DebugInfo> debug_info);
601 Handle<Object> CheckBreakPoints(Handle<Object> break_point); 593 Handle<Object> CheckBreakPoints(Handle<Object> break_point);
602 bool CheckBreakPoint(Handle<Object> break_point_object); 594 bool CheckBreakPoint(Handle<Object> break_point_object);
595 MaybeHandle<Object> CallFunction(const char* name, int argc,
596 Handle<Object> args[]);
603 597
604 inline void AssertDebugContext() { 598 inline void AssertDebugContext() {
605 DCHECK(isolate_->context() == *debug_context()); 599 DCHECK(isolate_->context() == *debug_context());
606 DCHECK(in_debug_scope()); 600 DCHECK(in_debug_scope());
607 } 601 }
608 602
609 void ThreadInit(); 603 void ThreadInit();
610 604
611 // Global handles. 605 // Global handles.
612 Handle<Context> debug_context_; 606 Handle<Context> debug_context_;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 int call_argc = -1); 784 int call_argc = -1);
791 785
792 static void PatchDebugBreakSlot(Address pc, Handle<Code> code); 786 static void PatchDebugBreakSlot(Address pc, Handle<Code> code);
793 static void ClearDebugBreakSlot(Address pc); 787 static void ClearDebugBreakSlot(Address pc);
794 }; 788 };
795 789
796 790
797 } } // namespace v8::internal 791 } } // namespace v8::internal
798 792
799 #endif // V8_DEBUG_DEBUG_H_ 793 #endif // V8_DEBUG_DEBUG_H_
OLDNEW
« no previous file with comments | « no previous file | src/debug/debug.cc » ('j') | src/debug/debug.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698