| 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 2619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2630 * | 2630 * |
| 2631 * TODO(dcarney): Remove PROHIBITS_OVERWRITING as it is now unused. | 2631 * TODO(dcarney): Remove PROHIBITS_OVERWRITING as it is now unused. |
| 2632 */ | 2632 */ |
| 2633 enum AccessControl { | 2633 enum AccessControl { |
| 2634 DEFAULT = 0, | 2634 DEFAULT = 0, |
| 2635 ALL_CAN_READ = 1, | 2635 ALL_CAN_READ = 1, |
| 2636 ALL_CAN_WRITE = 1 << 1, | 2636 ALL_CAN_WRITE = 1 << 1, |
| 2637 PROHIBITS_OVERWRITING = 1 << 2 | 2637 PROHIBITS_OVERWRITING = 1 << 2 |
| 2638 }; | 2638 }; |
| 2639 | 2639 |
| 2640 /** |
| 2641 * Integrity level for objects. |
| 2642 */ |
| 2643 enum class IntegrityLevel { kFrozen, kSealed }; |
| 2640 | 2644 |
| 2641 /** | 2645 /** |
| 2642 * A JavaScript object (ECMA-262, 4.3.3) | 2646 * A JavaScript object (ECMA-262, 4.3.3) |
| 2643 */ | 2647 */ |
| 2644 class V8_EXPORT Object : public Value { | 2648 class V8_EXPORT Object : public Value { |
| 2645 public: | 2649 public: |
| 2646 V8_DEPRECATE_SOON("Use maybe version", | 2650 V8_DEPRECATE_SOON("Use maybe version", |
| 2647 bool Set(Local<Value> key, Local<Value> value)); | 2651 bool Set(Local<Value> key, Local<Value> value)); |
| 2648 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, | 2652 V8_WARN_UNUSED_RESULT Maybe<bool> Set(Local<Context> context, |
| 2649 Local<Value> key, Local<Value> value); | 2653 Local<Value> key, Local<Value> value); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2821 */ | 2825 */ |
| 2822 V8_DEPRECATED("Use maybe version", Local<String> ObjectProtoToString()); | 2826 V8_DEPRECATED("Use maybe version", Local<String> ObjectProtoToString()); |
| 2823 V8_WARN_UNUSED_RESULT MaybeLocal<String> ObjectProtoToString( | 2827 V8_WARN_UNUSED_RESULT MaybeLocal<String> ObjectProtoToString( |
| 2824 Local<Context> context); | 2828 Local<Context> context); |
| 2825 | 2829 |
| 2826 /** | 2830 /** |
| 2827 * Returns the name of the function invoked as a constructor for this object. | 2831 * Returns the name of the function invoked as a constructor for this object. |
| 2828 */ | 2832 */ |
| 2829 Local<String> GetConstructorName(); | 2833 Local<String> GetConstructorName(); |
| 2830 | 2834 |
| 2835 /** |
| 2836 * Sets the integrity level of the object. |
| 2837 */ |
| 2838 Maybe<bool> SetIntegrityLevel(Local<Context> context, IntegrityLevel level); |
| 2839 |
| 2831 /** Gets the number of internal fields for this Object. */ | 2840 /** Gets the number of internal fields for this Object. */ |
| 2832 int InternalFieldCount(); | 2841 int InternalFieldCount(); |
| 2833 | 2842 |
| 2834 /** Same as above, but works for Persistents */ | 2843 /** Same as above, but works for Persistents */ |
| 2835 V8_INLINE static int InternalFieldCount( | 2844 V8_INLINE static int InternalFieldCount( |
| 2836 const PersistentBase<Object>& object) { | 2845 const PersistentBase<Object>& object) { |
| 2837 return object.val_->InternalFieldCount(); | 2846 return object.val_->InternalFieldCount(); |
| 2838 } | 2847 } |
| 2839 | 2848 |
| 2840 /** Gets the value from an internal field. */ | 2849 /** Gets the value from an internal field. */ |
| (...skipping 5908 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8749 */ | 8758 */ |
| 8750 | 8759 |
| 8751 | 8760 |
| 8752 } // namespace v8 | 8761 } // namespace v8 |
| 8753 | 8762 |
| 8754 | 8763 |
| 8755 #undef TYPE_CHECK | 8764 #undef TYPE_CHECK |
| 8756 | 8765 |
| 8757 | 8766 |
| 8758 #endif // INCLUDE_V8_H_ | 8767 #endif // INCLUDE_V8_H_ |
| OLD | NEW |