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 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
663 // Blocks until the agent has started listening for connections | 663 // Blocks until the agent has started listening for connections |
664 static void WaitForAgent(); | 664 static void WaitForAgent(); |
665 | 665 |
666 static void CallMessageDispatchHandler(); | 666 static void CallMessageDispatchHandler(); |
667 | 667 |
668 static Handle<Context> GetDebugContext(); | 668 static Handle<Context> GetDebugContext(); |
669 | 669 |
670 // Unload the debugger if possible. Only called when no debugger is currently | 670 // Unload the debugger if possible. Only called when no debugger is currently |
671 // active. | 671 // active. |
672 static void UnloadDebugger(); | 672 static void UnloadDebugger(); |
| 673 friend void ForceUnloadDebugger(); // In test-debug.cc |
673 | 674 |
674 inline static bool EventActive(v8::DebugEvent event) { | 675 inline static bool EventActive(v8::DebugEvent event) { |
675 ScopedLock with(debugger_access_); | 676 ScopedLock with(debugger_access_); |
676 | 677 |
677 // Check whether the message handler was been cleared. | 678 // Check whether the message handler was been cleared. |
678 if (debugger_unload_pending_) { | 679 if (debugger_unload_pending_) { |
679 if (Debug::debugger_entry() == NULL) { | 680 if (Debug::debugger_entry() == NULL) { |
680 UnloadDebugger(); | 681 UnloadDebugger(); |
681 } | 682 } |
682 } | 683 } |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
904 | 905 |
905 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 906 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
906 }; | 907 }; |
907 | 908 |
908 | 909 |
909 } } // namespace v8::internal | 910 } } // namespace v8::internal |
910 | 911 |
911 #endif // ENABLE_DEBUGGER_SUPPORT | 912 #endif // ENABLE_DEBUGGER_SUPPORT |
912 | 913 |
913 #endif // V8_DEBUG_H_ | 914 #endif // V8_DEBUG_H_ |
OLD | NEW |