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 2841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2852 V8_WARN_UNUSED_RESULT Maybe<PropertyAttribute> GetRealNamedPropertyAttributes( | 2852 V8_WARN_UNUSED_RESULT Maybe<PropertyAttribute> GetRealNamedPropertyAttributes( |
2853 Local<Context> context, Local<Name> key); | 2853 Local<Context> context, Local<Name> key); |
2854 | 2854 |
2855 /** Tests for a named lookup interceptor.*/ | 2855 /** Tests for a named lookup interceptor.*/ |
2856 bool HasNamedLookupInterceptor(); | 2856 bool HasNamedLookupInterceptor(); |
2857 | 2857 |
2858 /** Tests for an index lookup interceptor.*/ | 2858 /** Tests for an index lookup interceptor.*/ |
2859 bool HasIndexedLookupInterceptor(); | 2859 bool HasIndexedLookupInterceptor(); |
2860 | 2860 |
2861 /** | 2861 /** |
2862 * Turns on access check on the object if the object is an instance of | |
2863 * a template that has access check callbacks. If an object has no | |
2864 * access check info, the object cannot be accessed by anyone. | |
2865 */ | |
2866 V8_DEPRECATE_SOON("No alternative", void TurnOnAccessCheck()); | |
2867 | |
2868 /** | |
2869 * Returns the identity hash for this object. The current implementation | 2862 * Returns the identity hash for this object. The current implementation |
2870 * uses a hidden property on the object to store the identity hash. | 2863 * uses a hidden property on the object to store the identity hash. |
2871 * | 2864 * |
2872 * The return value will never be 0. Also, it is not guaranteed to be | 2865 * The return value will never be 0. Also, it is not guaranteed to be |
2873 * unique. | 2866 * unique. |
2874 */ | 2867 */ |
2875 int GetIdentityHash(); | 2868 int GetIdentityHash(); |
2876 | 2869 |
2877 /** | 2870 /** |
2878 * Access hidden properties on JavaScript objects. These properties are | 2871 * Access hidden properties on JavaScript objects. These properties are |
(...skipping 1765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4644 * Mark object instances of the template as undetectable. | 4637 * Mark object instances of the template as undetectable. |
4645 * | 4638 * |
4646 * In many ways, undetectable objects behave as though they are not | 4639 * In many ways, undetectable objects behave as though they are not |
4647 * there. They behave like 'undefined' in conditionals and when | 4640 * there. They behave like 'undefined' in conditionals and when |
4648 * printed. However, properties can be accessed and called as on | 4641 * printed. However, properties can be accessed and called as on |
4649 * normal objects. | 4642 * normal objects. |
4650 */ | 4643 */ |
4651 void MarkAsUndetectable(); | 4644 void MarkAsUndetectable(); |
4652 | 4645 |
4653 /** | 4646 /** |
4654 * Sets access check callbacks on the object template. | 4647 * Sets access check callbacks on the object template and enables |
| 4648 * access checks. |
4655 * | 4649 * |
4656 * When accessing properties on instances of this object template, | 4650 * When accessing properties on instances of this object template, |
4657 * the access check callback will be called to determine whether or | 4651 * the access check callback will be called to determine whether or |
4658 * not to allow cross-context access to the properties. | 4652 * not to allow cross-context access to the properties. |
4659 * The last parameter specifies whether access checks are turned | |
4660 * on by default on instances. If access checks are off by default, | |
4661 * they can be turned on on individual instances by calling | |
4662 * Object::TurnOnAccessCheck(). | |
4663 */ | 4653 */ |
4664 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, | 4654 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, |
4665 IndexedSecurityCallback indexed_handler, | 4655 IndexedSecurityCallback indexed_handler, |
4666 Handle<Value> data = Handle<Value>(), | 4656 Handle<Value> data = Handle<Value>()); |
4667 bool turned_on_by_default = true); | |
4668 | 4657 |
4669 /** | 4658 /** |
4670 * Gets the number of internal fields for objects generated from | 4659 * Gets the number of internal fields for objects generated from |
4671 * this template. | 4660 * this template. |
4672 */ | 4661 */ |
4673 int InternalFieldCount(); | 4662 int InternalFieldCount(); |
4674 | 4663 |
4675 /** | 4664 /** |
4676 * Sets the number of internal fields for objects generated from | 4665 * Sets the number of internal fields for objects generated from |
4677 * this template. | 4666 * this template. |
(...skipping 3683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8361 */ | 8350 */ |
8362 | 8351 |
8363 | 8352 |
8364 } // namespace v8 | 8353 } // namespace v8 |
8365 | 8354 |
8366 | 8355 |
8367 #undef TYPE_CHECK | 8356 #undef TYPE_CHECK |
8368 | 8357 |
8369 | 8358 |
8370 #endif // V8_H_ | 8359 #endif // V8_H_ |
OLD | NEW |