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 3258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3269 | 3269 |
3270 | 3270 |
3271 void Debug::SendCommand(const uint16_t* command, int length, | 3271 void Debug::SendCommand(const uint16_t* command, int length, |
3272 ClientData* client_data) { | 3272 ClientData* client_data) { |
3273 if (!i::V8::HasBeenSetup()) return; | 3273 if (!i::V8::HasBeenSetup()) return; |
3274 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length), | 3274 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length), |
3275 client_data); | 3275 client_data); |
3276 } | 3276 } |
3277 | 3277 |
3278 | 3278 |
3279 void Debug::SetHostDispatchHandler(HostDispatchHandler handler) { | 3279 void Debug::SetHostDispatchHandler(HostDispatchHandler handler, |
| 3280 int period) { |
3280 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); | 3281 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); |
3281 ENTER_V8; | 3282 ENTER_V8; |
3282 i::Debugger::SetHostDispatchHandler(handler); | 3283 i::Debugger::SetHostDispatchHandler(handler, period); |
3283 } | 3284 } |
3284 | 3285 |
3285 | 3286 |
3286 void Debug::SendHostDispatch(ClientData* dispatch) { | |
3287 if (!i::V8::HasBeenSetup()) return; | |
3288 i::Debugger::ProcessHostDispatch(dispatch); | |
3289 } | |
3290 | |
3291 | |
3292 Handle<Value> Debug::Call(v8::Handle<v8::Function> fun, | 3287 Handle<Value> Debug::Call(v8::Handle<v8::Function> fun, |
3293 v8::Handle<v8::Value> data) { | 3288 v8::Handle<v8::Value> data) { |
3294 if (!i::V8::HasBeenSetup()) return Handle<Value>(); | 3289 if (!i::V8::HasBeenSetup()) return Handle<Value>(); |
3295 ON_BAILOUT("v8::Debug::Call()", return Handle<Value>()); | 3290 ON_BAILOUT("v8::Debug::Call()", return Handle<Value>()); |
3296 ENTER_V8; | 3291 ENTER_V8; |
3297 i::Handle<i::Object> result; | 3292 i::Handle<i::Object> result; |
3298 EXCEPTION_PREAMBLE(); | 3293 EXCEPTION_PREAMBLE(); |
3299 if (data.IsEmpty()) { | 3294 if (data.IsEmpty()) { |
3300 result = i::Debugger::Call(Utils::OpenHandle(*fun), | 3295 result = i::Debugger::Call(Utils::OpenHandle(*fun), |
3301 i::Factory::undefined_value(), | 3296 i::Factory::undefined_value(), |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3389 reinterpret_cast<HandleScopeImplementer*>(storage); | 3384 reinterpret_cast<HandleScopeImplementer*>(storage); |
3390 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3385 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
3391 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3386 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
3392 &thread_local->handle_scope_data_; | 3387 &thread_local->handle_scope_data_; |
3393 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3388 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
3394 | 3389 |
3395 return storage + ArchiveSpacePerThread(); | 3390 return storage + ArchiveSpacePerThread(); |
3396 } | 3391 } |
3397 | 3392 |
3398 } } // namespace v8::internal | 3393 } } // namespace v8::internal |
OLD | NEW |