OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/api.h" | 5 #include "src/api.h" |
6 | 6 |
7 #include <string.h> // For memcpy, strlen. | 7 #include <string.h> // For memcpy, strlen. |
8 #ifdef V8_USE_ADDRESS_SANITIZER | 8 #ifdef V8_USE_ADDRESS_SANITIZER |
9 #include <sanitizer/asan_interface.h> | 9 #include <sanitizer/asan_interface.h> |
10 #endif // V8_USE_ADDRESS_SANITIZER | 10 #endif // V8_USE_ADDRESS_SANITIZER |
(...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1640 if (obj.is_null()) return Local<Value>(); | 1640 if (obj.is_null()) return Local<Value>(); |
1641 i::Isolate* isolate = i::Handle<i::HeapObject>::cast(obj)->GetIsolate(); | 1641 i::Isolate* isolate = i::Handle<i::HeapObject>::cast(obj)->GetIsolate(); |
1642 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>()); | 1642 ON_BAILOUT(isolate, "v8::Script::Run()", return Local<Value>()); |
1643 LOG_API(isolate, "Script::Run"); | 1643 LOG_API(isolate, "Script::Run"); |
1644 ENTER_V8(isolate); | 1644 ENTER_V8(isolate); |
1645 i::Logger::TimerEventScope timer_scope( | 1645 i::Logger::TimerEventScope timer_scope( |
1646 isolate, i::Logger::TimerEventScope::v8_execute); | 1646 isolate, i::Logger::TimerEventScope::v8_execute); |
1647 i::HandleScope scope(isolate); | 1647 i::HandleScope scope(isolate); |
1648 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(obj); | 1648 i::Handle<i::JSFunction> fun = i::Handle<i::JSFunction>::cast(obj); |
1649 EXCEPTION_PREAMBLE(isolate); | 1649 EXCEPTION_PREAMBLE(isolate); |
1650 i::Handle<i::Object> receiver( | 1650 i::Handle<i::Object> receiver(isolate->global_proxy(), isolate); |
1651 isolate->context()->global_proxy(), isolate); | |
1652 i::Handle<i::Object> result; | 1651 i::Handle<i::Object> result; |
1653 has_pending_exception = !i::Execution::Call( | 1652 has_pending_exception = !i::Execution::Call( |
1654 isolate, fun, receiver, 0, NULL).ToHandle(&result); | 1653 isolate, fun, receiver, 0, NULL).ToHandle(&result); |
1655 EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>()); | 1654 EXCEPTION_BAILOUT_CHECK_DO_CALLBACK(isolate, Local<Value>()); |
1656 return Utils::ToLocal(scope.CloseAndEscape(result)); | 1655 return Utils::ToLocal(scope.CloseAndEscape(result)); |
1657 } | 1656 } |
1658 | 1657 |
1659 | 1658 |
1660 Local<UnboundScript> Script::GetUnboundScript() { | 1659 Local<UnboundScript> Script::GetUnboundScript() { |
1661 i::Handle<i::Object> obj = Utils::OpenHandle(this); | 1660 i::Handle<i::Object> obj = Utils::OpenHandle(this); |
(...skipping 3436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5098 | 5097 |
5099 const char* v8::V8::GetVersion() { | 5098 const char* v8::V8::GetVersion() { |
5100 return i::Version::GetVersion(); | 5099 return i::Version::GetVersion(); |
5101 } | 5100 } |
5102 | 5101 |
5103 | 5102 |
5104 static i::Handle<i::Context> CreateEnvironment( | 5103 static i::Handle<i::Context> CreateEnvironment( |
5105 i::Isolate* isolate, | 5104 i::Isolate* isolate, |
5106 v8::ExtensionConfiguration* extensions, | 5105 v8::ExtensionConfiguration* extensions, |
5107 v8::Handle<ObjectTemplate> global_template, | 5106 v8::Handle<ObjectTemplate> global_template, |
5108 v8::Handle<Value> global_object) { | 5107 v8::Handle<Value> maybe_global_proxy) { |
5109 i::Handle<i::Context> env; | 5108 i::Handle<i::Context> env; |
5110 | 5109 |
5111 // Enter V8 via an ENTER_V8 scope. | 5110 // Enter V8 via an ENTER_V8 scope. |
5112 { | 5111 { |
5113 ENTER_V8(isolate); | 5112 ENTER_V8(isolate); |
5114 v8::Handle<ObjectTemplate> proxy_template = global_template; | 5113 v8::Handle<ObjectTemplate> proxy_template = global_template; |
5115 i::Handle<i::FunctionTemplateInfo> proxy_constructor; | 5114 i::Handle<i::FunctionTemplateInfo> proxy_constructor; |
5116 i::Handle<i::FunctionTemplateInfo> global_constructor; | 5115 i::Handle<i::FunctionTemplateInfo> global_constructor; |
5117 | 5116 |
5118 if (!global_template.IsEmpty()) { | 5117 if (!global_template.IsEmpty()) { |
(...skipping 17 matching lines...) Expand all Loading... | |
5136 proxy_constructor->set_access_check_info( | 5135 proxy_constructor->set_access_check_info( |
5137 global_constructor->access_check_info()); | 5136 global_constructor->access_check_info()); |
5138 proxy_constructor->set_needs_access_check( | 5137 proxy_constructor->set_needs_access_check( |
5139 global_constructor->needs_access_check()); | 5138 global_constructor->needs_access_check()); |
5140 global_constructor->set_needs_access_check(false); | 5139 global_constructor->set_needs_access_check(false); |
5141 global_constructor->set_access_check_info( | 5140 global_constructor->set_access_check_info( |
5142 isolate->heap()->undefined_value()); | 5141 isolate->heap()->undefined_value()); |
5143 } | 5142 } |
5144 } | 5143 } |
5145 | 5144 |
5145 i::Handle<i::Object> proxy = Utils::OpenHandle(*maybe_global_proxy, true); | |
5146 i::MaybeHandle<i::JSGlobalProxy> maybe_proxy; | |
5147 if (!proxy.is_null()) { | |
5148 maybe_proxy = i::Handle<i::JSGlobalProxy>::cast(proxy); | |
5149 } | |
5146 // Create the environment. | 5150 // Create the environment. |
5147 env = isolate->bootstrapper()->CreateEnvironment( | 5151 env = isolate->bootstrapper()->CreateEnvironment( |
5148 Utils::OpenHandle(*global_object, true), | 5152 maybe_proxy, proxy_template, extensions); |
5149 proxy_template, | |
5150 extensions); | |
5151 | 5153 |
5152 // Restore the access check info on the global template. | 5154 // Restore the access check info on the global template. |
5153 if (!global_template.IsEmpty()) { | 5155 if (!global_template.IsEmpty()) { |
5154 ASSERT(!global_constructor.is_null()); | 5156 ASSERT(!global_constructor.is_null()); |
5155 ASSERT(!proxy_constructor.is_null()); | 5157 ASSERT(!proxy_constructor.is_null()); |
5156 global_constructor->set_access_check_info( | 5158 global_constructor->set_access_check_info( |
5157 proxy_constructor->access_check_info()); | 5159 proxy_constructor->access_check_info()); |
5158 global_constructor->set_needs_access_check( | 5160 global_constructor->set_needs_access_check( |
5159 proxy_constructor->needs_access_check()); | 5161 proxy_constructor->needs_access_check()); |
5160 } | 5162 } |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5819 if (!val->IsJSObject()) return false; | 5821 if (!val->IsJSObject()) return false; |
5820 i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(val); | 5822 i::Handle<i::JSObject> obj = i::Handle<i::JSObject>::cast(val); |
5821 i::Isolate* isolate = obj->GetIsolate(); | 5823 i::Isolate* isolate = obj->GetIsolate(); |
5822 LOG_API(isolate, "IsPromise"); | 5824 LOG_API(isolate, "IsPromise"); |
5823 ENTER_V8(isolate); | 5825 ENTER_V8(isolate); |
5824 EXCEPTION_PREAMBLE(isolate); | 5826 EXCEPTION_PREAMBLE(isolate); |
5825 i::Handle<i::Object> argv[] = { obj }; | 5827 i::Handle<i::Object> argv[] = { obj }; |
5826 i::Handle<i::Object> b; | 5828 i::Handle<i::Object> b; |
5827 has_pending_exception = !i::Execution::Call( | 5829 has_pending_exception = !i::Execution::Call( |
5828 isolate, | 5830 isolate, |
5829 handle( | 5831 handle( |
Igor Sheludko
2014/07/01 08:35:42
While you are here: the whole thing handle(isolate
| |
5830 isolate->context()->global_object()->native_context()->is_promise()), | 5832 isolate->native_context()->is_promise()), |
5831 isolate->factory()->undefined_value(), | 5833 isolate->factory()->undefined_value(), |
5832 ARRAY_SIZE(argv), argv, | 5834 ARRAY_SIZE(argv), argv, |
5833 false).ToHandle(&b); | 5835 false).ToHandle(&b); |
5834 EXCEPTION_BAILOUT_CHECK(isolate, false); | 5836 EXCEPTION_BAILOUT_CHECK(isolate, false); |
5835 return b->BooleanValue(); | 5837 return b->BooleanValue(); |
5836 } | 5838 } |
5837 | 5839 |
5838 | 5840 |
5839 Local<Promise::Resolver> Promise::Resolver::New(Isolate* v8_isolate) { | 5841 Local<Promise::Resolver> Promise::Resolver::New(Isolate* v8_isolate) { |
5840 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); | 5842 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate); |
5841 LOG_API(isolate, "Promise::Resolver::New"); | 5843 LOG_API(isolate, "Promise::Resolver::New"); |
5842 ENTER_V8(isolate); | 5844 ENTER_V8(isolate); |
5843 EXCEPTION_PREAMBLE(isolate); | 5845 EXCEPTION_PREAMBLE(isolate); |
5844 i::Handle<i::Object> result; | 5846 i::Handle<i::Object> result; |
5845 has_pending_exception = !i::Execution::Call( | 5847 has_pending_exception = !i::Execution::Call( |
5846 isolate, | 5848 isolate, |
5847 handle(isolate->context()->global_object()->native_context()-> | 5849 handle(isolate->native_context()->promise_create()), |
Igor Sheludko
2014/07/01 08:35:42
Same here.
| |
5848 promise_create()), | |
5849 isolate->factory()->undefined_value(), | 5850 isolate->factory()->undefined_value(), |
5850 0, NULL, | 5851 0, NULL, |
5851 false).ToHandle(&result); | 5852 false).ToHandle(&result); |
5852 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise::Resolver>()); | 5853 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise::Resolver>()); |
5853 return Local<Promise::Resolver>::Cast(Utils::ToLocal(result)); | 5854 return Local<Promise::Resolver>::Cast(Utils::ToLocal(result)); |
5854 } | 5855 } |
5855 | 5856 |
5856 | 5857 |
5857 Local<Promise> Promise::Resolver::GetPromise() { | 5858 Local<Promise> Promise::Resolver::GetPromise() { |
5858 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5859 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5859 return Local<Promise>::Cast(Utils::ToLocal(promise)); | 5860 return Local<Promise>::Cast(Utils::ToLocal(promise)); |
5860 } | 5861 } |
5861 | 5862 |
5862 | 5863 |
5863 void Promise::Resolver::Resolve(Handle<Value> value) { | 5864 void Promise::Resolver::Resolve(Handle<Value> value) { |
5864 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5865 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5865 i::Isolate* isolate = promise->GetIsolate(); | 5866 i::Isolate* isolate = promise->GetIsolate(); |
5866 LOG_API(isolate, "Promise::Resolver::Resolve"); | 5867 LOG_API(isolate, "Promise::Resolver::Resolve"); |
5867 ENTER_V8(isolate); | 5868 ENTER_V8(isolate); |
5868 EXCEPTION_PREAMBLE(isolate); | 5869 EXCEPTION_PREAMBLE(isolate); |
5869 i::Handle<i::Object> argv[] = { promise, Utils::OpenHandle(*value) }; | 5870 i::Handle<i::Object> argv[] = { promise, Utils::OpenHandle(*value) }; |
5870 has_pending_exception = i::Execution::Call( | 5871 has_pending_exception = i::Execution::Call( |
5871 isolate, | 5872 isolate, |
5872 handle(isolate->context()->global_object()->native_context()-> | 5873 handle(isolate->native_context()->promise_resolve()), |
Igor Sheludko
2014/07/01 08:35:41
Same here.
| |
5873 promise_resolve()), | |
5874 isolate->factory()->undefined_value(), | 5874 isolate->factory()->undefined_value(), |
5875 ARRAY_SIZE(argv), argv, | 5875 ARRAY_SIZE(argv), argv, |
5876 false).is_null(); | 5876 false).is_null(); |
5877 EXCEPTION_BAILOUT_CHECK(isolate, /* void */ ;); | 5877 EXCEPTION_BAILOUT_CHECK(isolate, /* void */ ;); |
5878 } | 5878 } |
5879 | 5879 |
5880 | 5880 |
5881 void Promise::Resolver::Reject(Handle<Value> value) { | 5881 void Promise::Resolver::Reject(Handle<Value> value) { |
5882 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5882 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5883 i::Isolate* isolate = promise->GetIsolate(); | 5883 i::Isolate* isolate = promise->GetIsolate(); |
5884 LOG_API(isolate, "Promise::Resolver::Reject"); | 5884 LOG_API(isolate, "Promise::Resolver::Reject"); |
5885 ENTER_V8(isolate); | 5885 ENTER_V8(isolate); |
5886 EXCEPTION_PREAMBLE(isolate); | 5886 EXCEPTION_PREAMBLE(isolate); |
5887 i::Handle<i::Object> argv[] = { promise, Utils::OpenHandle(*value) }; | 5887 i::Handle<i::Object> argv[] = { promise, Utils::OpenHandle(*value) }; |
5888 has_pending_exception = i::Execution::Call( | 5888 has_pending_exception = i::Execution::Call( |
5889 isolate, | 5889 isolate, |
5890 handle(isolate->context()->global_object()->native_context()-> | 5890 handle(isolate->native_context()->promise_reject()), |
Igor Sheludko
2014/07/01 08:35:42
Same here.
| |
5891 promise_reject()), | |
5892 isolate->factory()->undefined_value(), | 5891 isolate->factory()->undefined_value(), |
5893 ARRAY_SIZE(argv), argv, | 5892 ARRAY_SIZE(argv), argv, |
5894 false).is_null(); | 5893 false).is_null(); |
5895 EXCEPTION_BAILOUT_CHECK(isolate, /* void */ ;); | 5894 EXCEPTION_BAILOUT_CHECK(isolate, /* void */ ;); |
5896 } | 5895 } |
5897 | 5896 |
5898 | 5897 |
5899 Local<Promise> Promise::Chain(Handle<Function> handler) { | 5898 Local<Promise> Promise::Chain(Handle<Function> handler) { |
5900 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5899 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5901 i::Isolate* isolate = promise->GetIsolate(); | 5900 i::Isolate* isolate = promise->GetIsolate(); |
5902 LOG_API(isolate, "Promise::Chain"); | 5901 LOG_API(isolate, "Promise::Chain"); |
5903 ENTER_V8(isolate); | 5902 ENTER_V8(isolate); |
5904 EXCEPTION_PREAMBLE(isolate); | 5903 EXCEPTION_PREAMBLE(isolate); |
5905 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; | 5904 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; |
5906 i::Handle<i::Object> result; | 5905 i::Handle<i::Object> result; |
5907 has_pending_exception = !i::Execution::Call( | 5906 has_pending_exception = !i::Execution::Call( |
5908 isolate, | 5907 isolate, |
5909 handle(isolate->context()->global_object()->native_context()-> | 5908 handle(isolate->native_context()->promise_chain()), |
Igor Sheludko
2014/07/01 08:35:42
Same here.
| |
5910 promise_chain()), | |
5911 promise, | 5909 promise, |
5912 ARRAY_SIZE(argv), argv, | 5910 ARRAY_SIZE(argv), argv, |
5913 false).ToHandle(&result); | 5911 false).ToHandle(&result); |
5914 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); | 5912 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); |
5915 return Local<Promise>::Cast(Utils::ToLocal(result)); | 5913 return Local<Promise>::Cast(Utils::ToLocal(result)); |
5916 } | 5914 } |
5917 | 5915 |
5918 | 5916 |
5919 Local<Promise> Promise::Catch(Handle<Function> handler) { | 5917 Local<Promise> Promise::Catch(Handle<Function> handler) { |
5920 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5918 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5921 i::Isolate* isolate = promise->GetIsolate(); | 5919 i::Isolate* isolate = promise->GetIsolate(); |
5922 LOG_API(isolate, "Promise::Catch"); | 5920 LOG_API(isolate, "Promise::Catch"); |
5923 ENTER_V8(isolate); | 5921 ENTER_V8(isolate); |
5924 EXCEPTION_PREAMBLE(isolate); | 5922 EXCEPTION_PREAMBLE(isolate); |
5925 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; | 5923 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; |
5926 i::Handle<i::Object> result; | 5924 i::Handle<i::Object> result; |
5927 has_pending_exception = !i::Execution::Call( | 5925 has_pending_exception = !i::Execution::Call( |
5928 isolate, | 5926 isolate, |
5929 handle(isolate->context()->global_object()->native_context()-> | 5927 handle(isolate->native_context()->promise_catch()), |
Igor Sheludko
2014/07/01 08:35:42
Same here.
| |
5930 promise_catch()), | |
5931 promise, | 5928 promise, |
5932 ARRAY_SIZE(argv), argv, | 5929 ARRAY_SIZE(argv), argv, |
5933 false).ToHandle(&result); | 5930 false).ToHandle(&result); |
5934 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); | 5931 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); |
5935 return Local<Promise>::Cast(Utils::ToLocal(result)); | 5932 return Local<Promise>::Cast(Utils::ToLocal(result)); |
5936 } | 5933 } |
5937 | 5934 |
5938 | 5935 |
5939 Local<Promise> Promise::Then(Handle<Function> handler) { | 5936 Local<Promise> Promise::Then(Handle<Function> handler) { |
5940 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); | 5937 i::Handle<i::JSObject> promise = Utils::OpenHandle(this); |
5941 i::Isolate* isolate = promise->GetIsolate(); | 5938 i::Isolate* isolate = promise->GetIsolate(); |
5942 LOG_API(isolate, "Promise::Then"); | 5939 LOG_API(isolate, "Promise::Then"); |
5943 ENTER_V8(isolate); | 5940 ENTER_V8(isolate); |
5944 EXCEPTION_PREAMBLE(isolate); | 5941 EXCEPTION_PREAMBLE(isolate); |
5945 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; | 5942 i::Handle<i::Object> argv[] = { Utils::OpenHandle(*handler) }; |
5946 i::Handle<i::Object> result; | 5943 i::Handle<i::Object> result; |
5947 has_pending_exception = !i::Execution::Call( | 5944 has_pending_exception = !i::Execution::Call( |
5948 isolate, | 5945 isolate, |
5949 handle(isolate->context()->global_object()->native_context()-> | 5946 handle(isolate->native_context()->promise_then()), |
Igor Sheludko
2014/07/01 08:35:42
Same here.
| |
5950 promise_then()), | |
5951 promise, | 5947 promise, |
5952 ARRAY_SIZE(argv), argv, | 5948 ARRAY_SIZE(argv), argv, |
5953 false).ToHandle(&result); | 5949 false).ToHandle(&result); |
5954 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); | 5950 EXCEPTION_BAILOUT_CHECK(isolate, Local<Promise>()); |
5955 return Local<Promise>::Cast(Utils::ToLocal(result)); | 5951 return Local<Promise>::Cast(Utils::ToLocal(result)); |
5956 } | 5952 } |
5957 | 5953 |
5958 | 5954 |
5959 bool v8::ArrayBuffer::IsExternal() const { | 5955 bool v8::ArrayBuffer::IsExternal() const { |
5960 return Utils::OpenHandle(this)->is_external(); | 5956 return Utils::OpenHandle(this)->is_external(); |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6375 bool Isolate::InContext() { | 6371 bool Isolate::InContext() { |
6376 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6372 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6377 return isolate->context() != NULL; | 6373 return isolate->context() != NULL; |
6378 } | 6374 } |
6379 | 6375 |
6380 | 6376 |
6381 v8::Local<v8::Context> Isolate::GetCurrentContext() { | 6377 v8::Local<v8::Context> Isolate::GetCurrentContext() { |
6382 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6378 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6383 i::Context* context = isolate->context(); | 6379 i::Context* context = isolate->context(); |
6384 if (context == NULL) return Local<Context>(); | 6380 if (context == NULL) return Local<Context>(); |
6385 i::Context* native_context = context->global_object()->native_context(); | 6381 i::Context* native_context = context->native_context(); |
6386 if (native_context == NULL) return Local<Context>(); | 6382 if (native_context == NULL) return Local<Context>(); |
6387 return Utils::ToLocal(i::Handle<i::Context>(native_context)); | 6383 return Utils::ToLocal(i::Handle<i::Context>(native_context)); |
6388 } | 6384 } |
6389 | 6385 |
6390 | 6386 |
6391 v8::Local<v8::Context> Isolate::GetCallingContext() { | 6387 v8::Local<v8::Context> Isolate::GetCallingContext() { |
6392 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); | 6388 i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
6393 i::Handle<i::Object> calling = isolate->GetCallingNativeContext(); | 6389 i::Handle<i::Object> calling = isolate->GetCallingNativeContext(); |
6394 if (calling.is_null()) return Local<Context>(); | 6390 if (calling.is_null()) return Local<Context>(); |
6395 return Utils::ToLocal(i::Handle<i::Context>::cast(calling)); | 6391 return Utils::ToLocal(i::Handle<i::Context>::cast(calling)); |
(...skipping 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7630 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); | 7626 Isolate* isolate = reinterpret_cast<Isolate*>(info.GetIsolate()); |
7631 Address callback_address = | 7627 Address callback_address = |
7632 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 7628 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
7633 VMState<EXTERNAL> state(isolate); | 7629 VMState<EXTERNAL> state(isolate); |
7634 ExternalCallbackScope call_scope(isolate, callback_address); | 7630 ExternalCallbackScope call_scope(isolate, callback_address); |
7635 callback(info); | 7631 callback(info); |
7636 } | 7632 } |
7637 | 7633 |
7638 | 7634 |
7639 } } // namespace v8::internal | 7635 } } // namespace v8::internal |
OLD | NEW |