| 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 2574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2585 V8_DEPRECATE_SOON("Use maybe version", | 2585 V8_DEPRECATE_SOON("Use maybe version", |
| 2586 bool Set(Handle<Value> key, Handle<Value> value)); | 2586 bool Set(Handle<Value> key, Handle<Value> value)); |
| 2587 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, | 2587 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, |
| 2588 Local<Value> key, Local<Value> value); | 2588 Local<Value> key, Local<Value> value); |
| 2589 | 2589 |
| 2590 V8_DEPRECATE_SOON("Use maybe version", | 2590 V8_DEPRECATE_SOON("Use maybe version", |
| 2591 bool Set(uint32_t index, Handle<Value> value)); | 2591 bool Set(uint32_t index, Handle<Value> value)); |
| 2592 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index, | 2592 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, uint32_t index, |
| 2593 Local<Value> value); | 2593 Local<Value> value); |
| 2594 | 2594 |
| 2595 // Implements CreateDataProperty (ECMA-262, 7.3.4). |
| 2596 // |
| 2597 // Defines a configurable, writable, enumerable property with the given value |
| 2598 // on the object unless the property already exists and is not configurable |
| 2599 // or the object is not extensible. |
| 2600 // |
| 2601 // Returns true on success. |
| 2602 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, |
| 2603 Local<Name> key, |
| 2604 Local<Value> value); |
| 2605 V8_WARN_UNUSED_RESULT Maybe<bool> CreateDataProperty(Local<Context> context, |
| 2606 uint32_t index, |
| 2607 Local<Value> value); |
| 2608 |
| 2595 // Sets an own property on this object bypassing interceptors and | 2609 // Sets an own property on this object bypassing interceptors and |
| 2596 // overriding accessors or read-only properties. | 2610 // overriding accessors or read-only properties. |
| 2597 // | 2611 // |
| 2598 // Note that if the object has an interceptor the property will be set | 2612 // Note that if the object has an interceptor the property will be set |
| 2599 // locally, but since the interceptor takes precedence the local property | 2613 // locally, but since the interceptor takes precedence the local property |
| 2600 // will only be returned if the interceptor doesn't return a value. | 2614 // will only be returned if the interceptor doesn't return a value. |
| 2601 // | 2615 // |
| 2602 // Note also that this only works for named properties. | 2616 // Note also that this only works for named properties. |
| 2603 V8_DEPRECATE_SOON("Use maybe version", | 2617 V8_DEPRECATE_SOON("Use CreateDataProperty", |
| 2604 bool ForceSet(Handle<Value> key, Handle<Value> value, | 2618 bool ForceSet(Handle<Value> key, Handle<Value> value, |
| 2605 PropertyAttribute attribs = None)); | 2619 PropertyAttribute attribs = None)); |
| 2606 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 2620 V8_DEPRECATE_SOON("Use CreateDataProperty", |
| 2607 Maybe<bool> ForceSet(Local<Context> context, Local<Value> key, | 2621 Maybe<bool> ForceSet(Local<Context> context, |
| 2608 Local<Value> value, PropertyAttribute attribs = None); | 2622 Local<Value> key, Local<Value> value, |
| 2623 PropertyAttribute attribs = None)); |
| 2609 | 2624 |
| 2610 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Handle<Value> key)); | 2625 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(Handle<Value> key)); |
| 2611 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context, | 2626 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context, |
| 2612 Local<Value> key); | 2627 Local<Value> key); |
| 2613 | 2628 |
| 2614 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index)); | 2629 V8_DEPRECATE_SOON("Use maybe version", Local<Value> Get(uint32_t index)); |
| 2615 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context, | 2630 V8_WARN_UNUSED_RESULT MaybeLocal<Value> Get(Local<Context> context, |
| 2616 uint32_t index); | 2631 uint32_t index); |
| 2617 | 2632 |
| 2618 /** | 2633 /** |
| (...skipping 5589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8208 */ | 8223 */ |
| 8209 | 8224 |
| 8210 | 8225 |
| 8211 } // namespace v8 | 8226 } // namespace v8 |
| 8212 | 8227 |
| 8213 | 8228 |
| 8214 #undef TYPE_CHECK | 8229 #undef TYPE_CHECK |
| 8215 | 8230 |
| 8216 | 8231 |
| 8217 #endif // V8_H_ | 8232 #endif // V8_H_ |
| OLD | NEW |