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 2621 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 * | 2632 * |
2633 * TODO(dcarney): Remove PROHIBITS_OVERWRITING as it is now unused. | 2633 * TODO(dcarney): Remove PROHIBITS_OVERWRITING as it is now unused. |
2634 */ | 2634 */ |
2635 enum AccessControl { | 2635 enum AccessControl { |
2636 DEFAULT = 0, | 2636 DEFAULT = 0, |
2637 ALL_CAN_READ = 1, | 2637 ALL_CAN_READ = 1, |
2638 ALL_CAN_WRITE = 1 << 1, | 2638 ALL_CAN_WRITE = 1 << 1, |
2639 PROHIBITS_OVERWRITING = 1 << 2 | 2639 PROHIBITS_OVERWRITING = 1 << 2 |
2640 }; | 2640 }; |
2641 | 2641 |
| 2642 /** |
| 2643 * Integrity level for objects. |
| 2644 */ |
| 2645 enum class IntegrityLevel { kFrozen, kSealed }; |
2642 | 2646 |
2643 /** | 2647 /** |
2644 * A JavaScript object (ECMA-262, 4.3.3) | 2648 * A JavaScript object (ECMA-262, 4.3.3) |
2645 */ | 2649 */ |
2646 class V8_EXPORT Object : public Value { | 2650 class V8_EXPORT Object : public Value { |
2647 public: | 2651 public: |
2648 V8_DEPRECATE_SOON("Use maybe version", | 2652 V8_DEPRECATE_SOON("Use maybe version", |
2649 bool Set(Local<Value> key, Local<Value> value)); | 2653 bool Set(Local<Value> key, Local<Value> value)); |
2650 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, | 2654 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, |
2651 Local<Value> key, Local<Value> value); | 2655 Local<Value> key, Local<Value> value); |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2823 */ | 2827 */ |
2824 V8_DEPRECATED("Use maybe version", Local<String> ObjectProtoToString()); | 2828 V8_DEPRECATED("Use maybe version", Local<String> ObjectProtoToString()); |
2825 V8_WARN_UNUSED_RESULT MaybeLocal<String> ObjectProtoToString( | 2829 V8_WARN_UNUSED_RESULT MaybeLocal<String> ObjectProtoToString( |
2826 Local<Context> context); | 2830 Local<Context> context); |
2827 | 2831 |
2828 /** | 2832 /** |
2829 * Returns the name of the function invoked as a constructor for this object. | 2833 * Returns the name of the function invoked as a constructor for this object. |
2830 */ | 2834 */ |
2831 Local<String> GetConstructorName(); | 2835 Local<String> GetConstructorName(); |
2832 | 2836 |
| 2837 /** |
| 2838 * Sets the integrity level of the object. |
| 2839 */ |
| 2840 Maybe<bool> SetIntegrityLevel(Local<Context> context, IntegrityLevel level); |
| 2841 |
2833 /** Gets the number of internal fields for this Object. */ | 2842 /** Gets the number of internal fields for this Object. */ |
2834 int InternalFieldCount(); | 2843 int InternalFieldCount(); |
2835 | 2844 |
2836 /** Same as above, but works for Persistents */ | 2845 /** Same as above, but works for Persistents */ |
2837 V8_INLINE static int InternalFieldCount( | 2846 V8_INLINE static int InternalFieldCount( |
2838 const PersistentBase<Object>& object) { | 2847 const PersistentBase<Object>& object) { |
2839 return object.val_->InternalFieldCount(); | 2848 return object.val_->InternalFieldCount(); |
2840 } | 2849 } |
2841 | 2850 |
2842 /** Gets the value from an internal field. */ | 2851 /** Gets the value from an internal field. */ |
(...skipping 5927 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8770 */ | 8779 */ |
8771 | 8780 |
8772 | 8781 |
8773 } // namespace v8 | 8782 } // namespace v8 |
8774 | 8783 |
8775 | 8784 |
8776 #undef TYPE_CHECK | 8785 #undef TYPE_CHECK |
8777 | 8786 |
8778 | 8787 |
8779 #endif // INCLUDE_V8_H_ | 8788 #endif // INCLUDE_V8_H_ |
OLD | NEW |