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 1927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 // Invoke the JavaScript debug event listener. | 1938 // Invoke the JavaScript debug event listener. |
1939 DCHECK(event_listener_->IsJSFunction()); | 1939 DCHECK(event_listener_->IsJSFunction()); |
1940 Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event), isolate_), | 1940 Handle<Object> argv[] = { Handle<Object>(Smi::FromInt(event), isolate_), |
1941 exec_state, | 1941 exec_state, |
1942 event_data, | 1942 event_data, |
1943 event_listener_data_ }; | 1943 event_listener_data_ }; |
1944 Handle<JSReceiver> global = isolate_->global_proxy(); | 1944 Handle<JSReceiver> global = isolate_->global_proxy(); |
1945 MaybeHandle<Object> result = | 1945 MaybeHandle<Object> result = |
1946 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_), | 1946 Execution::Call(isolate_, Handle<JSFunction>::cast(event_listener_), |
1947 global, arraysize(argv), argv); | 1947 global, arraysize(argv), argv); |
1948 CHECK(!result.is_null()); // Listeners may not throw. | 1948 CHECK(!result.is_null()); // Listeners must not throw. |
1949 } | 1949 } |
1950 in_debug_event_listener_ = previous; | 1950 in_debug_event_listener_ = previous; |
1951 } | 1951 } |
1952 | 1952 |
1953 | 1953 |
1954 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { | 1954 void Debug::ProcessCompileEvent(v8::DebugEvent event, Handle<Script> script) { |
1955 if (ignore_events()) return; | 1955 if (ignore_events()) return; |
1956 SuppressDebug while_processing(this); | 1956 SuppressDebug while_processing(this); |
1957 | 1957 |
1958 bool in_nested_debug_scope = in_debug_scope(); | 1958 bool in_nested_debug_scope = in_debug_scope(); |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2646 } | 2646 } |
2647 | 2647 |
2648 | 2648 |
2649 void LockingCommandMessageQueue::Clear() { | 2649 void LockingCommandMessageQueue::Clear() { |
2650 base::LockGuard<base::Mutex> lock_guard(&mutex_); | 2650 base::LockGuard<base::Mutex> lock_guard(&mutex_); |
2651 queue_.Clear(); | 2651 queue_.Clear(); |
2652 } | 2652 } |
2653 | 2653 |
2654 } // namespace internal | 2654 } // namespace internal |
2655 } // namespace v8 | 2655 } // namespace v8 |
OLD | NEW |