| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/debug/debug.h" | 5 #include "src/debug/debug.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "src/api.h" | 9 #include "src/api.h" |
| 10 #include "src/arguments.h" | 10 #include "src/arguments.h" |
| (...skipping 1818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1829 Handle<Object> exec_state, | 1829 Handle<Object> exec_state, |
| 1830 Handle<Object> event_data, | 1830 Handle<Object> event_data, |
| 1831 v8::Debug::ClientData* client_data) { | 1831 v8::Debug::ClientData* client_data) { |
| 1832 // Prevent other interrupts from triggering, for example API callbacks, | 1832 // Prevent other interrupts from triggering, for example API callbacks, |
| 1833 // while dispatching event listners. | 1833 // while dispatching event listners. |
| 1834 PostponeInterruptsScope postpone(isolate_); | 1834 PostponeInterruptsScope postpone(isolate_); |
| 1835 bool previous = in_debug_event_listener_; | 1835 bool previous = in_debug_event_listener_; |
| 1836 in_debug_event_listener_ = true; | 1836 in_debug_event_listener_ = true; |
| 1837 if (event_listener_->IsForeign()) { | 1837 if (event_listener_->IsForeign()) { |
| 1838 // Invoke the C debug event listener. | 1838 // Invoke the C debug event listener. |
| 1839 v8::DebugInterface::EventCallback callback = | 1839 debug::DebugInterface::EventCallback callback = |
| 1840 FUNCTION_CAST<v8::DebugInterface::EventCallback>( | 1840 FUNCTION_CAST<debug::DebugInterface::EventCallback>( |
| 1841 Handle<Foreign>::cast(event_listener_)->foreign_address()); | 1841 Handle<Foreign>::cast(event_listener_)->foreign_address()); |
| 1842 EventDetailsImpl event_details(event, | 1842 EventDetailsImpl event_details(event, |
| 1843 Handle<JSObject>::cast(exec_state), | 1843 Handle<JSObject>::cast(exec_state), |
| 1844 Handle<JSObject>::cast(event_data), | 1844 Handle<JSObject>::cast(event_data), |
| 1845 event_listener_data_, | 1845 event_listener_data_, |
| 1846 client_data); | 1846 client_data); |
| 1847 callback(event_details); | 1847 callback(event_details); |
| 1848 CHECK(!isolate_->has_scheduled_exception()); | 1848 CHECK(!isolate_->has_scheduled_exception()); |
| 1849 } else { | 1849 } else { |
| 1850 // Invoke the JavaScript debug event listener. | 1850 // Invoke the JavaScript debug event listener. |
| (...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2509 logger_->DebugEvent("Put", message.text()); | 2509 logger_->DebugEvent("Put", message.text()); |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 void LockingCommandMessageQueue::Clear() { | 2512 void LockingCommandMessageQueue::Clear() { |
| 2513 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2513 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 2514 queue_.Clear(); | 2514 queue_.Clear(); |
| 2515 } | 2515 } |
| 2516 | 2516 |
| 2517 } // namespace internal | 2517 } // namespace internal |
| 2518 } // namespace v8 | 2518 } // namespace v8 |
| OLD | NEW |