OLD | NEW |
1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 2906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2917 i::Debugger::SetMessageHandler(handler, data); | 2917 i::Debugger::SetMessageHandler(handler, data); |
2918 } | 2918 } |
2919 | 2919 |
2920 | 2920 |
2921 void Debug::SendCommand(const uint16_t* command, int length) { | 2921 void Debug::SendCommand(const uint16_t* command, int length) { |
2922 if (!i::V8::HasBeenSetup()) return; | 2922 if (!i::V8::HasBeenSetup()) return; |
2923 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length)); | 2923 i::Debugger::ProcessCommand(i::Vector<const uint16_t>(command, length)); |
2924 } | 2924 } |
2925 | 2925 |
2926 | 2926 |
| 2927 void Debug::SetHostDispatchHandler(v8::DebugHostDispatchHandler handler, |
| 2928 void* data) { |
| 2929 EnsureInitialized("v8::Debug::SetHostDispatchHandler"); |
| 2930 i::Debugger::SetHostDispatchHandler(handler, data); |
| 2931 } |
| 2932 |
| 2933 |
| 2934 void Debug::SendHostDispatch(void* dispatch) { |
| 2935 if (!i::V8::HasBeenSetup()) return; |
| 2936 i::Debugger::ProcessHostDispatch(dispatch); |
| 2937 } |
| 2938 |
| 2939 |
2927 Handle<Value> Debug::Call(v8::Handle<v8::Function> fun, | 2940 Handle<Value> Debug::Call(v8::Handle<v8::Function> fun, |
2928 v8::Handle<v8::Value> data) { | 2941 v8::Handle<v8::Value> data) { |
2929 if (!i::V8::HasBeenSetup()) return Handle<Value>(); | 2942 if (!i::V8::HasBeenSetup()) return Handle<Value>(); |
2930 ON_BAILOUT("v8::Debug::Call()", return Handle<Value>()); | 2943 ON_BAILOUT("v8::Debug::Call()", return Handle<Value>()); |
2931 i::Handle<i::Object> result; | 2944 i::Handle<i::Object> result; |
2932 EXCEPTION_PREAMBLE(); | 2945 EXCEPTION_PREAMBLE(); |
2933 if (data.IsEmpty()) { | 2946 if (data.IsEmpty()) { |
2934 result = i::Debugger::Call(Utils::OpenHandle(*fun), | 2947 result = i::Debugger::Call(Utils::OpenHandle(*fun), |
2935 i::Factory::undefined_value(), | 2948 i::Factory::undefined_value(), |
2936 &has_pending_exception); | 2949 &has_pending_exception); |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3018 reinterpret_cast<HandleScopeImplementer*>(storage); | 3031 reinterpret_cast<HandleScopeImplementer*>(storage); |
3019 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); | 3032 List<void**>* blocks_of_archived_thread = thread_local->Blocks(); |
3020 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = | 3033 v8::ImplementationUtilities::HandleScopeData* handle_data_of_archived_thread = |
3021 &thread_local->handle_scope_data_; | 3034 &thread_local->handle_scope_data_; |
3022 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); | 3035 Iterate(v, blocks_of_archived_thread, handle_data_of_archived_thread); |
3023 | 3036 |
3024 return storage + ArchiveSpacePerThread(); | 3037 return storage + ArchiveSpacePerThread(); |
3025 } | 3038 } |
3026 | 3039 |
3027 } } // namespace v8::internal | 3040 } } // namespace v8::internal |
OLD | NEW |