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 1334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1345 AccessorNameSetterCallback setter, | 1345 AccessorNameSetterCallback setter, |
1346 v8::Local<Value> data, | 1346 v8::Local<Value> data, |
1347 PropertyAttribute attribute, | 1347 PropertyAttribute attribute, |
1348 v8::Local<AccessorSignature> signature, | 1348 v8::Local<AccessorSignature> signature, |
1349 AccessControl settings) { | 1349 AccessControl settings) { |
1350 TemplateSetAccessor( | 1350 TemplateSetAccessor( |
1351 this, name, getter, setter, data, settings, attribute, signature); | 1351 this, name, getter, setter, data, settings, attribute, signature); |
1352 } | 1352 } |
1353 | 1353 |
1354 | 1354 |
| 1355 void Template::SetIntrinsicDataProperty(Local<Name> name, Intrinsic intrinsic, |
| 1356 PropertyAttribute attribute) { |
| 1357 auto templ = Utils::OpenHandle(this); |
| 1358 i::Isolate* isolate = templ->GetIsolate(); |
| 1359 ENTER_V8(isolate); |
| 1360 i::HandleScope scope(isolate); |
| 1361 i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), |
| 1362 intrinsic, |
| 1363 static_cast<PropertyAttributes>(attribute)); |
| 1364 } |
| 1365 |
| 1366 |
1355 void ObjectTemplate::SetAccessor(v8::Local<String> name, | 1367 void ObjectTemplate::SetAccessor(v8::Local<String> name, |
1356 AccessorGetterCallback getter, | 1368 AccessorGetterCallback getter, |
1357 AccessorSetterCallback setter, | 1369 AccessorSetterCallback setter, |
1358 v8::Local<Value> data, AccessControl settings, | 1370 v8::Local<Value> data, AccessControl settings, |
1359 PropertyAttribute attribute, | 1371 PropertyAttribute attribute, |
1360 v8::Local<AccessorSignature> signature) { | 1372 v8::Local<AccessorSignature> signature) { |
1361 TemplateSetAccessor( | 1373 TemplateSetAccessor( |
1362 this, name, getter, setter, data, settings, attribute, signature); | 1374 this, name, getter, setter, data, settings, attribute, signature); |
1363 } | 1375 } |
1364 | 1376 |
(...skipping 6997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8362 Address callback_address = | 8374 Address callback_address = |
8363 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8375 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8364 VMState<EXTERNAL> state(isolate); | 8376 VMState<EXTERNAL> state(isolate); |
8365 ExternalCallbackScope call_scope(isolate, callback_address); | 8377 ExternalCallbackScope call_scope(isolate, callback_address); |
8366 callback(info); | 8378 callback(info); |
8367 } | 8379 } |
8368 | 8380 |
8369 | 8381 |
8370 } // namespace internal | 8382 } // namespace internal |
8371 } // namespace v8 | 8383 } // namespace v8 |
OLD | NEW |