| OLD | NEW |
| 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 14 matching lines...) Expand all Loading... |
| 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 | 27 |
| 28 #ifndef V8_DEBUG_H_ | 28 #ifndef V8_DEBUG_H_ |
| 29 #define V8_DEBUG_H_ | 29 #define V8_DEBUG_H_ |
| 30 | 30 |
| 31 #include "assembler.h" | 31 #include "assembler.h" |
| 32 #include "debug-agent.h" | 32 #include "debug-agent.h" |
| 33 #include "execution.h" | 33 #include "execution.h" |
| 34 #include "factory.h" | 34 #include "factory.h" |
| 35 #include "flags.h" | |
| 36 #include "hashmap.h" | 35 #include "hashmap.h" |
| 37 #include "platform.h" | 36 #include "platform.h" |
| 38 #include "string-stream.h" | 37 #include "string-stream.h" |
| 39 #include "v8threads.h" | 38 #include "v8threads.h" |
| 40 | 39 |
| 41 #ifdef ENABLE_DEBUGGER_SUPPORT | 40 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 42 #include "../include/v8-debug.h" | 41 #include "../include/v8-debug.h" |
| 43 | 42 |
| 44 namespace v8 { | 43 namespace v8 { |
| 45 namespace internal { | 44 namespace internal { |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 inline static bool EventActive(v8::DebugEvent event) { | 765 inline static bool EventActive(v8::DebugEvent event) { |
| 767 ScopedLock with(debugger_access_); | 766 ScopedLock with(debugger_access_); |
| 768 | 767 |
| 769 // Check whether the message handler was been cleared. | 768 // Check whether the message handler was been cleared. |
| 770 if (debugger_unload_pending_) { | 769 if (debugger_unload_pending_) { |
| 771 if (Debug::debugger_entry() == NULL) { | 770 if (Debug::debugger_entry() == NULL) { |
| 772 UnloadDebugger(); | 771 UnloadDebugger(); |
| 773 } | 772 } |
| 774 } | 773 } |
| 775 | 774 |
| 776 if (((event == v8::BeforeCompile) || (event == v8::AfterCompile)) && | |
| 777 !FLAG_debug_compile_events) { | |
| 778 return false; | |
| 779 | |
| 780 } else if ((event == v8::ScriptCollected) && | |
| 781 !FLAG_debug_script_collected_events) { | |
| 782 return false; | |
| 783 } | |
| 784 | |
| 785 // Currently argument event is not used. | 775 // Currently argument event is not used. |
| 786 return !compiling_natives_ && Debugger::IsDebuggerActive(); | 776 return !compiling_natives_ && Debugger::IsDebuggerActive(); |
| 787 } | 777 } |
| 788 | 778 |
| 789 static void set_compiling_natives(bool compiling_natives) { | 779 static void set_compiling_natives(bool compiling_natives) { |
| 790 Debugger::compiling_natives_ = compiling_natives; | 780 Debugger::compiling_natives_ = compiling_natives; |
| 791 } | 781 } |
| 792 static bool compiling_natives() { return Debugger::compiling_natives_; } | 782 static bool compiling_natives() { return Debugger::compiling_natives_; } |
| 793 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } | 783 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } |
| 794 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } | 784 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1016 | 1006 |
| 1017 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1007 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
| 1018 }; | 1008 }; |
| 1019 | 1009 |
| 1020 | 1010 |
| 1021 } } // namespace v8::internal | 1011 } } // namespace v8::internal |
| 1022 | 1012 |
| 1023 #endif // ENABLE_DEBUGGER_SUPPORT | 1013 #endif // ENABLE_DEBUGGER_SUPPORT |
| 1024 | 1014 |
| 1025 #endif // V8_DEBUG_H_ | 1015 #endif // V8_DEBUG_H_ |
| OLD | NEW |