| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 3651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3662 i::Debugger::SetMessageHandler(MessageHandlerWrapper); | 3662 i::Debugger::SetMessageHandler(MessageHandlerWrapper); |
| 3663 } else { | 3663 } else { |
| 3664 i::Debugger::SetMessageHandler(NULL); | 3664 i::Debugger::SetMessageHandler(NULL); |
| 3665 } | 3665 } |
| 3666 } | 3666 } |
| 3667 | 3667 |
| 3668 | 3668 |
| 3669 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { | 3669 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { |
| 3670 EnsureInitialized("v8::Debug::SetMessageHandler"); | 3670 EnsureInitialized("v8::Debug::SetMessageHandler"); |
| 3671 ENTER_V8; | 3671 ENTER_V8; |
| 3672 HandleScope scope; | |
| 3673 i::Debugger::SetMessageHandler(handler); | 3672 i::Debugger::SetMessageHandler(handler); |
| 3674 } | 3673 } |
| 3675 | 3674 |
| 3676 | 3675 |
| 3677 void Debug::SendCommand(const uint16_t* command, int length, | 3676 void Debug::SendCommand(const uint16_t* command, int length, |
| 3678 ClientData* client_data) { | 3677 ClientData* client_data) { |
| 3679 if (!i::V8::IsRunning()) return; | 3678 if (!i::V8::IsRunning()) return; |
| 3680 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length), | 3679 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length), |
| 3681 client_data); | 3680 client_data); |
| 3682 } | 3681 } |
| 3683 | 3682 |
| 3684 | 3683 |
| 3685 void Debug::SetHostDispatchHandler(HostDispatchHandler handler, | 3684 void Debug::SetHostDispatchHandler(HostDispatchHandler handler, |
| 3686 int period) { | 3685 int period) { |
| 3687 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); | 3686 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); |
| 3688 ENTER_V8; | 3687 ENTER_V8; |
| 3689 i::Debugger::SetHostDispatchHandler(handler, period); | 3688 i::Debugger::SetHostDispatchHandler(handler, period); |
| 3690 } | 3689 } |
| 3691 | 3690 |
| 3692 | 3691 |
| 3693 void Debug::SetDebugMessageDispatchHandler( | 3692 void Debug::SetDebugMessageDispatchHandler( |
| 3694 DebugMessageDispatchHandler handler) { | 3693 DebugMessageDispatchHandler handler, bool provide_locker) { |
| 3695 EnsureInitialized("v8::Debug::SetDebugMessageDispatchHandler"); | 3694 EnsureInitialized("v8::Debug::SetDebugMessageDispatchHandler"); |
| 3696 ENTER_V8; | 3695 ENTER_V8; |
| 3697 i::Debugger::SetDebugMessageDispatchHandler(handler); | 3696 i::Debugger::SetDebugMessageDispatchHandler(handler, provide_locker); |
| 3698 } | 3697 } |
| 3699 | 3698 |
| 3700 | 3699 |
| 3701 Local<Value> Debug::Call(v8::Handle<v8::Function> fun, | 3700 Local<Value> Debug::Call(v8::Handle<v8::Function> fun, |
| 3702 v8::Handle<v8::Value> data) { | 3701 v8::Handle<v8::Value> data) { |
| 3703 if (!i::V8::IsRunning()) return Local<Value>(); | 3702 if (!i::V8::IsRunning()) return Local<Value>(); |
| 3704 ON_BAILOUT("v8::Debug::Call()", return Local<Value>()); | 3703 ON_BAILOUT("v8::Debug::Call()", return Local<Value>()); |
| 3705 ENTER_V8; | 3704 ENTER_V8; |
| 3706 i::Handle<i::Object> result; | 3705 i::Handle<i::Object> result; |
| 3707 EXCEPTION_PREAMBLE(); | 3706 EXCEPTION_PREAMBLE(); |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3827 | 3826 |
| 3828 | 3827 |
| 3829 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { | 3828 char* HandleScopeImplementer::Iterate(ObjectVisitor* v, char* storage) { |
| 3830 HandleScopeImplementer* thread_local = | 3829 HandleScopeImplementer* thread_local = |
| 3831 reinterpret_cast<HandleScopeImplementer*>(storage); | 3830 reinterpret_cast<HandleScopeImplementer*>(storage); |
| 3832 thread_local->IterateThis(v); | 3831 thread_local->IterateThis(v); |
| 3833 return storage + ArchiveSpacePerThread(); | 3832 return storage + ArchiveSpacePerThread(); |
| 3834 } | 3833 } |
| 3835 | 3834 |
| 3836 } } // namespace v8::internal | 3835 } } // namespace v8::internal |
| OLD | NEW |