| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 ASSERT(!isolate->IsInitialized()); | 617 ASSERT(!isolate->IsInitialized()); |
| 618 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2, | 618 bool result = isolate->heap()->ConfigureHeap(young_space_size / 2, |
| 619 old_gen_size, | 619 old_gen_size, |
| 620 max_executable_size); | 620 max_executable_size); |
| 621 if (!result) return false; | 621 if (!result) return false; |
| 622 } | 622 } |
| 623 if (constraints->stack_limit() != NULL) { | 623 if (constraints->stack_limit() != NULL) { |
| 624 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit()); | 624 uintptr_t limit = reinterpret_cast<uintptr_t>(constraints->stack_limit()); |
| 625 isolate->stack_guard()->SetStackLimit(limit); | 625 isolate->stack_guard()->SetStackLimit(limit); |
| 626 } | 626 } |
| 627 if (constraints->is_memory_constrained().has_value) { | 627 if (constraints->is_memory_constrained().has_value && |
| 628 !i::FLAG_force_memory_constrained.has_value) { |
| 628 isolate->set_is_memory_constrained( | 629 isolate->set_is_memory_constrained( |
| 629 constraints->is_memory_constrained().value); | 630 constraints->is_memory_constrained().value); |
| 630 } | 631 } |
| 631 return true; | 632 return true; |
| 632 } | 633 } |
| 633 | 634 |
| 634 | 635 |
| 635 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) { | 636 i::Object** V8::GlobalizeReference(i::Isolate* isolate, i::Object** obj) { |
| 636 if (IsDeadCheck(isolate, "V8::Persistent::New")) return NULL; | 637 if (IsDeadCheck(isolate, "V8::Persistent::New")) return NULL; |
| 637 LOG_API(isolate, "Persistent::New"); | 638 LOG_API(isolate, "Persistent::New"); |
| (...skipping 1411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2049 | 2050 |
| 2050 | 2051 |
| 2051 v8::Local<Value> v8::TryCatch::StackTrace() const { | 2052 v8::Local<Value> v8::TryCatch::StackTrace() const { |
| 2052 ASSERT(isolate_ == i::Isolate::Current()); | 2053 ASSERT(isolate_ == i::Isolate::Current()); |
| 2053 if (HasCaught()) { | 2054 if (HasCaught()) { |
| 2054 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); | 2055 i::Object* raw_obj = reinterpret_cast<i::Object*>(exception_); |
| 2055 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); | 2056 if (!raw_obj->IsJSObject()) return v8::Local<Value>(); |
| 2056 i::HandleScope scope(isolate_); | 2057 i::HandleScope scope(isolate_); |
| 2057 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); | 2058 i::Handle<i::JSObject> obj(i::JSObject::cast(raw_obj), isolate_); |
| 2058 i::Handle<i::String> name = isolate_->factory()->stack_string(); | 2059 i::Handle<i::String> name = isolate_->factory()->stack_string(); |
| 2059 if (!obj->HasProperty(*name)) return v8::Local<Value>(); | 2060 if (!i::JSReceiver::HasProperty(obj, name)) return v8::Local<Value>(); |
| 2060 i::Handle<i::Object> value = i::GetProperty(isolate_, obj, name); | 2061 i::Handle<i::Object> value = i::GetProperty(isolate_, obj, name); |
| 2061 if (value.is_null()) return v8::Local<Value>(); | 2062 if (value.is_null()) return v8::Local<Value>(); |
| 2062 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); | 2063 return v8::Utils::ToLocal(scope.CloseAndEscape(value)); |
| 2063 } else { | 2064 } else { |
| 2064 return v8::Local<Value>(); | 2065 return v8::Local<Value>(); |
| 2065 } | 2066 } |
| 2066 } | 2067 } |
| 2067 | 2068 |
| 2068 | 2069 |
| 2069 v8::Local<v8::Message> v8::TryCatch::Message() const { | 2070 v8::Local<v8::Message> v8::TryCatch::Message() const { |
| (...skipping 1548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3618 HandleScope scope(reinterpret_cast<Isolate*>(isolate)); | 3619 HandleScope scope(reinterpret_cast<Isolate*>(isolate)); |
| 3619 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3620 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 3620 return i::JSReceiver::DeleteElement(self, index)->IsTrue(); | 3621 return i::JSReceiver::DeleteElement(self, index)->IsTrue(); |
| 3621 } | 3622 } |
| 3622 | 3623 |
| 3623 | 3624 |
| 3624 bool v8::Object::Has(uint32_t index) { | 3625 bool v8::Object::Has(uint32_t index) { |
| 3625 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3626 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3626 ON_BAILOUT(isolate, "v8::Object::HasProperty()", return false); | 3627 ON_BAILOUT(isolate, "v8::Object::HasProperty()", return false); |
| 3627 i::Handle<i::JSObject> self = Utils::OpenHandle(this); | 3628 i::Handle<i::JSObject> self = Utils::OpenHandle(this); |
| 3628 return self->HasElement(index); | 3629 return i::JSReceiver::HasElement(self, index); |
| 3629 } | 3630 } |
| 3630 | 3631 |
| 3631 | 3632 |
| 3632 template<typename Setter, typename Getter, typename Data> | 3633 template<typename Setter, typename Getter, typename Data> |
| 3633 static inline bool ObjectSetAccessor(Object* obj, | 3634 static inline bool ObjectSetAccessor(Object* obj, |
| 3634 Handle<String> name, | 3635 Handle<String> name, |
| 3635 Setter getter, | 3636 Setter getter, |
| 3636 Getter setter, | 3637 Getter setter, |
| 3637 Data data, | 3638 Data data, |
| 3638 AccessControl settings, | 3639 AccessControl settings, |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3672 void* null = NULL; | 3673 void* null = NULL; |
| 3673 return ObjectSetAccessor( | 3674 return ObjectSetAccessor( |
| 3674 this, name, descriptor, null, null, settings, attributes); | 3675 this, name, descriptor, null, null, settings, attributes); |
| 3675 } | 3676 } |
| 3676 | 3677 |
| 3677 | 3678 |
| 3678 bool v8::Object::HasOwnProperty(Handle<String> key) { | 3679 bool v8::Object::HasOwnProperty(Handle<String> key) { |
| 3679 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3680 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3680 ON_BAILOUT(isolate, "v8::Object::HasOwnProperty()", | 3681 ON_BAILOUT(isolate, "v8::Object::HasOwnProperty()", |
| 3681 return false); | 3682 return false); |
| 3682 return Utils::OpenHandle(this)->HasLocalProperty( | 3683 return i::JSReceiver::HasLocalProperty( |
| 3683 *Utils::OpenHandle(*key)); | 3684 Utils::OpenHandle(this), Utils::OpenHandle(*key)); |
| 3684 } | 3685 } |
| 3685 | 3686 |
| 3686 | 3687 |
| 3687 bool v8::Object::HasRealNamedProperty(Handle<String> key) { | 3688 bool v8::Object::HasRealNamedProperty(Handle<String> key) { |
| 3688 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 3689 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
| 3689 ON_BAILOUT(isolate, "v8::Object::HasRealNamedProperty()", | 3690 ON_BAILOUT(isolate, "v8::Object::HasRealNamedProperty()", |
| 3690 return false); | 3691 return false); |
| 3691 return Utils::OpenHandle(this)->HasRealNamedProperty( | 3692 return Utils::OpenHandle(this)->HasRealNamedProperty( |
| 3692 isolate, | 3693 isolate, |
| 3693 *Utils::OpenHandle(*key)); | 3694 *Utils::OpenHandle(*key)); |
| (...skipping 1722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5416 // Leave V8. | 5417 // Leave V8. |
| 5417 | 5418 |
| 5418 return env; | 5419 return env; |
| 5419 } | 5420 } |
| 5420 | 5421 |
| 5421 Local<Context> v8::Context::New( | 5422 Local<Context> v8::Context::New( |
| 5422 v8::Isolate* external_isolate, | 5423 v8::Isolate* external_isolate, |
| 5423 v8::ExtensionConfiguration* extensions, | 5424 v8::ExtensionConfiguration* extensions, |
| 5424 v8::Handle<ObjectTemplate> global_template, | 5425 v8::Handle<ObjectTemplate> global_template, |
| 5425 v8::Handle<Value> global_object) { | 5426 v8::Handle<Value> global_object) { |
| 5426 i::Isolate::EnsureDefaultIsolate(); | |
| 5427 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate); | 5427 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(external_isolate); |
| 5428 EnsureInitializedForIsolate(isolate, "v8::Context::New()"); | 5428 EnsureInitializedForIsolate(isolate, "v8::Context::New()"); |
| 5429 LOG_API(isolate, "Context::New"); | 5429 LOG_API(isolate, "Context::New"); |
| 5430 ON_BAILOUT(isolate, "v8::Context::New()", return Local<Context>()); | 5430 ON_BAILOUT(isolate, "v8::Context::New()", return Local<Context>()); |
| 5431 i::HandleScope scope(isolate); | 5431 i::HandleScope scope(isolate); |
| 5432 i::Handle<i::Context> env = | 5432 i::Handle<i::Context> env = |
| 5433 CreateEnvironment(isolate, extensions, global_template, global_object); | 5433 CreateEnvironment(isolate, extensions, global_template, global_object); |
| 5434 if (env.is_null()) return Local<Context>(); | 5434 if (env.is_null()) return Local<Context>(); |
| 5435 return Utils::ToLocal(scope.CloseAndEscape(env)); | 5435 return Utils::ToLocal(scope.CloseAndEscape(env)); |
| 5436 } | 5436 } |
| (...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6678 void Isolate::SetReference(const Persistent<Object>& parent, | 6678 void Isolate::SetReference(const Persistent<Object>& parent, |
| 6679 const Persistent<Value>& child) { | 6679 const Persistent<Value>& child) { |
| 6680 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this); | 6680 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(this); |
| 6681 i::Object** parent_location = Utils::OpenPersistent(parent).location(); | 6681 i::Object** parent_location = Utils::OpenPersistent(parent).location(); |
| 6682 internal_isolate->global_handles()->SetReference( | 6682 internal_isolate->global_handles()->SetReference( |
| 6683 reinterpret_cast<i::HeapObject**>(parent_location), | 6683 reinterpret_cast<i::HeapObject**>(parent_location), |
| 6684 Utils::OpenPersistent(child).location()); | 6684 Utils::OpenPersistent(child).location()); |
| 6685 } | 6685 } |
| 6686 | 6686 |
| 6687 | 6687 |
| 6688 void V8::SetGlobalGCPrologueCallback(GCCallback callback) { | 6688 void Isolate::AddGCPrologueCallback(GCPrologueCallback callback, |
| 6689 i::Isolate* isolate = i::Isolate::Current(); | 6689 GCType gc_type) { |
| 6690 if (IsDeadCheck(isolate, "v8::V8::SetGlobalGCPrologueCallback()")) return; | 6690 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6691 isolate->heap()->SetGlobalGCPrologueCallback(callback); | 6691 isolate->heap()->AddGCPrologueCallback(callback, gc_type); |
| 6692 } | 6692 } |
| 6693 | 6693 |
| 6694 | 6694 |
| 6695 void V8::SetGlobalGCEpilogueCallback(GCCallback callback) { | 6695 void Isolate::RemoveGCPrologueCallback(GCPrologueCallback callback) { |
| 6696 i::Isolate* isolate = i::Isolate::Current(); | 6696 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6697 if (IsDeadCheck(isolate, "v8::V8::SetGlobalGCEpilogueCallback()")) return; | 6697 isolate->heap()->RemoveGCPrologueCallback(callback); |
| 6698 isolate->heap()->SetGlobalGCEpilogueCallback(callback); | 6698 } |
| 6699 |
| 6700 |
| 6701 void Isolate::AddGCEpilogueCallback(GCEpilogueCallback callback, |
| 6702 GCType gc_type) { |
| 6703 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6704 isolate->heap()->AddGCEpilogueCallback(callback, gc_type); |
| 6705 } |
| 6706 |
| 6707 |
| 6708 void Isolate::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { |
| 6709 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
| 6710 isolate->heap()->RemoveGCEpilogueCallback(callback); |
| 6699 } | 6711 } |
| 6700 | 6712 |
| 6701 | 6713 |
| 6702 void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { | 6714 void V8::AddGCPrologueCallback(GCPrologueCallback callback, GCType gc_type) { |
| 6703 i::Isolate* isolate = i::Isolate::Current(); | 6715 i::Isolate* isolate = i::Isolate::Current(); |
| 6704 if (IsDeadCheck(isolate, "v8::V8::AddGCPrologueCallback()")) return; | 6716 if (IsDeadCheck(isolate, "v8::V8::AddGCPrologueCallback()")) return; |
| 6705 isolate->heap()->AddGCPrologueCallback(callback, gc_type); | 6717 isolate->heap()->AddGCPrologueCallback( |
| 6718 reinterpret_cast<v8::Isolate::GCPrologueCallback>(callback), |
| 6719 gc_type, |
| 6720 false); |
| 6706 } | 6721 } |
| 6707 | 6722 |
| 6708 | 6723 |
| 6709 void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) { | 6724 void V8::RemoveGCPrologueCallback(GCPrologueCallback callback) { |
| 6710 i::Isolate* isolate = i::Isolate::Current(); | 6725 i::Isolate* isolate = i::Isolate::Current(); |
| 6711 if (IsDeadCheck(isolate, "v8::V8::RemoveGCPrologueCallback()")) return; | 6726 if (IsDeadCheck(isolate, "v8::V8::RemoveGCPrologueCallback()")) return; |
| 6712 isolate->heap()->RemoveGCPrologueCallback(callback); | 6727 isolate->heap()->RemoveGCPrologueCallback( |
| 6728 reinterpret_cast<v8::Isolate::GCPrologueCallback>(callback)); |
| 6713 } | 6729 } |
| 6714 | 6730 |
| 6715 | 6731 |
| 6716 void V8::AddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type) { | 6732 void V8::AddGCEpilogueCallback(GCEpilogueCallback callback, GCType gc_type) { |
| 6717 i::Isolate* isolate = i::Isolate::Current(); | 6733 i::Isolate* isolate = i::Isolate::Current(); |
| 6718 if (IsDeadCheck(isolate, "v8::V8::AddGCEpilogueCallback()")) return; | 6734 if (IsDeadCheck(isolate, "v8::V8::AddGCEpilogueCallback()")) return; |
| 6719 isolate->heap()->AddGCEpilogueCallback(callback, gc_type); | 6735 isolate->heap()->AddGCEpilogueCallback( |
| 6736 reinterpret_cast<v8::Isolate::GCEpilogueCallback>(callback), |
| 6737 gc_type, |
| 6738 false); |
| 6720 } | 6739 } |
| 6721 | 6740 |
| 6722 | 6741 |
| 6723 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { | 6742 void V8::RemoveGCEpilogueCallback(GCEpilogueCallback callback) { |
| 6724 i::Isolate* isolate = i::Isolate::Current(); | 6743 i::Isolate* isolate = i::Isolate::Current(); |
| 6725 if (IsDeadCheck(isolate, "v8::V8::RemoveGCEpilogueCallback()")) return; | 6744 if (IsDeadCheck(isolate, "v8::V8::RemoveGCEpilogueCallback()")) return; |
| 6726 isolate->heap()->RemoveGCEpilogueCallback(callback); | 6745 isolate->heap()->RemoveGCEpilogueCallback( |
| 6746 reinterpret_cast<v8::Isolate::GCEpilogueCallback>(callback)); |
| 6727 } | 6747 } |
| 6728 | 6748 |
| 6729 | 6749 |
| 6730 void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, | 6750 void V8::AddMemoryAllocationCallback(MemoryAllocationCallback callback, |
| 6731 ObjectSpace space, | 6751 ObjectSpace space, |
| 6732 AllocationAction action) { | 6752 AllocationAction action) { |
| 6733 i::Isolate* isolate = i::Isolate::Current(); | 6753 i::Isolate* isolate = i::Isolate::Current(); |
| 6734 if (IsDeadCheck(isolate, "v8::V8::AddMemoryAllocationCallback()")) return; | 6754 if (IsDeadCheck(isolate, "v8::V8::AddMemoryAllocationCallback()")) return; |
| 6735 isolate->memory_allocator()->AddMemoryAllocationCallback( | 6755 isolate->memory_allocator()->AddMemoryAllocationCallback( |
| 6736 callback, space, action); | 6756 callback, space, action); |
| 6737 } | 6757 } |
| 6738 | 6758 |
| 6739 | 6759 |
| 6740 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { | 6760 void V8::RemoveMemoryAllocationCallback(MemoryAllocationCallback callback) { |
| 6741 i::Isolate* isolate = i::Isolate::Current(); | 6761 i::Isolate* isolate = i::Isolate::Current(); |
| 6742 if (IsDeadCheck(isolate, "v8::V8::RemoveMemoryAllocationCallback()")) return; | 6762 if (IsDeadCheck(isolate, "v8::V8::RemoveMemoryAllocationCallback()")) return; |
| 6743 isolate->memory_allocator()->RemoveMemoryAllocationCallback( | 6763 isolate->memory_allocator()->RemoveMemoryAllocationCallback( |
| 6744 callback); | 6764 callback); |
| 6745 } | 6765 } |
| 6746 | 6766 |
| 6747 | 6767 |
| 6748 void V8::AddCallCompletedCallback(CallCompletedCallback callback) { | 6768 void V8::AddCallCompletedCallback(CallCompletedCallback callback) { |
| 6749 if (callback == NULL) return; | 6769 if (callback == NULL) return; |
| 6750 i::Isolate::EnsureDefaultIsolate(); | |
| 6751 i::Isolate* isolate = i::Isolate::Current(); | 6770 i::Isolate* isolate = i::Isolate::Current(); |
| 6752 if (IsDeadCheck(isolate, "v8::V8::AddLeaveScriptCallback()")) return; | 6771 if (IsDeadCheck(isolate, "v8::V8::AddLeaveScriptCallback()")) return; |
| 6753 i::V8::AddCallCompletedCallback(callback); | 6772 i::V8::AddCallCompletedCallback(callback); |
| 6754 } | 6773 } |
| 6755 | 6774 |
| 6756 | 6775 |
| 6757 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { | 6776 void V8::RemoveCallCompletedCallback(CallCompletedCallback callback) { |
| 6758 i::Isolate::EnsureDefaultIsolate(); | |
| 6759 i::Isolate* isolate = i::Isolate::Current(); | 6777 i::Isolate* isolate = i::Isolate::Current(); |
| 6760 if (IsDeadCheck(isolate, "v8::V8::RemoveLeaveScriptCallback()")) return; | 6778 if (IsDeadCheck(isolate, "v8::V8::RemoveLeaveScriptCallback()")) return; |
| 6761 i::V8::RemoveCallCompletedCallback(callback); | 6779 i::V8::RemoveCallCompletedCallback(callback); |
| 6762 } | 6780 } |
| 6763 | 6781 |
| 6764 | 6782 |
| 6765 void V8::TerminateExecution(Isolate* isolate) { | 6783 void V8::TerminateExecution(Isolate* isolate) { |
| 6766 // If no isolate is supplied, use the default isolate. | 6784 // If no isolate is supplied, use the default isolate. |
| 6767 if (isolate != NULL) { | 6785 if (isolate != NULL) { |
| 6768 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->TerminateExecution(); | 6786 reinterpret_cast<i::Isolate*>(isolate)->stack_guard()->TerminateExecution(); |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7055 | 7073 |
| 7056 | 7074 |
| 7057 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { | 7075 void Debug::SetMessageHandler2(v8::Debug::MessageHandler2 handler) { |
| 7058 i::Isolate* isolate = i::Isolate::Current(); | 7076 i::Isolate* isolate = i::Isolate::Current(); |
| 7059 EnsureInitializedForIsolate(isolate, "v8::Debug::SetMessageHandler"); | 7077 EnsureInitializedForIsolate(isolate, "v8::Debug::SetMessageHandler"); |
| 7060 ENTER_V8(isolate); | 7078 ENTER_V8(isolate); |
| 7061 isolate->debugger()->SetMessageHandler(handler); | 7079 isolate->debugger()->SetMessageHandler(handler); |
| 7062 } | 7080 } |
| 7063 | 7081 |
| 7064 | 7082 |
| 7083 void Debug::SendCommand(Isolate* isolate, |
| 7084 const uint16_t* command, |
| 7085 int length, |
| 7086 ClientData* client_data) { |
| 7087 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 7088 internal_isolate->debugger()->ProcessCommand( |
| 7089 i::Vector<const uint16_t>(command, length), client_data); |
| 7090 } |
| 7091 |
| 7092 |
| 7065 void Debug::SendCommand(const uint16_t* command, int length, | 7093 void Debug::SendCommand(const uint16_t* command, int length, |
| 7066 ClientData* client_data, | 7094 ClientData* client_data, |
| 7067 Isolate* isolate) { | 7095 Isolate* isolate) { |
| 7068 // If no isolate is supplied, use the default isolate. | 7096 // If no isolate is supplied, use the default isolate. |
| 7069 if (isolate != NULL) { | 7097 if (isolate != NULL) { |
| 7070 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 7098 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
| 7071 internal_isolate->debugger()->ProcessCommand( | 7099 internal_isolate->debugger()->ProcessCommand( |
| 7072 i::Vector<const uint16_t>(command, length), client_data); | 7100 i::Vector<const uint16_t>(command, length), client_data); |
| 7073 } else { | 7101 } else { |
| 7074 i::Isolate::GetDefaultIsolateDebugger()->ProcessCommand( | 7102 i::Isolate::GetDefaultIsolateDebugger()->ProcessCommand( |
| (...skipping 789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7864 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7892 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
| 7865 Address callback_address = | 7893 Address callback_address = |
| 7866 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7894 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
| 7867 VMState<EXTERNAL> state(isolate); | 7895 VMState<EXTERNAL> state(isolate); |
| 7868 ExternalCallbackScope call_scope(isolate, callback_address); | 7896 ExternalCallbackScope call_scope(isolate, callback_address); |
| 7869 callback(info); | 7897 callback(info); |
| 7870 } | 7898 } |
| 7871 | 7899 |
| 7872 | 7900 |
| 7873 } } // namespace v8::internal | 7901 } } // namespace v8::internal |
| OLD | NEW |