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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler); | 1273 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler); |
1274 ENTER_V8(i_isolate); | 1274 ENTER_V8(i_isolate); |
1275 return FunctionTemplateNew(i_isolate, callback, fast_handler, data, signature, | 1275 return FunctionTemplateNew(i_isolate, callback, fast_handler, data, signature, |
1276 length, false); | 1276 length, false); |
1277 } | 1277 } |
1278 | 1278 |
1279 Local<FunctionTemplate> FunctionTemplate::NewWithCache( | 1279 Local<FunctionTemplate> FunctionTemplate::NewWithCache( |
1280 Isolate* isolate, FunctionCallback callback, Local<Private> cache_property, | 1280 Isolate* isolate, FunctionCallback callback, Local<Private> cache_property, |
1281 Local<Value> data, Local<Signature> signature, int length) { | 1281 Local<Value> data, Local<Signature> signature, int length) { |
1282 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); | 1282 i::Isolate* i_isolate = reinterpret_cast<i::Isolate*>(isolate); |
1283 LOG_API(i_isolate, FunctionTemplate, NewWithFastHandler); | 1283 LOG_API(i_isolate, FunctionTemplate, NewWithCache); |
1284 ENTER_V8(i_isolate); | 1284 ENTER_V8(i_isolate); |
1285 return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, | 1285 return FunctionTemplateNew(i_isolate, callback, nullptr, data, signature, |
1286 length, false, cache_property); | 1286 length, false, cache_property); |
1287 } | 1287 } |
1288 | 1288 |
1289 Local<Signature> Signature::New(Isolate* isolate, | 1289 Local<Signature> Signature::New(Isolate* isolate, |
1290 Local<FunctionTemplate> receiver) { | 1290 Local<FunctionTemplate> receiver) { |
1291 return Utils::SignatureToLocal(Utils::OpenHandle(*receiver)); | 1291 return Utils::SignatureToLocal(Utils::OpenHandle(*receiver)); |
1292 } | 1292 } |
1293 | 1293 |
(...skipping 8555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9849 Address callback_address = | 9849 Address callback_address = |
9850 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 9850 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
9851 VMState<EXTERNAL> state(isolate); | 9851 VMState<EXTERNAL> state(isolate); |
9852 ExternalCallbackScope call_scope(isolate, callback_address); | 9852 ExternalCallbackScope call_scope(isolate, callback_address); |
9853 callback(info); | 9853 callback(info); |
9854 } | 9854 } |
9855 | 9855 |
9856 | 9856 |
9857 } // namespace internal | 9857 } // namespace internal |
9858 } // namespace v8 | 9858 } // namespace v8 |
OLD | NEW |