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

Side by Side Diff: src/debug.h

Issue 2084017: Version 2.2.11... (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 10 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/debug.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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
517 bool is_event_; // Does this message represent a debug event? 517 bool is_event_; // Does this message represent a debug event?
518 DebugEvent event_; // Debug event causing the break. 518 DebugEvent event_; // Debug event causing the break.
519 bool running_; // Will the VM start running after this event? 519 bool running_; // Will the VM start running after this event?
520 Handle<JSObject> exec_state_; // Current execution state. 520 Handle<JSObject> exec_state_; // Current execution state.
521 Handle<JSObject> event_data_; // Data associated with the event. 521 Handle<JSObject> event_data_; // Data associated with the event.
522 Handle<String> response_json_; // Response JSON if message holds a response. 522 Handle<String> response_json_; // Response JSON if message holds a response.
523 v8::Debug::ClientData* client_data_; // Client data passed with the request. 523 v8::Debug::ClientData* client_data_; // Client data passed with the request.
524 }; 524 };
525 525
526 526
527 // Details of the debug event delivered to the debug event listener.
528 class EventDetailsImpl : public v8::Debug::EventDetails {
529 public:
530 EventDetailsImpl(DebugEvent event,
531 Handle<JSObject> exec_state,
532 Handle<JSObject> event_data,
533 Handle<Object> callback_data);
534 virtual DebugEvent GetEvent() const;
535 virtual v8::Handle<v8::Object> GetExecutionState() const;
536 virtual v8::Handle<v8::Object> GetEventData() const;
537 virtual v8::Handle<v8::Context> GetEventContext() const;
538 virtual v8::Handle<v8::Value> GetCallbackData() const;
539 private:
540 DebugEvent event_; // Debug event causing the break.
541 Handle<JSObject> exec_state_; // Current execution state.
542 Handle<JSObject> event_data_; // Data associated with the event.
543 Handle<Object> callback_data_; // User data passed with the callback when
544 // it was registered.
545 };
546
547
527 // Message send by user to v8 debugger or debugger output message. 548 // Message send by user to v8 debugger or debugger output message.
528 // In addition to command text it may contain a pointer to some user data 549 // In addition to command text it may contain a pointer to some user data
529 // which are expected to be passed along with the command reponse to message 550 // which are expected to be passed along with the command reponse to message
530 // handler. 551 // handler.
531 class CommandMessage { 552 class CommandMessage {
532 public: 553 public:
533 static CommandMessage New(const Vector<uint16_t>& command, 554 static CommandMessage New(const Vector<uint16_t>& command,
534 v8::Debug::ClientData* data); 555 v8::Debug::ClientData* data);
535 CommandMessage(); 556 CommandMessage();
536 ~CommandMessage(); 557 ~CommandMessage();
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 return !compiling_natives_ && Debugger::IsDebuggerActive(); 707 return !compiling_natives_ && Debugger::IsDebuggerActive();
687 } 708 }
688 709
689 static void set_compiling_natives(bool compiling_natives) { 710 static void set_compiling_natives(bool compiling_natives) {
690 Debugger::compiling_natives_ = compiling_natives; 711 Debugger::compiling_natives_ = compiling_natives;
691 } 712 }
692 static bool compiling_natives() { return Debugger::compiling_natives_; } 713 static bool compiling_natives() { return Debugger::compiling_natives_; }
693 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } 714 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; }
694 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } 715 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; }
695 716
717 static bool IsDebuggerActive();
718
696 private: 719 private:
697 static bool IsDebuggerActive();
698 static void ListenersChanged(); 720 static void ListenersChanged();
699 721
700 static Mutex* debugger_access_; // Mutex guarding debugger variables. 722 static Mutex* debugger_access_; // Mutex guarding debugger variables.
701 static Handle<Object> event_listener_; // Global handle to listener. 723 static Handle<Object> event_listener_; // Global handle to listener.
702 static Handle<Object> event_listener_data_; 724 static Handle<Object> event_listener_data_;
703 static bool compiling_natives_; // Are we compiling natives? 725 static bool compiling_natives_; // Are we compiling natives?
704 static bool is_loading_debugger_; // Are we loading the debugger? 726 static bool is_loading_debugger_; // Are we loading the debugger?
705 static bool never_unload_debugger_; // Can we unload the debugger? 727 static bool never_unload_debugger_; // Can we unload the debugger?
706 static v8::Debug::MessageHandler2 message_handler_; 728 static v8::Debug::MessageHandler2 message_handler_;
707 static bool debugger_unload_pending_; // Was message handler cleared? 729 static bool debugger_unload_pending_; // Was message handler cleared?
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 927
906 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); 928 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread);
907 }; 929 };
908 930
909 931
910 } } // namespace v8::internal 932 } } // namespace v8::internal
911 933
912 #endif // ENABLE_DEBUGGER_SUPPORT 934 #endif // ENABLE_DEBUGGER_SUPPORT
913 935
914 #endif // V8_DEBUG_H_ 936 #endif // V8_DEBUG_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler-inl.h ('k') | src/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698