| 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 /** \mainpage V8 API Reference Guide | 5 /** \mainpage V8 API Reference Guide |
| 6 * | 6 * |
| 7 * V8 is Google's open source JavaScript engine. | 7 * V8 is Google's open source JavaScript engine. |
| 8 * | 8 * |
| 9 * This set of documents provides reference material generated from the | 9 * This set of documents provides reference material generated from the |
| 10 * V8 header file, include/v8.h. | 10 * V8 header file, include/v8.h. |
| (...skipping 4654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4665 Local<Name> property, const PropertyCallbackInfo<Boolean>& info); | 4665 Local<Name> property, const PropertyCallbackInfo<Boolean>& info); |
| 4666 | 4666 |
| 4667 | 4667 |
| 4668 /** | 4668 /** |
| 4669 * Returns an array containing the names of the properties the named | 4669 * Returns an array containing the names of the properties the named |
| 4670 * property getter intercepts. | 4670 * property getter intercepts. |
| 4671 */ | 4671 */ |
| 4672 typedef void (*GenericNamedPropertyEnumeratorCallback)( | 4672 typedef void (*GenericNamedPropertyEnumeratorCallback)( |
| 4673 const PropertyCallbackInfo<Array>& info); | 4673 const PropertyCallbackInfo<Array>& info); |
| 4674 | 4674 |
| 4675 /** | |
| 4676 * Interceptor for defineProperty requests on an object. | |
| 4677 * | |
| 4678 * Use `info.GetReturnValue()` to indicate whether the request was intercepted | |
| 4679 * or not. If the definer successfully intercepts the request, i.e., if the | |
| 4680 * request should not be further executed, call | |
| 4681 * `info.GetReturnValue().Set(value)`. If the definer | |
| 4682 * did not intercept the request, i.e., if the request should be handled as | |
| 4683 * if no interceptor is present, do not not call `Set()`. | |
| 4684 * | |
| 4685 * \param property The name of the property for which the request was | |
| 4686 * intercepted. | |
| 4687 * \param desc The property descriptor which is used to define the | |
| 4688 * property if the request is not intercepted. | |
| 4689 * \param info Information about the intercepted request, such as | |
| 4690 * isolate, receiver, return value, or whether running in `'use strict'` mode. | |
| 4691 * See `PropertyCallbackInfo`. | |
| 4692 * | |
| 4693 * See also `ObjectTemplate::SetNamedPropertyHandler`. | |
| 4694 */ | |
| 4695 typedef void (*GenericNamedPropertyDefinerCallback)( | |
| 4696 Local<Name> key, const PropertyDescriptor& desc, | |
| 4697 const PropertyCallbackInfo<Value>& info); | |
| 4698 | 4675 |
| 4699 /** | 4676 /** |
| 4700 * Returns the value of the property if the getter intercepts the | 4677 * Returns the value of the property if the getter intercepts the |
| 4701 * request. Otherwise, returns an empty handle. | 4678 * request. Otherwise, returns an empty handle. |
| 4702 */ | 4679 */ |
| 4703 typedef void (*IndexedPropertyGetterCallback)( | 4680 typedef void (*IndexedPropertyGetterCallback)( |
| 4704 uint32_t index, | 4681 uint32_t index, |
| 4705 const PropertyCallbackInfo<Value>& info); | 4682 const PropertyCallbackInfo<Value>& info); |
| 4706 | 4683 |
| 4707 | 4684 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 4734 const PropertyCallbackInfo<Boolean>& info); | 4711 const PropertyCallbackInfo<Boolean>& info); |
| 4735 | 4712 |
| 4736 | 4713 |
| 4737 /** | 4714 /** |
| 4738 * Returns an array containing the indices of the properties the | 4715 * Returns an array containing the indices of the properties the |
| 4739 * indexed property getter intercepts. | 4716 * indexed property getter intercepts. |
| 4740 */ | 4717 */ |
| 4741 typedef void (*IndexedPropertyEnumeratorCallback)( | 4718 typedef void (*IndexedPropertyEnumeratorCallback)( |
| 4742 const PropertyCallbackInfo<Array>& info); | 4719 const PropertyCallbackInfo<Array>& info); |
| 4743 | 4720 |
| 4744 typedef void (*IndexedPropertyDefinerCallback)( | |
| 4745 uint32_t index, const PropertyDescriptor& desc, | |
| 4746 const PropertyCallbackInfo<Value>& info); | |
| 4747 | 4721 |
| 4748 /** | 4722 /** |
| 4749 * Access type specification. | 4723 * Access type specification. |
| 4750 */ | 4724 */ |
| 4751 enum AccessType { | 4725 enum AccessType { |
| 4752 ACCESS_GET, | 4726 ACCESS_GET, |
| 4753 ACCESS_SET, | 4727 ACCESS_SET, |
| 4754 ACCESS_HAS, | 4728 ACCESS_HAS, |
| 4755 ACCESS_DELETE, | 4729 ACCESS_DELETE, |
| 4756 ACCESS_KEYS | 4730 ACCESS_KEYS |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4999 GenericNamedPropertyQueryCallback query = 0, | 4973 GenericNamedPropertyQueryCallback query = 0, |
| 5000 GenericNamedPropertyDeleterCallback deleter = 0, | 4974 GenericNamedPropertyDeleterCallback deleter = 0, |
| 5001 GenericNamedPropertyEnumeratorCallback enumerator = 0, | 4975 GenericNamedPropertyEnumeratorCallback enumerator = 0, |
| 5002 Local<Value> data = Local<Value>(), | 4976 Local<Value> data = Local<Value>(), |
| 5003 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) | 4977 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) |
| 5004 : getter(getter), | 4978 : getter(getter), |
| 5005 setter(setter), | 4979 setter(setter), |
| 5006 query(query), | 4980 query(query), |
| 5007 deleter(deleter), | 4981 deleter(deleter), |
| 5008 enumerator(enumerator), | 4982 enumerator(enumerator), |
| 5009 definer(0), | |
| 5010 data(data), | 4983 data(data), |
| 5011 flags(flags) {} | 4984 flags(flags) {} |
| 5012 | 4985 |
| 5013 NamedPropertyHandlerConfiguration( | |
| 5014 GenericNamedPropertyGetterCallback getter, | |
| 5015 GenericNamedPropertySetterCallback setter, | |
| 5016 GenericNamedPropertyQueryCallback query, | |
| 5017 GenericNamedPropertyDeleterCallback deleter, | |
| 5018 GenericNamedPropertyEnumeratorCallback enumerator, | |
| 5019 GenericNamedPropertyDefinerCallback definer, | |
| 5020 Local<Value> data = Local<Value>(), | |
| 5021 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) | |
| 5022 : getter(getter), | |
| 5023 setter(setter), | |
| 5024 query(query), | |
| 5025 deleter(deleter), | |
| 5026 enumerator(enumerator), | |
| 5027 definer(definer), | |
| 5028 data(data), | |
| 5029 flags(flags) {} | |
| 5030 | |
| 5031 GenericNamedPropertyGetterCallback getter; | 4986 GenericNamedPropertyGetterCallback getter; |
| 5032 GenericNamedPropertySetterCallback setter; | 4987 GenericNamedPropertySetterCallback setter; |
| 5033 GenericNamedPropertyQueryCallback query; | 4988 GenericNamedPropertyQueryCallback query; |
| 5034 GenericNamedPropertyDeleterCallback deleter; | 4989 GenericNamedPropertyDeleterCallback deleter; |
| 5035 GenericNamedPropertyEnumeratorCallback enumerator; | 4990 GenericNamedPropertyEnumeratorCallback enumerator; |
| 5036 GenericNamedPropertyDefinerCallback definer; | |
| 5037 Local<Value> data; | 4991 Local<Value> data; |
| 5038 PropertyHandlerFlags flags; | 4992 PropertyHandlerFlags flags; |
| 5039 }; | 4993 }; |
| 5040 | 4994 |
| 5041 | 4995 |
| 5042 struct IndexedPropertyHandlerConfiguration { | 4996 struct IndexedPropertyHandlerConfiguration { |
| 5043 IndexedPropertyHandlerConfiguration( | 4997 IndexedPropertyHandlerConfiguration( |
| 5044 /** Note: getter is required **/ | 4998 /** Note: getter is required **/ |
| 5045 IndexedPropertyGetterCallback getter = 0, | 4999 IndexedPropertyGetterCallback getter = 0, |
| 5046 IndexedPropertySetterCallback setter = 0, | 5000 IndexedPropertySetterCallback setter = 0, |
| 5047 IndexedPropertyQueryCallback query = 0, | 5001 IndexedPropertyQueryCallback query = 0, |
| 5048 IndexedPropertyDeleterCallback deleter = 0, | 5002 IndexedPropertyDeleterCallback deleter = 0, |
| 5049 IndexedPropertyEnumeratorCallback enumerator = 0, | 5003 IndexedPropertyEnumeratorCallback enumerator = 0, |
| 5050 Local<Value> data = Local<Value>(), | 5004 Local<Value> data = Local<Value>(), |
| 5051 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) | 5005 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) |
| 5052 : getter(getter), | 5006 : getter(getter), |
| 5053 setter(setter), | 5007 setter(setter), |
| 5054 query(query), | 5008 query(query), |
| 5055 deleter(deleter), | 5009 deleter(deleter), |
| 5056 enumerator(enumerator), | 5010 enumerator(enumerator), |
| 5057 definer(0), | |
| 5058 data(data), | 5011 data(data), |
| 5059 flags(flags) {} | 5012 flags(flags) {} |
| 5060 | 5013 |
| 5061 IndexedPropertyHandlerConfiguration( | |
| 5062 IndexedPropertyGetterCallback getter, | |
| 5063 IndexedPropertySetterCallback setter, IndexedPropertyQueryCallback query, | |
| 5064 IndexedPropertyDeleterCallback deleter, | |
| 5065 IndexedPropertyEnumeratorCallback enumerator, | |
| 5066 IndexedPropertyDefinerCallback definer, | |
| 5067 Local<Value> data = Local<Value>(), | |
| 5068 PropertyHandlerFlags flags = PropertyHandlerFlags::kNone) | |
| 5069 : getter(getter), | |
| 5070 setter(setter), | |
| 5071 query(query), | |
| 5072 deleter(deleter), | |
| 5073 enumerator(enumerator), | |
| 5074 definer(definer), | |
| 5075 data(data), | |
| 5076 flags(flags) {} | |
| 5077 | |
| 5078 IndexedPropertyGetterCallback getter; | 5014 IndexedPropertyGetterCallback getter; |
| 5079 IndexedPropertySetterCallback setter; | 5015 IndexedPropertySetterCallback setter; |
| 5080 IndexedPropertyQueryCallback query; | 5016 IndexedPropertyQueryCallback query; |
| 5081 IndexedPropertyDeleterCallback deleter; | 5017 IndexedPropertyDeleterCallback deleter; |
| 5082 IndexedPropertyEnumeratorCallback enumerator; | 5018 IndexedPropertyEnumeratorCallback enumerator; |
| 5083 IndexedPropertyDefinerCallback definer; | |
| 5084 Local<Value> data; | 5019 Local<Value> data; |
| 5085 PropertyHandlerFlags flags; | 5020 PropertyHandlerFlags flags; |
| 5086 }; | 5021 }; |
| 5087 | 5022 |
| 5088 | 5023 |
| 5089 /** | 5024 /** |
| 5090 * An ObjectTemplate is used to create objects at runtime. | 5025 * An ObjectTemplate is used to create objects at runtime. |
| 5091 * | 5026 * |
| 5092 * Properties added to an ObjectTemplate are added to each object | 5027 * Properties added to an ObjectTemplate are added to each object |
| 5093 * created from the ObjectTemplate. | 5028 * created from the ObjectTemplate. |
| (...skipping 4324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9418 */ | 9353 */ |
| 9419 | 9354 |
| 9420 | 9355 |
| 9421 } // namespace v8 | 9356 } // namespace v8 |
| 9422 | 9357 |
| 9423 | 9358 |
| 9424 #undef TYPE_CHECK | 9359 #undef TYPE_CHECK |
| 9425 | 9360 |
| 9426 | 9361 |
| 9427 #endif // INCLUDE_V8_H_ | 9362 #endif // INCLUDE_V8_H_ |
| OLD | NEW |