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 2970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2981 Local<Value> value); | 2981 Local<Value> value); |
2982 | 2982 |
2983 // Implements DefineOwnProperty. | 2983 // Implements DefineOwnProperty. |
2984 // | 2984 // |
2985 // In general, CreateDataProperty will be faster, however, does not allow | 2985 // In general, CreateDataProperty will be faster, however, does not allow |
2986 // for specifying attributes. | 2986 // for specifying attributes. |
2987 // | 2987 // |
2988 // Returns true on success. | 2988 // Returns true on success. |
2989 V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty( | 2989 V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty( |
2990 Local<Context> context, Local<Name> key, Local<Value> value, | 2990 Local<Context> context, Local<Name> key, Local<Value> value, |
2991 PropertyAttribute attributes = None); | 2991 PropertyAttribute attributes = None, bool bypass_interceptor = false); |
2992 | 2992 |
2993 // Implements Object.DefineProperty(O, P, Attributes), see Ecma-262 19.1.2.4. | 2993 // Implements Object.DefineProperty(O, P, Attributes), see Ecma-262 19.1.2.4. |
2994 // | 2994 // |
2995 // The defineProperty function is used to add an own property or | 2995 // The defineProperty function is used to add an own property or |
2996 // update the attributes of an existing own property of an object. | 2996 // update the attributes of an existing own property of an object. |
2997 // | 2997 // |
2998 // Both data and accessor descriptors can be used. | 2998 // Both data and accessor descriptors can be used. |
2999 // | 2999 // |
3000 // In general, CreateDataProperty is faster, however, does not allow | 3000 // In general, CreateDataProperty is faster, however, does not allow |
3001 // for specifying attributes or an accessor descriptor. | 3001 // for specifying attributes or an accessor descriptor. |
3002 // | 3002 // |
3003 // The PropertyDescriptor can change when redefining a property. | 3003 // The PropertyDescriptor can change when redefining a property. |
3004 // | 3004 // |
| 3005 // Bypass_interceptor = true sets object own property bypassing interceptors |
| 3006 // |
3005 // Returns true on success. | 3007 // Returns true on success. |
3006 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty( | 3008 V8_WARN_UNUSED_RESULT Maybe<bool> DefineProperty( |
3007 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor); | 3009 Local<Context> context, Local<Name> key, PropertyDescriptor& descriptor, |
| 3010 bool bypass_interceptor = false); |
3008 | 3011 |
3009 // Sets an own property on this object bypassing interceptors and | 3012 // Sets an own property on this object bypassing interceptors and |
3010 // overriding accessors or read-only properties. | 3013 // overriding accessors or read-only properties. |
3011 // | 3014 // |
3012 // Note that if the object has an interceptor the property will be set | 3015 // Note that if the object has an interceptor the property will be set |
3013 // locally, but since the interceptor takes precedence the local property | 3016 // locally, but since the interceptor takes precedence the local property |
3014 // will only be returned if the interceptor doesn't return a value. | 3017 // will only be returned if the interceptor doesn't return a value. |
3015 // | 3018 // |
3016 // Note also that this only works for named properties. | 3019 // Note also that this only works for named properties. |
3017 V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty", | 3020 V8_DEPRECATED("Use CreateDataProperty / DefineOwnProperty", |
(...skipping 6973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9991 */ | 9994 */ |
9992 | 9995 |
9993 | 9996 |
9994 } // namespace v8 | 9997 } // namespace v8 |
9995 | 9998 |
9996 | 9999 |
9997 #undef TYPE_CHECK | 10000 #undef TYPE_CHECK |
9998 | 10001 |
9999 | 10002 |
10000 #endif // INCLUDE_V8_H_ | 10003 #endif // INCLUDE_V8_H_ |
OLD | NEW |