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 // TODO(dcarney): split api to allow values of v8::Value or v8::TemplateInfo. | |
Toon Verwaest
2015/10/20 15:00:54
dcarney doesn't work on v8 anymore
caitp (gmail)
2015/10/20 15:38:06
Copy/pasted from one of the similar methods. Do yo
Toon Verwaest
2015/10/21 16:02:48
What it probably wants is what jochen is working o
| |
1362 i::ApiNatives::AddDataProperty(isolate, templ, Utils::OpenHandle(*name), | |
1363 intrinsic, | |
1364 static_cast<PropertyAttributes>(attribute)); | |
1365 } | |
1366 | |
1367 | |
1355 void ObjectTemplate::SetAccessor(v8::Local<String> name, | 1368 void ObjectTemplate::SetAccessor(v8::Local<String> name, |
1356 AccessorGetterCallback getter, | 1369 AccessorGetterCallback getter, |
1357 AccessorSetterCallback setter, | 1370 AccessorSetterCallback setter, |
1358 v8::Local<Value> data, AccessControl settings, | 1371 v8::Local<Value> data, AccessControl settings, |
1359 PropertyAttribute attribute, | 1372 PropertyAttribute attribute, |
1360 v8::Local<AccessorSignature> signature) { | 1373 v8::Local<AccessorSignature> signature) { |
1361 TemplateSetAccessor( | 1374 TemplateSetAccessor( |
1362 this, name, getter, setter, data, settings, attribute, signature); | 1375 this, name, getter, setter, data, settings, attribute, signature); |
1363 } | 1376 } |
1364 | 1377 |
(...skipping 7024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
8389 Address callback_address = | 8402 Address callback_address = |
8390 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); | 8403 reinterpret_cast<Address>(reinterpret_cast<intptr_t>(callback)); |
8391 VMState<EXTERNAL> state(isolate); | 8404 VMState<EXTERNAL> state(isolate); |
8392 ExternalCallbackScope call_scope(isolate, callback_address); | 8405 ExternalCallbackScope call_scope(isolate, callback_address); |
8393 callback(info); | 8406 callback(info); |
8394 } | 8407 } |
8395 | 8408 |
8396 | 8409 |
8397 } // namespace internal | 8410 } // namespace internal |
8398 } // namespace v8 | 8411 } // namespace v8 |
OLD | NEW |