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 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1442 | 1442 |
1443 if (data.IsEmpty()) { | 1443 if (data.IsEmpty()) { |
1444 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate)); | 1444 data = v8::Undefined(reinterpret_cast<v8::Isolate*>(isolate)); |
1445 } | 1445 } |
1446 info->set_data(*Utils::OpenHandle(*data)); | 1446 info->set_data(*Utils::OpenHandle(*data)); |
1447 | 1447 |
1448 cons->set_access_check_info(*info); | 1448 cons->set_access_check_info(*info); |
1449 cons->set_needs_access_check(true); | 1449 cons->set_needs_access_check(true); |
1450 } | 1450 } |
1451 | 1451 |
| 1452 void ObjectTemplate::SetAccessCheckCallback( |
| 1453 DeprecatedAccessCheckCallback callback, Local<Value> data) { |
| 1454 SetAccessCheckCallback(reinterpret_cast<AccessCheckCallback>(callback), data); |
| 1455 } |
1452 | 1456 |
1453 void ObjectTemplate::SetAccessCheckCallbacks( | 1457 void ObjectTemplate::SetAccessCheckCallbacks( |
1454 NamedSecurityCallback named_callback, | 1458 NamedSecurityCallback named_callback, |
1455 IndexedSecurityCallback indexed_callback, Local<Value> data) { | 1459 IndexedSecurityCallback indexed_callback, Local<Value> data) { |
1456 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); | 1460 i::Isolate* isolate = Utils::OpenHandle(this)->GetIsolate(); |
1457 ENTER_V8(isolate); | 1461 ENTER_V8(isolate); |
1458 i::HandleScope scope(isolate); | 1462 i::HandleScope scope(isolate); |
1459 auto cons = EnsureConstructor(isolate, this); | 1463 auto cons = EnsureConstructor(isolate, this); |
1460 EnsureNotInstantiated(cons, "v8::ObjectTemplate::SetAccessCheckCallbacks"); | 1464 EnsureNotInstantiated(cons, "v8::ObjectTemplate::SetAccessCheckCallbacks"); |
1461 | 1465 |
(...skipping 7088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8550 Address callback_address = | 8554 Address callback_address = |
8551 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8555 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8552 VMState<EXTERNAL> state(isolate); | 8556 VMState<EXTERNAL> state(isolate); |
8553 ExternalCallbackScope call_scope(isolate, callback_address); | 8557 ExternalCallbackScope call_scope(isolate, callback_address); |
8554 callback(info); | 8558 callback(info); |
8555 } | 8559 } |
8556 | 8560 |
8557 | 8561 |
8558 } // namespace internal | 8562 } // namespace internal |
8559 } // namespace v8 | 8563 } // namespace v8 |
OLD | NEW |