| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 | 647 |
| 648 // Unload the debugger if possible. Only called when no debugger is currently | 648 // Unload the debugger if possible. Only called when no debugger is currently |
| 649 // active. | 649 // active. |
| 650 static void UnloadDebugger(); | 650 static void UnloadDebugger(); |
| 651 | 651 |
| 652 inline static bool EventActive(v8::DebugEvent event) { | 652 inline static bool EventActive(v8::DebugEvent event) { |
| 653 ScopedLock with(debugger_access_); | 653 ScopedLock with(debugger_access_); |
| 654 | 654 |
| 655 // Check whether the message handler was been cleared. | 655 // Check whether the message handler was been cleared. |
| 656 if (debugger_unload_pending_) { | 656 if (debugger_unload_pending_) { |
| 657 UnloadDebugger(); | 657 if (Debug::debugger_entry() == NULL) { |
| 658 UnloadDebugger(); |
| 659 } |
| 658 } | 660 } |
| 659 | 661 |
| 660 // Currently argument event is not used. | 662 // Currently argument event is not used. |
| 661 return !compiling_natives_ && Debugger::IsDebuggerActive(); | 663 return !compiling_natives_ && Debugger::IsDebuggerActive(); |
| 662 } | 664 } |
| 663 | 665 |
| 664 static void set_compiling_natives(bool compiling_natives) { | 666 static void set_compiling_natives(bool compiling_natives) { |
| 665 Debugger::compiling_natives_ = compiling_natives; | 667 Debugger::compiling_natives_ = compiling_natives; |
| 666 } | 668 } |
| 667 static bool compiling_natives() { return Debugger::compiling_natives_; } | 669 static bool compiling_natives() { return Debugger::compiling_natives_; } |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 857 Debug::AddressId id_; | 859 Debug::AddressId id_; |
| 858 int reg_; | 860 int reg_; |
| 859 }; | 861 }; |
| 860 | 862 |
| 861 | 863 |
| 862 } } // namespace v8::internal | 864 } } // namespace v8::internal |
| 863 | 865 |
| 864 #endif // ENABLE_DEBUGGER_SUPPORT | 866 #endif // ENABLE_DEBUGGER_SUPPORT |
| 865 | 867 |
| 866 #endif // V8_DEBUG_H_ | 868 #endif // V8_DEBUG_H_ |
| OLD | NEW |