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" |
35 #include "hashmap.h" | 36 #include "hashmap.h" |
36 #include "platform.h" | 37 #include "platform.h" |
37 #include "string-stream.h" | 38 #include "string-stream.h" |
38 #include "v8threads.h" | 39 #include "v8threads.h" |
39 | 40 |
40 #ifdef ENABLE_DEBUGGER_SUPPORT | 41 #ifdef ENABLE_DEBUGGER_SUPPORT |
41 #include "../include/v8-debug.h" | 42 #include "../include/v8-debug.h" |
42 | 43 |
43 namespace v8 { | 44 namespace v8 { |
44 namespace internal { | 45 namespace internal { |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 inline static bool EventActive(v8::DebugEvent event) { | 766 inline static bool EventActive(v8::DebugEvent event) { |
766 ScopedLock with(debugger_access_); | 767 ScopedLock with(debugger_access_); |
767 | 768 |
768 // Check whether the message handler was been cleared. | 769 // Check whether the message handler was been cleared. |
769 if (debugger_unload_pending_) { | 770 if (debugger_unload_pending_) { |
770 if (Debug::debugger_entry() == NULL) { | 771 if (Debug::debugger_entry() == NULL) { |
771 UnloadDebugger(); | 772 UnloadDebugger(); |
772 } | 773 } |
773 } | 774 } |
774 | 775 |
| 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 |
775 // Currently argument event is not used. | 785 // Currently argument event is not used. |
776 return !compiling_natives_ && Debugger::IsDebuggerActive(); | 786 return !compiling_natives_ && Debugger::IsDebuggerActive(); |
777 } | 787 } |
778 | 788 |
779 static void set_compiling_natives(bool compiling_natives) { | 789 static void set_compiling_natives(bool compiling_natives) { |
780 Debugger::compiling_natives_ = compiling_natives; | 790 Debugger::compiling_natives_ = compiling_natives; |
781 } | 791 } |
782 static bool compiling_natives() { return Debugger::compiling_natives_; } | 792 static bool compiling_natives() { return Debugger::compiling_natives_; } |
783 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } | 793 static void set_loading_debugger(bool v) { is_loading_debugger_ = v; } |
784 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } | 794 static bool is_loading_debugger() { return Debugger::is_loading_debugger_; } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 | 1016 |
1007 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1017 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
1008 }; | 1018 }; |
1009 | 1019 |
1010 | 1020 |
1011 } } // namespace v8::internal | 1021 } } // namespace v8::internal |
1012 | 1022 |
1013 #endif // ENABLE_DEBUGGER_SUPPORT | 1023 #endif // ENABLE_DEBUGGER_SUPPORT |
1014 | 1024 |
1015 #endif // V8_DEBUG_H_ | 1025 #endif // V8_DEBUG_H_ |
OLD | NEW |