| 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 4365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4376 }; | 4376 }; |
| 4377 | 4377 |
| 4378 | 4378 |
| 4379 /** | 4379 /** |
| 4380 * Returns true if the given context should be allowed to access the given | 4380 * Returns true if the given context should be allowed to access the given |
| 4381 * object. | 4381 * object. |
| 4382 */ | 4382 */ |
| 4383 typedef bool (*AccessCheckCallback)(Local<Context> accessing_context, | 4383 typedef bool (*AccessCheckCallback)(Local<Context> accessing_context, |
| 4384 Local<Object> accessed_object, | 4384 Local<Object> accessed_object, |
| 4385 Local<Value> data); | 4385 Local<Value> data); |
| 4386 typedef bool (*DeprecatedAccessCheckCallback)(Local<Context> accessing_context, | |
| 4387 Local<Object> accessed_object); | |
| 4388 | |
| 4389 /** | |
| 4390 * Returns true if cross-context access should be allowed to the named | |
| 4391 * property with the given key on the host object. | |
| 4392 */ | |
| 4393 typedef bool (*NamedSecurityCallback)(Local<Object> host, | |
| 4394 Local<Value> key, | |
| 4395 AccessType type, | |
| 4396 Local<Value> data); | |
| 4397 | |
| 4398 | |
| 4399 /** | |
| 4400 * Returns true if cross-context access should be allowed to the indexed | |
| 4401 * property with the given index on the host object. | |
| 4402 */ | |
| 4403 typedef bool (*IndexedSecurityCallback)(Local<Object> host, | |
| 4404 uint32_t index, | |
| 4405 AccessType type, | |
| 4406 Local<Value> data); | |
| 4407 | |
| 4408 | 4386 |
| 4409 /** | 4387 /** |
| 4410 * A FunctionTemplate is used to create functions at runtime. There | 4388 * A FunctionTemplate is used to create functions at runtime. There |
| 4411 * can only be one function created from a FunctionTemplate in a | 4389 * can only be one function created from a FunctionTemplate in a |
| 4412 * context. The lifetime of the created function is equal to the | 4390 * context. The lifetime of the created function is equal to the |
| 4413 * lifetime of the context. So in case the embedder needs to create | 4391 * lifetime of the context. So in case the embedder needs to create |
| 4414 * temporary functions that can be collected using Scripts is | 4392 * temporary functions that can be collected using Scripts is |
| 4415 * preferred. | 4393 * preferred. |
| 4416 * | 4394 * |
| 4417 * Any modification of a FunctionTemplate after first instantiation will trigger | 4395 * Any modification of a FunctionTemplate after first instantiation will trigger |
| (...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4807 /** | 4785 /** |
| 4808 * Sets access check callback on the object template and enables access | 4786 * Sets access check callback on the object template and enables access |
| 4809 * checks. | 4787 * checks. |
| 4810 * | 4788 * |
| 4811 * When accessing properties on instances of this object template, | 4789 * When accessing properties on instances of this object template, |
| 4812 * the access check callback will be called to determine whether or | 4790 * the access check callback will be called to determine whether or |
| 4813 * not to allow cross-context access to the properties. | 4791 * not to allow cross-context access to the properties. |
| 4814 */ | 4792 */ |
| 4815 void SetAccessCheckCallback(AccessCheckCallback callback, | 4793 void SetAccessCheckCallback(AccessCheckCallback callback, |
| 4816 Local<Value> data = Local<Value>()); | 4794 Local<Value> data = Local<Value>()); |
| 4817 V8_DEPRECATED( | |
| 4818 "Use SetAccessCheckCallback with new AccessCheckCallback signature.", | |
| 4819 void SetAccessCheckCallback(DeprecatedAccessCheckCallback callback, | |
| 4820 Local<Value> data = Local<Value>())); | |
| 4821 | |
| 4822 V8_DEPRECATED( | |
| 4823 "Use SetAccessCheckCallback instead", | |
| 4824 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, | |
| 4825 IndexedSecurityCallback indexed_handler, | |
| 4826 Local<Value> data = Local<Value>())); | |
| 4827 | |
| 4828 /** | 4795 /** |
| 4829 * Gets the number of internal fields for objects generated from | 4796 * Gets the number of internal fields for objects generated from |
| 4830 * this template. | 4797 * this template. |
| 4831 */ | 4798 */ |
| 4832 int InternalFieldCount(); | 4799 int InternalFieldCount(); |
| 4833 | 4800 |
| 4834 /** | 4801 /** |
| 4835 * Sets the number of internal fields for objects generated from | 4802 * Sets the number of internal fields for objects generated from |
| 4836 * this template. | 4803 * this template. |
| 4837 */ | 4804 */ |
| (...skipping 3991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8829 */ | 8796 */ |
| 8830 | 8797 |
| 8831 | 8798 |
| 8832 } // namespace v8 | 8799 } // namespace v8 |
| 8833 | 8800 |
| 8834 | 8801 |
| 8835 #undef TYPE_CHECK | 8802 #undef TYPE_CHECK |
| 8836 | 8803 |
| 8837 | 8804 |
| 8838 #endif // INCLUDE_V8_H_ | 8805 #endif // INCLUDE_V8_H_ |
| OLD | NEW |