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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "api.h" | 7 #include "api.h" |
8 #include "arguments.h" | 8 #include "arguments.h" |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 3162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3173 data = isolate_->factory()->undefined_value(); | 3173 data = isolate_->factory()->undefined_value(); |
3174 } | 3174 } |
3175 event_listener_data_ = Handle<Object>::cast( | 3175 event_listener_data_ = Handle<Object>::cast( |
3176 global_handles->Create(*data)); | 3176 global_handles->Create(*data)); |
3177 } | 3177 } |
3178 | 3178 |
3179 ListenersChanged(); | 3179 ListenersChanged(); |
3180 } | 3180 } |
3181 | 3181 |
3182 | 3182 |
3183 void Debugger::SetMessageHandler(v8::Debug::MessageHandler2 handler) { | 3183 void Debugger::SetMessageHandler(v8::Debug::MessageHandler handler) { |
3184 LockGuard<RecursiveMutex> with(&debugger_access_); | 3184 LockGuard<RecursiveMutex> with(&debugger_access_); |
3185 | 3185 |
3186 message_handler_ = handler; | 3186 message_handler_ = handler; |
3187 ListenersChanged(); | 3187 ListenersChanged(); |
3188 if (handler == NULL) { | 3188 if (handler == NULL) { |
3189 // Send an empty command to the debugger if in a break to make JavaScript | 3189 // Send an empty command to the debugger if in a break to make JavaScript |
3190 // run again if the debugger is closed. | 3190 // run again if the debugger is closed. |
3191 if (isolate_->debug()->InDebugger()) { | 3191 if (isolate_->debug()->InDebugger()) { |
3192 ProcessCommand(Vector<const uint16_t>::empty()); | 3192 ProcessCommand(Vector<const uint16_t>::empty()); |
3193 } | 3193 } |
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3731 already_signalled_ = false; | 3731 already_signalled_ = false; |
3732 } | 3732 } |
3733 { | 3733 { |
3734 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); | 3734 Locker locker(reinterpret_cast<v8::Isolate*>(isolate_)); |
3735 isolate_->debugger()->CallMessageDispatchHandler(); | 3735 isolate_->debugger()->CallMessageDispatchHandler(); |
3736 } | 3736 } |
3737 } | 3737 } |
3738 } | 3738 } |
3739 | 3739 |
3740 } } // namespace v8::internal | 3740 } } // namespace v8::internal |
OLD | NEW |