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