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 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
878 static void TemplateSet(i::Isolate* isolate, | 878 static void TemplateSet(i::Isolate* isolate, |
879 v8::Template* templ, | 879 v8::Template* templ, |
880 int length, | 880 int length, |
881 v8::Handle<v8::Data>* data) { | 881 v8::Handle<v8::Data>* data) { |
882 i::Handle<i::Object> list(Utils::OpenHandle(templ)->property_list(), isolate); | 882 i::Handle<i::Object> list(Utils::OpenHandle(templ)->property_list(), isolate); |
883 if (list->IsUndefined()) { | 883 if (list->IsUndefined()) { |
884 list = NeanderArray().value(); | 884 list = NeanderArray().value(); |
885 Utils::OpenHandle(templ)->set_property_list(*list); | 885 Utils::OpenHandle(templ)->set_property_list(*list); |
886 } | 886 } |
887 NeanderArray array(list); | 887 NeanderArray array(list); |
888 array.add(Utils::OpenHandle(*v8::Integer::New(length))); | 888 array.add(isolate->factory()->NewNumberFromInt(length)); |
889 for (int i = 0; i < length; i++) { | 889 for (int i = 0; i < length; i++) { |
890 i::Handle<i::Object> value = data[i].IsEmpty() ? | 890 i::Handle<i::Object> value = data[i].IsEmpty() ? |
891 i::Handle<i::Object>(isolate->factory()->undefined_value()) : | 891 i::Handle<i::Object>(isolate->factory()->undefined_value()) : |
892 Utils::OpenHandle(*data[i]); | 892 Utils::OpenHandle(*data[i]); |
893 array.add(value); | 893 array.add(value); |
894 } | 894 } |
895 } | 895 } |
896 | 896 |
897 | 897 |
898 void Template::Set(v8::Handle<String> name, | 898 void Template::Set(v8::Handle<String> name, |
899 v8::Handle<Data> value, | 899 v8::Handle<Data> value, |
900 v8::PropertyAttribute attribute) { | 900 v8::PropertyAttribute attribute) { |
901 i::Isolate* isolate = i::Isolate::Current(); | 901 i::Isolate* isolate = i::Isolate::Current(); |
902 ENTER_V8(isolate); | 902 ENTER_V8(isolate); |
903 i::HandleScope scope(isolate); | 903 i::HandleScope scope(isolate); |
904 const int kSize = 3; | 904 const int kSize = 3; |
| 905 v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate); |
905 v8::Handle<v8::Data> data[kSize] = { | 906 v8::Handle<v8::Data> data[kSize] = { |
906 name, | 907 name, |
907 value, | 908 value, |
908 v8::Integer::New(attribute)}; | 909 v8::Integer::New(v8_isolate, attribute)}; |
909 TemplateSet(isolate, this, kSize, data); | 910 TemplateSet(isolate, this, kSize, data); |
910 } | 911 } |
911 | 912 |
912 | 913 |
913 void Template::SetAccessorProperty( | 914 void Template::SetAccessorProperty( |
914 v8::Local<v8::String> name, | 915 v8::Local<v8::String> name, |
915 v8::Local<FunctionTemplate> getter, | 916 v8::Local<FunctionTemplate> getter, |
916 v8::Local<FunctionTemplate> setter, | 917 v8::Local<FunctionTemplate> setter, |
917 v8::PropertyAttribute attribute, | 918 v8::PropertyAttribute attribute, |
918 v8::AccessControl access_control) { | 919 v8::AccessControl access_control) { |
919 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 920 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
920 ENTER_V8(isolate); | 921 ENTER_V8(isolate); |
921 ASSERT(!name.IsEmpty()); | 922 ASSERT(!name.IsEmpty()); |
922 ASSERT(!getter.IsEmpty() || !setter.IsEmpty()); | 923 ASSERT(!getter.IsEmpty() || !setter.IsEmpty()); |
923 i::HandleScope scope(isolate); | 924 i::HandleScope scope(isolate); |
924 const int kSize = 5; | 925 const int kSize = 5; |
| 926 v8::Isolate* v8_isolate = reinterpret_cast<v8::Isolate*>(isolate); |
925 v8::Handle<v8::Data> data[kSize] = { | 927 v8::Handle<v8::Data> data[kSize] = { |
926 name, | 928 name, |
927 getter, | 929 getter, |
928 setter, | 930 setter, |
929 v8::Integer::New(attribute), | 931 v8::Integer::New(v8_isolate, attribute), |
930 v8::Integer::New(access_control)}; | 932 v8::Integer::New(v8_isolate, access_control)}; |
931 TemplateSet(isolate, this, kSize, data); | 933 TemplateSet(isolate, this, kSize, data); |
932 } | 934 } |
933 | 935 |
934 | 936 |
935 // --- F u n c t i o n T e m p l a t e --- | 937 // --- F u n c t i o n T e m p l a t e --- |
936 static void InitializeFunctionTemplate( | 938 static void InitializeFunctionTemplate( |
937 i::Handle<i::FunctionTemplateInfo> info) { | 939 i::Handle<i::FunctionTemplateInfo> info) { |
938 info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE)); | 940 info->set_tag(i::Smi::FromInt(Consts::FUNCTION_TEMPLATE)); |
939 info->set_flag(0); | 941 info->set_flag(0); |
940 } | 942 } |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 int length) { | 1003 int length) { |
1002 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 1004 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
1003 EnsureInitializedForIsolate(i_isolate, "v8::FunctionTemplate::New()"); | 1005 EnsureInitializedForIsolate(i_isolate, "v8::FunctionTemplate::New()"); |
1004 LOG_API(i_isolate, "FunctionTemplate::New"); | 1006 LOG_API(i_isolate, "FunctionTemplate::New"); |
1005 ENTER_V8(i_isolate); | 1007 ENTER_V8(i_isolate); |
1006 return FunctionTemplateNew( | 1008 return FunctionTemplateNew( |
1007 i_isolate, callback, data, signature, length, false); | 1009 i_isolate, callback, data, signature, length, false); |
1008 } | 1010 } |
1009 | 1011 |
1010 | 1012 |
1011 Local<FunctionTemplate> FunctionTemplate::New( | |
1012 FunctionCallback callback, | |
1013 v8::Handle<Value> data, | |
1014 v8::Handle<Signature> signature, | |
1015 int length) { | |
1016 return New(Isolate::GetCurrent(), callback, data, signature, length); | |
1017 } | |
1018 | |
1019 Local<Signature> Signature::New(Isolate* isolate, | 1013 Local<Signature> Signature::New(Isolate* isolate, |
1020 Handle<FunctionTemplate> receiver, int argc, | 1014 Handle<FunctionTemplate> receiver, int argc, |
1021 Handle<FunctionTemplate> argv[]) { | 1015 Handle<FunctionTemplate> argv[]) { |
1022 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 1016 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
1023 EnsureInitializedForIsolate(i_isolate, "v8::Signature::New()"); | 1017 EnsureInitializedForIsolate(i_isolate, "v8::Signature::New()"); |
1024 LOG_API(i_isolate, "Signature::New"); | 1018 LOG_API(i_isolate, "Signature::New"); |
1025 ENTER_V8(i_isolate); | 1019 ENTER_V8(i_isolate); |
1026 i::Handle<i::Struct> struct_obj = | 1020 i::Handle<i::Struct> struct_obj = |
1027 i_isolate->factory()->NewStruct(i::SIGNATURE_INFO_TYPE); | 1021 i_isolate->factory()->NewStruct(i::SIGNATURE_INFO_TYPE); |
1028 i::Handle<i::SignatureInfo> obj = | 1022 i::Handle<i::SignatureInfo> obj = |
(...skipping 3088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4117 } | 4111 } |
4118 return ToApiHandle<Primitive>(isolate->factory()->undefined_value()); | 4112 return ToApiHandle<Primitive>(isolate->factory()->undefined_value()); |
4119 } | 4113 } |
4120 | 4114 |
4121 | 4115 |
4122 ScriptOrigin Function::GetScriptOrigin() const { | 4116 ScriptOrigin Function::GetScriptOrigin() const { |
4123 i::Handle<i::JSFunction> func = Utils::OpenHandle(this); | 4117 i::Handle<i::JSFunction> func = Utils::OpenHandle(this); |
4124 if (func->shared()->script()->IsScript()) { | 4118 if (func->shared()->script()->IsScript()) { |
4125 i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); | 4119 i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); |
4126 i::Handle<i::Object> scriptName = GetScriptNameOrSourceURL(script); | 4120 i::Handle<i::Object> scriptName = GetScriptNameOrSourceURL(script); |
| 4121 v8::Isolate* isolate = reinterpret_cast<v8::Isolate*>(func->GetIsolate()); |
4127 v8::ScriptOrigin origin( | 4122 v8::ScriptOrigin origin( |
4128 Utils::ToLocal(scriptName), | 4123 Utils::ToLocal(scriptName), |
4129 v8::Integer::New(script->line_offset()->value()), | 4124 v8::Integer::New(isolate, script->line_offset()->value()), |
4130 v8::Integer::New(script->column_offset()->value())); | 4125 v8::Integer::New(isolate, script->column_offset()->value())); |
4131 return origin; | 4126 return origin; |
4132 } | 4127 } |
4133 return v8::ScriptOrigin(Handle<Value>()); | 4128 return v8::ScriptOrigin(Handle<Value>()); |
4134 } | 4129 } |
4135 | 4130 |
4136 | 4131 |
4137 const int Function::kLineOffsetNotFound = -1; | 4132 const int Function::kLineOffsetNotFound = -1; |
4138 | 4133 |
4139 | 4134 |
4140 int Function::GetScriptLineNumber() const { | 4135 int Function::GetScriptLineNumber() const { |
(...skipping 1196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5337 i::Handle<i::JSObject> external = i_isolate->factory()->NewExternal(value); | 5332 i::Handle<i::JSObject> external = i_isolate->factory()->NewExternal(value); |
5338 return Utils::ExternalToLocal(external); | 5333 return Utils::ExternalToLocal(external); |
5339 } | 5334 } |
5340 | 5335 |
5341 | 5336 |
5342 void* External::Value() const { | 5337 void* External::Value() const { |
5343 return ExternalValue(*Utils::OpenHandle(this)); | 5338 return ExternalValue(*Utils::OpenHandle(this)); |
5344 } | 5339 } |
5345 | 5340 |
5346 | 5341 |
5347 Local<String> v8::String::Empty() { | |
5348 i::Isolate* isolate = i::Isolate::Current(); | |
5349 if (!EnsureInitializedForIsolate(isolate, "v8::String::Empty()")) { | |
5350 return v8::Local<String>(); | |
5351 } | |
5352 LOG_API(isolate, "String::Empty()"); | |
5353 return Utils::ToLocal(isolate->factory()->empty_string()); | |
5354 } | |
5355 | |
5356 | |
5357 // anonymous namespace for string creation helper functions | 5342 // anonymous namespace for string creation helper functions |
5358 namespace { | 5343 namespace { |
5359 | 5344 |
5360 inline int StringLength(const char* string) { | 5345 inline int StringLength(const char* string) { |
5361 return i::StrLength(string); | 5346 return i::StrLength(string); |
5362 } | 5347 } |
5363 | 5348 |
5364 | 5349 |
5365 inline int StringLength(const uint8_t* string) { | 5350 inline int StringLength(const uint8_t* string) { |
5366 return i::StrLength(reinterpret_cast<const char*>(string)); | 5351 return i::StrLength(reinterpret_cast<const char*>(string)); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5409 inline Local<String> NewString(Isolate* v8_isolate, | 5394 inline Local<String> NewString(Isolate* v8_isolate, |
5410 const char* location, | 5395 const char* location, |
5411 const char* env, | 5396 const char* env, |
5412 const Char* data, | 5397 const Char* data, |
5413 String::NewStringType type, | 5398 String::NewStringType type, |
5414 int length) { | 5399 int length) { |
5415 i::Isolate* isolate = reinterpret_cast<internal::Isolate*>(v8_isolate); | 5400 i::Isolate* isolate = reinterpret_cast<internal::Isolate*>(v8_isolate); |
5416 EnsureInitializedForIsolate(isolate, location); | 5401 EnsureInitializedForIsolate(isolate, location); |
5417 LOG_API(isolate, env); | 5402 LOG_API(isolate, env); |
5418 if (length == 0 && type != String::kUndetectableString) { | 5403 if (length == 0 && type != String::kUndetectableString) { |
5419 return String::Empty(); | 5404 return String::Empty(v8_isolate); |
5420 } | 5405 } |
5421 ENTER_V8(isolate); | 5406 ENTER_V8(isolate); |
5422 if (length == -1) length = StringLength(data); | 5407 if (length == -1) length = StringLength(data); |
5423 i::Handle<i::String> result = NewString( | 5408 i::Handle<i::String> result = NewString( |
5424 isolate->factory(), type, i::Vector<const Char>(data, length)); | 5409 isolate->factory(), type, i::Vector<const Char>(data, length)); |
5425 if (type == String::kUndetectableString) { | 5410 if (type == String::kUndetectableString) { |
5426 result->MarkAsUndetectable(); | 5411 result->MarkAsUndetectable(); |
5427 } | 5412 } |
5428 return Utils::ToLocal(result); | 5413 return Utils::ToLocal(result); |
5429 } | 5414 } |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5640 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 5625 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
5641 EnsureInitializedForIsolate(i_isolate, "v8::Object::New()"); | 5626 EnsureInitializedForIsolate(i_isolate, "v8::Object::New()"); |
5642 LOG_API(i_isolate, "Object::New"); | 5627 LOG_API(i_isolate, "Object::New"); |
5643 ENTER_V8(i_isolate); | 5628 ENTER_V8(i_isolate); |
5644 i::Handle<i::JSObject> obj = | 5629 i::Handle<i::JSObject> obj = |
5645 i_isolate->factory()->NewJSObject(i_isolate->object_function()); | 5630 i_isolate->factory()->NewJSObject(i_isolate->object_function()); |
5646 return Utils::ToLocal(obj); | 5631 return Utils::ToLocal(obj); |
5647 } | 5632 } |
5648 | 5633 |
5649 | 5634 |
5650 Local<v8::Object> v8::Object::New() { | |
5651 return New(Isolate::GetCurrent()); | |
5652 } | |
5653 | |
5654 | |
5655 Local<v8::Value> v8::NumberObject::New(Isolate* isolate, double value) { | 5635 Local<v8::Value> v8::NumberObject::New(Isolate* isolate, double value) { |
5656 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 5636 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
5657 EnsureInitializedForIsolate(i_isolate, "v8::NumberObject::New()"); | 5637 EnsureInitializedForIsolate(i_isolate, "v8::NumberObject::New()"); |
5658 LOG_API(i_isolate, "NumberObject::New"); | 5638 LOG_API(i_isolate, "NumberObject::New"); |
5659 ENTER_V8(i_isolate); | 5639 ENTER_V8(i_isolate); |
5660 i::Handle<i::Object> number = i_isolate->factory()->NewNumber(value); | 5640 i::Handle<i::Object> number = i_isolate->factory()->NewNumber(value); |
5661 i::Handle<i::Object> obj = i_isolate->factory()->ToObject(number); | 5641 i::Handle<i::Object> obj = i_isolate->factory()->ToObject(number); |
5662 return Utils::ToLocal(obj); | 5642 return Utils::ToLocal(obj); |
5663 } | 5643 } |
5664 | 5644 |
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6130 if (length == -1) length = i::StrLength(data); | 6110 if (length == -1) length = i::StrLength(data); |
6131 i::Handle<i::String> name = i_isolate->factory()->NewStringFromUtf8( | 6111 i::Handle<i::String> name = i_isolate->factory()->NewStringFromUtf8( |
6132 i::Vector<const char>(data, length)); | 6112 i::Vector<const char>(data, length)); |
6133 symbol->set_name(*name); | 6113 symbol->set_name(*name); |
6134 } | 6114 } |
6135 Local<Symbol> result = Utils::ToLocal(symbol); | 6115 Local<Symbol> result = Utils::ToLocal(symbol); |
6136 return v8::Handle<Private>(reinterpret_cast<Private*>(*result)); | 6116 return v8::Handle<Private>(reinterpret_cast<Private*>(*result)); |
6137 } | 6117 } |
6138 | 6118 |
6139 | 6119 |
6140 Local<Number> v8::Number::New(double value) { | |
6141 i::Isolate* isolate = i::Isolate::Current(); | |
6142 EnsureInitializedForIsolate(isolate, "v8::Number::New()"); | |
6143 return Number::New(reinterpret_cast<Isolate*>(isolate), value); | |
6144 } | |
6145 | |
6146 | |
6147 Local<Number> v8::Number::New(Isolate* isolate, double value) { | 6120 Local<Number> v8::Number::New(Isolate* isolate, double value) { |
6148 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6121 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6149 ASSERT(internal_isolate->IsInitialized()); | 6122 ASSERT(internal_isolate->IsInitialized()); |
6150 if (std::isnan(value)) { | 6123 if (std::isnan(value)) { |
6151 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. | 6124 // Introduce only canonical NaN value into the VM, to avoid signaling NaNs. |
6152 value = i::OS::nan_value(); | 6125 value = i::OS::nan_value(); |
6153 } | 6126 } |
6154 ENTER_V8(internal_isolate); | 6127 ENTER_V8(internal_isolate); |
6155 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6128 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
6156 return Utils::NumberToLocal(result); | 6129 return Utils::NumberToLocal(result); |
6157 } | 6130 } |
6158 | 6131 |
6159 | 6132 |
6160 Local<Integer> v8::Integer::New(int32_t value) { | |
6161 i::Isolate* isolate = i::Isolate::UncheckedCurrent(); | |
6162 EnsureInitializedForIsolate(isolate, "v8::Integer::New()"); | |
6163 return v8::Integer::New(reinterpret_cast<Isolate*>(isolate), value); | |
6164 } | |
6165 | |
6166 | |
6167 Local<Integer> Integer::NewFromUnsigned(uint32_t value) { | |
6168 i::Isolate* isolate = i::Isolate::Current(); | |
6169 EnsureInitializedForIsolate(isolate, "v8::Integer::NewFromUnsigned()"); | |
6170 return Integer::NewFromUnsigned(reinterpret_cast<Isolate*>(isolate), value); | |
6171 } | |
6172 | |
6173 | |
6174 Local<Integer> v8::Integer::New(int32_t value, Isolate* isolate) { | |
6175 return Integer::New(isolate, value); | |
6176 } | |
6177 | |
6178 | |
6179 Local<Integer> v8::Integer::NewFromUnsigned(uint32_t value, Isolate* isolate) { | |
6180 return Integer::NewFromUnsigned(isolate, value); | |
6181 } | |
6182 | |
6183 | |
6184 Local<Integer> v8::Integer::New(Isolate* isolate, int32_t value) { | 6133 Local<Integer> v8::Integer::New(Isolate* isolate, int32_t value) { |
6185 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6134 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6186 ASSERT(internal_isolate->IsInitialized()); | 6135 ASSERT(internal_isolate->IsInitialized()); |
6187 if (i::Smi::IsValid(value)) { | 6136 if (i::Smi::IsValid(value)) { |
6188 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), | 6137 return Utils::IntegerToLocal(i::Handle<i::Object>(i::Smi::FromInt(value), |
6189 internal_isolate)); | 6138 internal_isolate)); |
6190 } | 6139 } |
6191 ENTER_V8(internal_isolate); | 6140 ENTER_V8(internal_isolate); |
6192 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6141 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
6193 return Utils::IntegerToLocal(result); | 6142 return Utils::IntegerToLocal(result); |
6194 } | 6143 } |
6195 | 6144 |
6196 | 6145 |
6197 Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) { | 6146 Local<Integer> v8::Integer::NewFromUnsigned(Isolate* isolate, uint32_t value) { |
6198 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); | 6147 i::Isolate* internal_isolate = reinterpret_cast<i::Isolate*>(isolate); |
6199 ASSERT(internal_isolate->IsInitialized()); | 6148 ASSERT(internal_isolate->IsInitialized()); |
6200 bool fits_into_int32_t = (value & (1 << 31)) == 0; | 6149 bool fits_into_int32_t = (value & (1 << 31)) == 0; |
6201 if (fits_into_int32_t) { | 6150 if (fits_into_int32_t) { |
6202 return Integer::New(static_cast<int32_t>(value), isolate); | 6151 return Integer::New(isolate, static_cast<int32_t>(value)); |
6203 } | 6152 } |
6204 ENTER_V8(internal_isolate); | 6153 ENTER_V8(internal_isolate); |
6205 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); | 6154 i::Handle<i::Object> result = internal_isolate->factory()->NewNumber(value); |
6206 return Utils::IntegerToLocal(result); | 6155 return Utils::IntegerToLocal(result); |
6207 } | 6156 } |
6208 | 6157 |
6209 | 6158 |
6210 #ifdef DEBUG | 6159 #ifdef DEBUG |
6211 v8::AssertNoGCScope::AssertNoGCScope(v8::Isolate* isolate) { | 6160 v8::AssertNoGCScope::AssertNoGCScope(v8::Isolate* isolate) { |
6212 disallow_heap_allocation_ = new i::DisallowHeapAllocation(); | 6161 disallow_heap_allocation_ = new i::DisallowHeapAllocation(); |
(...skipping 1313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7526 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7475 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7527 Address callback_address = | 7476 Address callback_address = |
7528 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7477 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7529 VMState<EXTERNAL> state(isolate); | 7478 VMState<EXTERNAL> state(isolate); |
7530 ExternalCallbackScope call_scope(isolate, callback_address); | 7479 ExternalCallbackScope call_scope(isolate, callback_address); |
7531 callback(info); | 7480 callback(info); |
7532 } | 7481 } |
7533 | 7482 |
7534 | 7483 |
7535 } } // namespace v8::internal | 7484 } } // namespace v8::internal |
OLD | NEW |