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 2582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2593 // or the object is not extensible. | 2593 // or the object is not extensible. |
2594 // | 2594 // |
2595 // Returns true on success. | 2595 // Returns true on success. |
2596 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, | 2596 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, |
2597 Local<Name> key, | 2597 Local<Name> key, |
2598 Local<Value> value); | 2598 Local<Value> value); |
2599 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, | 2599 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, |
2600 uint32_t index, | 2600 uint32_t index, |
2601 Local<Value> value); | 2601 Local<Value> value); |
2602 | 2602 |
| 2603 // Implements DefineOwnProperty. |
| 2604 // |
| 2605 // In general, CreateDataProperty will be faster, however, does not allow |
| 2606 // for specifying attributes. |
| 2607 // |
| 2608 // Returns true on success. |
| 2609 V8_WARN_UNUSED_RESULT Maybe<bool> DefineOwnProperty( |
| 2610 Local<Context> context, Local<Name> key, Local<Value> value, |
| 2611 PropertyAttribute attributes = None); |
| 2612 |
2603 // Sets an own property on this object bypassing interceptors and | 2613 // Sets an own property on this object bypassing interceptors and |
2604 // overriding accessors or read-only properties. | 2614 // overriding accessors or read-only properties. |
2605 // | 2615 // |
2606 // Note that if the object has an interceptor the property will be set | 2616 // Note that if the object has an interceptor the property will be set |
2607 // locally, but since the interceptor takes precedence the local property | 2617 // locally, but since the interceptor takes precedence the local property |
2608 // will only be returned if the interceptor doesn't return a value. | 2618 // will only be returned if the interceptor doesn't return a value. |
2609 // | 2619 // |
2610 // Note also that this only works for named properties. | 2620 // Note also that this only works for named properties. |
2611 V8_DEPRECATE_SOON("Use CreateDataProperty", | 2621 V8_DEPRECATE_SOON("Use CreateDataProperty", |
2612 bool ForceSet(Handle<Value> key, Handle<Value> value, | 2622 bool ForceSet(Handle<Value> key, Handle<Value> value, |
(...skipping 5686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8299 */ | 8309 */ |
8300 | 8310 |
8301 | 8311 |
8302 } // namespace v8 | 8312 } // namespace v8 |
8303 | 8313 |
8304 | 8314 |
8305 #undef TYPE_CHECK | 8315 #undef TYPE_CHECK |
8306 | 8316 |
8307 | 8317 |
8308 #endif // V8_H_ | 8318 #endif // V8_H_ |
OLD | NEW |