| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 2187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2198 * Returns true if cross-context access should be allowed to the indexed | 2198 * Returns true if cross-context access should be allowed to the indexed |
| 2199 * property with the given index on the host object. | 2199 * property with the given index on the host object. |
| 2200 */ | 2200 */ |
| 2201 typedef bool (*IndexedSecurityCallback)(Local<Object> host, | 2201 typedef bool (*IndexedSecurityCallback)(Local<Object> host, |
| 2202 uint32_t index, | 2202 uint32_t index, |
| 2203 AccessType type, | 2203 AccessType type, |
| 2204 Local<Value> data); | 2204 Local<Value> data); |
| 2205 | 2205 |
| 2206 | 2206 |
| 2207 /** | 2207 /** |
| 2208 * Returns true if cross-context access should be allowed to |
| 2209 * observe data property mutations on the given host object. |
| 2210 * |
| 2211 * Only called when the --harmony-observation switch is enabled. |
| 2212 */ |
| 2213 typedef bool (*ObserveSecurityCallback)(Local<Object> host, Local<Value> data); |
| 2214 |
| 2215 |
| 2216 /** |
| 2208 * A FunctionTemplate is used to create functions at runtime. There | 2217 * A FunctionTemplate is used to create functions at runtime. There |
| 2209 * can only be one function created from a FunctionTemplate in a | 2218 * can only be one function created from a FunctionTemplate in a |
| 2210 * context. The lifetime of the created function is equal to the | 2219 * context. The lifetime of the created function is equal to the |
| 2211 * lifetime of the context. So in case the embedder needs to create | 2220 * lifetime of the context. So in case the embedder needs to create |
| 2212 * temporary functions that can be collected using Scripts is | 2221 * temporary functions that can be collected using Scripts is |
| 2213 * preferred. | 2222 * preferred. |
| 2214 * | 2223 * |
| 2215 * A FunctionTemplate can have properties, these properties are added to the | 2224 * A FunctionTemplate can have properties, these properties are added to the |
| 2216 * function object when it is created. | 2225 * function object when it is created. |
| 2217 * | 2226 * |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2516 * When accessing properties on instances of this object template, | 2525 * When accessing properties on instances of this object template, |
| 2517 * the access check callback will be called to determine whether or | 2526 * the access check callback will be called to determine whether or |
| 2518 * not to allow cross-context access to the properties. | 2527 * not to allow cross-context access to the properties. |
| 2519 * The last parameter specifies whether access checks are turned | 2528 * The last parameter specifies whether access checks are turned |
| 2520 * on by default on instances. If access checks are off by default, | 2529 * on by default on instances. If access checks are off by default, |
| 2521 * they can be turned on on individual instances by calling | 2530 * they can be turned on on individual instances by calling |
| 2522 * Object::TurnOnAccessCheck(). | 2531 * Object::TurnOnAccessCheck(). |
| 2523 */ | 2532 */ |
| 2524 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, | 2533 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, |
| 2525 IndexedSecurityCallback indexed_handler, | 2534 IndexedSecurityCallback indexed_handler, |
| 2535 ObserveSecurityCallback observe_handler, |
| 2536 Handle<Value> data = Handle<Value>(), |
| 2537 bool turned_on_by_default = true); |
| 2538 |
| 2539 /** |
| 2540 * Deprecated, call the 5-argument version instead. |
| 2541 */ |
| 2542 void SetAccessCheckCallbacks(NamedSecurityCallback named_handler, |
| 2543 IndexedSecurityCallback indexed_handler, |
| 2526 Handle<Value> data = Handle<Value>(), | 2544 Handle<Value> data = Handle<Value>(), |
| 2527 bool turned_on_by_default = true); | 2545 bool turned_on_by_default = true); |
| 2528 | 2546 |
| 2529 /** | 2547 /** |
| 2530 * Gets the number of internal fields for objects generated from | 2548 * Gets the number of internal fields for objects generated from |
| 2531 * this template. | 2549 * this template. |
| 2532 */ | 2550 */ |
| 2533 int InternalFieldCount(); | 2551 int InternalFieldCount(); |
| 2534 | 2552 |
| 2535 /** | 2553 /** |
| (...skipping 2326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4862 | 4880 |
| 4863 | 4881 |
| 4864 } // namespace v8 | 4882 } // namespace v8 |
| 4865 | 4883 |
| 4866 | 4884 |
| 4867 #undef V8EXPORT | 4885 #undef V8EXPORT |
| 4868 #undef TYPE_CHECK | 4886 #undef TYPE_CHECK |
| 4869 | 4887 |
| 4870 | 4888 |
| 4871 #endif // V8_H_ | 4889 #endif // V8_H_ |
| OLD | NEW |