| 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 1820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1831 Handle<Object> exec_state, | 1831 Handle<Object> exec_state, |
| 1832 Handle<Object> event_data, | 1832 Handle<Object> event_data, |
| 1833 v8::Debug::ClientData* client_data) { | 1833 v8::Debug::ClientData* client_data) { |
| 1834 // Prevent other interrupts from triggering, for example API callbacks, | 1834 // Prevent other interrupts from triggering, for example API callbacks, |
| 1835 // while dispatching event listners. | 1835 // while dispatching event listners. |
| 1836 PostponeInterruptsScope postpone(isolate_); | 1836 PostponeInterruptsScope postpone(isolate_); |
| 1837 bool previous = in_debug_event_listener_; | 1837 bool previous = in_debug_event_listener_; |
| 1838 in_debug_event_listener_ = true; | 1838 in_debug_event_listener_ = true; |
| 1839 if (event_listener_->IsForeign()) { | 1839 if (event_listener_->IsForeign()) { |
| 1840 // Invoke the C debug event listener. | 1840 // Invoke the C debug event listener. |
| 1841 v8::Debug::EventCallback callback = | 1841 v8::DebugInterface::EventCallback callback = |
| 1842 FUNCTION_CAST<v8::Debug::EventCallback>( | 1842 FUNCTION_CAST<v8::DebugInterface::EventCallback>( |
| 1843 Handle<Foreign>::cast(event_listener_)->foreign_address()); | 1843 Handle<Foreign>::cast(event_listener_)->foreign_address()); |
| 1844 EventDetailsImpl event_details(event, | 1844 EventDetailsImpl event_details(event, |
| 1845 Handle<JSObject>::cast(exec_state), | 1845 Handle<JSObject>::cast(exec_state), |
| 1846 Handle<JSObject>::cast(event_data), | 1846 Handle<JSObject>::cast(event_data), |
| 1847 event_listener_data_, | 1847 event_listener_data_, |
| 1848 client_data); | 1848 client_data); |
| 1849 callback(event_details); | 1849 callback(event_details); |
| 1850 DCHECK(!isolate_->has_scheduled_exception()); | 1850 DCHECK(!isolate_->has_scheduled_exception()); |
| 1851 } else { | 1851 } else { |
| 1852 // Invoke the JavaScript debug event listener. | 1852 // Invoke the JavaScript debug event listener. |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2558 } | 2558 } |
| 2559 | 2559 |
| 2560 | 2560 |
| 2561 void LockingCommandMessageQueue::Clear() { | 2561 void LockingCommandMessageQueue::Clear() { |
| 2562 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2562 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
| 2563 queue_.Clear(); | 2563 queue_.Clear(); |
| 2564 } | 2564 } |
| 2565 | 2565 |
| 2566 } // namespace internal | 2566 } // namespace internal |
| 2567 } // namespace v8 | 2567 } // namespace v8 |
| OLD | NEW |