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 2115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2126 Handle<Object>::cast(event_data).location(), | 2126 Handle<Object>::cast(event_data).location(), |
2127 event_listener_data_.location() }; | 2127 event_listener_data_.location() }; |
2128 Handle<Object> result = Execution::TryCall(fun, Top::global(), | 2128 Handle<Object> result = Execution::TryCall(fun, Top::global(), |
2129 argc, argv, &caught_exception); | 2129 argc, argv, &caught_exception); |
2130 // Silently ignore exceptions from debug event listeners. | 2130 // Silently ignore exceptions from debug event listeners. |
2131 } | 2131 } |
2132 } | 2132 } |
2133 } | 2133 } |
2134 | 2134 |
2135 | 2135 |
| 2136 Handle<Context> Debugger::GetDebugContext() { |
| 2137 never_unload_debugger_ = true; |
| 2138 EnterDebugger debugger; |
| 2139 return Debug::debug_context(); |
| 2140 } |
| 2141 |
| 2142 |
2136 void Debugger::UnloadDebugger() { | 2143 void Debugger::UnloadDebugger() { |
2137 // Make sure that there are no breakpoints left. | 2144 // Make sure that there are no breakpoints left. |
2138 Debug::ClearAllBreakPoints(); | 2145 Debug::ClearAllBreakPoints(); |
2139 | 2146 |
2140 // Unload the debugger if feasible. | 2147 // Unload the debugger if feasible. |
2141 if (!never_unload_debugger_) { | 2148 if (!never_unload_debugger_) { |
2142 Debug::Unload(); | 2149 Debug::Unload(); |
2143 } | 2150 } |
2144 | 2151 |
2145 // Clear the flag indicating that the debugger should be unloaded. | 2152 // Clear the flag indicating that the debugger should be unloaded. |
(...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2795 { | 2802 { |
2796 Locker locker; | 2803 Locker locker; |
2797 Debugger::CallMessageDispatchHandler(); | 2804 Debugger::CallMessageDispatchHandler(); |
2798 } | 2805 } |
2799 } | 2806 } |
2800 } | 2807 } |
2801 | 2808 |
2802 #endif // ENABLE_DEBUGGER_SUPPORT | 2809 #endif // ENABLE_DEBUGGER_SUPPORT |
2803 | 2810 |
2804 } } // namespace v8::internal | 2811 } } // namespace v8::internal |
OLD | NEW |