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 2971 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2982 * \note Has() converts the key to a name, which possibly calls back into | 2982 * \note Has() converts the key to a name, which possibly calls back into |
2983 * JavaScript. | 2983 * JavaScript. |
2984 * | 2984 * |
2985 * See also v8::Object::HasOwnProperty() and | 2985 * See also v8::Object::HasOwnProperty() and |
2986 * v8::Object::HasRealNamedProperty(). | 2986 * v8::Object::HasRealNamedProperty(). |
2987 */ | 2987 */ |
2988 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, | 2988 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, |
2989 Local<Value> key); | 2989 Local<Value> key); |
2990 | 2990 |
2991 V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local<Value> key)); | 2991 V8_DEPRECATE_SOON("Use maybe version", bool Delete(Local<Value> key)); |
2992 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 2992 V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context, |
2993 Maybe<bool> Delete(Local<Context> context, Local<Value> key); | 2993 Local<Value> key); |
2994 | 2994 |
2995 V8_DEPRECATED("Use maybe version", bool Has(uint32_t index)); | 2995 V8_DEPRECATED("Use maybe version", bool Has(uint32_t index)); |
2996 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, uint32_t index); | 2996 V8_WARN_UNUSED_RESULT Maybe<bool> Has(Local<Context> context, |
| 2997 uint32_t index); |
2997 | 2998 |
2998 V8_DEPRECATED("Use maybe version", bool Delete(uint32_t index)); | 2999 V8_DEPRECATED("Use maybe version", bool Delete(uint32_t index)); |
2999 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 3000 V8_WARN_UNUSED_RESULT Maybe<bool> Delete(Local<Context> context, |
3000 Maybe<bool> Delete(Local<Context> context, uint32_t index); | 3001 uint32_t index); |
3001 | 3002 |
3002 V8_DEPRECATED("Use maybe version", | 3003 V8_DEPRECATED("Use maybe version", |
3003 bool SetAccessor(Local<String> name, | 3004 bool SetAccessor(Local<String> name, |
3004 AccessorGetterCallback getter, | 3005 AccessorGetterCallback getter, |
3005 AccessorSetterCallback setter = 0, | 3006 AccessorSetterCallback setter = 0, |
3006 Local<Value> data = Local<Value>(), | 3007 Local<Value> data = Local<Value>(), |
3007 AccessControl settings = DEFAULT, | 3008 AccessControl settings = DEFAULT, |
3008 PropertyAttribute attribute = None)); | 3009 PropertyAttribute attribute = None)); |
3009 V8_DEPRECATED("Use maybe version", | 3010 V8_DEPRECATED("Use maybe version", |
3010 bool SetAccessor(Local<Name> name, | 3011 bool SetAccessor(Local<Name> name, |
3011 AccessorNameGetterCallback getter, | 3012 AccessorNameGetterCallback getter, |
3012 AccessorNameSetterCallback setter = 0, | 3013 AccessorNameSetterCallback setter = 0, |
3013 Local<Value> data = Local<Value>(), | 3014 Local<Value> data = Local<Value>(), |
3014 AccessControl settings = DEFAULT, | 3015 AccessControl settings = DEFAULT, |
3015 PropertyAttribute attribute = None)); | 3016 PropertyAttribute attribute = None)); |
3016 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 3017 V8_WARN_UNUSED_RESULT Maybe<bool> SetAccessor(Local<Context> context, |
3017 Maybe<bool> SetAccessor(Local<Context> context, Local<Name> name, | 3018 Local<Name> name, |
3018 AccessorNameGetterCallback getter, | 3019 AccessorNameGetterCallback getter, |
3019 AccessorNameSetterCallback setter = 0, | 3020 AccessorNameSetterCallback setter = 0, |
3020 MaybeLocal<Value> data = MaybeLocal<Value>(), | 3021 MaybeLocal<Value> data = MaybeLocal<Value>(), |
3021 AccessControl settings = DEFAULT, | 3022 AccessControl settings = DEFAULT, |
3022 PropertyAttribute attribute = None); | 3023 PropertyAttribute attribute = None); |
3023 | 3024 |
3024 void SetAccessorProperty(Local<Name> name, Local<Function> getter, | 3025 void SetAccessorProperty(Local<Name> name, Local<Function> getter, |
3025 Local<Function> setter = Local<Function>(), | 3026 Local<Function> setter = Local<Function>(), |
3026 PropertyAttribute attribute = None, | 3027 PropertyAttribute attribute = None, |
3027 AccessControl settings = DEFAULT); | 3028 AccessControl settings = DEFAULT); |
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3739 /** | 3740 /** |
3740 * Extract the associated promise. | 3741 * Extract the associated promise. |
3741 */ | 3742 */ |
3742 Local<Promise> GetPromise(); | 3743 Local<Promise> GetPromise(); |
3743 | 3744 |
3744 /** | 3745 /** |
3745 * Resolve/reject the associated promise with a given value. | 3746 * Resolve/reject the associated promise with a given value. |
3746 * Ignored if the promise is no longer pending. | 3747 * Ignored if the promise is no longer pending. |
3747 */ | 3748 */ |
3748 V8_DEPRECATE_SOON("Use maybe version", void Resolve(Local<Value> value)); | 3749 V8_DEPRECATE_SOON("Use maybe version", void Resolve(Local<Value> value)); |
3749 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 3750 V8_WARN_UNUSED_RESULT Maybe<bool> Resolve(Local<Context> context, |
3750 Maybe<bool> Resolve(Local<Context> context, Local<Value> value); | 3751 Local<Value> value); |
3751 | 3752 |
3752 V8_DEPRECATE_SOON("Use maybe version", void Reject(Local<Value> value)); | 3753 V8_DEPRECATE_SOON("Use maybe version", void Reject(Local<Value> value)); |
3753 // TODO(dcarney): mark V8_WARN_UNUSED_RESULT | 3754 V8_WARN_UNUSED_RESULT Maybe<bool> Reject(Local<Context> context, |
3754 Maybe<bool> Reject(Local<Context> context, Local<Value> value); | 3755 Local<Value> value); |
3755 | 3756 |
3756 V8_INLINE static Resolver* Cast(Value* obj); | 3757 V8_INLINE static Resolver* Cast(Value* obj); |
3757 | 3758 |
3758 private: | 3759 private: |
3759 Resolver(); | 3760 Resolver(); |
3760 static void CheckCast(Value* obj); | 3761 static void CheckCast(Value* obj); |
3761 }; | 3762 }; |
3762 | 3763 |
3763 /** | 3764 /** |
3764 * Register a resolution/rejection handler with a promise. | 3765 * Register a resolution/rejection handler with a promise. |
(...skipping 6071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9836 */ | 9837 */ |
9837 | 9838 |
9838 | 9839 |
9839 } // namespace v8 | 9840 } // namespace v8 |
9840 | 9841 |
9841 | 9842 |
9842 #undef TYPE_CHECK | 9843 #undef TYPE_CHECK |
9843 | 9844 |
9844 | 9845 |
9845 #endif // INCLUDE_V8_H_ | 9846 #endif // INCLUDE_V8_H_ |
OLD | NEW |