| OLD | NEW |
| 1 // Copyright 2007-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2007-2008 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 /** | 320 /** |
| 321 * This check fails when trying to convert between incompatible | 321 * This check fails when trying to convert between incompatible |
| 322 * handles. For example, converting from a Handle<String> to a | 322 * handles. For example, converting from a Handle<String> to a |
| 323 * Handle<Number>. | 323 * Handle<Number>. |
| 324 */ | 324 */ |
| 325 TYPE_CHECK(T, S); | 325 TYPE_CHECK(T, S); |
| 326 } | 326 } |
| 327 | 327 |
| 328 template <class S> inline Persistent(S* that) : Handle<T>(that) { } | 328 template <class S> inline Persistent(S* that) : Handle<T>(that) { } |
| 329 | 329 |
| 330 /** |
| 331 * "Casts" a plain handle which is known to be a persistent handle |
| 332 * to a persistent handle. |
| 333 */ |
| 330 template <class S> explicit inline Persistent(Handle<S> that) | 334 template <class S> explicit inline Persistent(Handle<S> that) |
| 331 : Handle<T>(*that) { } | 335 : Handle<T>(*that) { } |
| 332 | 336 |
| 333 template <class S> static inline Persistent<T> Cast(Persistent<S> that) { | 337 template <class S> static inline Persistent<T> Cast(Persistent<S> that) { |
| 334 if (that.IsEmpty()) return Persistent<T>(); | 338 if (that.IsEmpty()) return Persistent<T>(); |
| 335 return Persistent<T>(T::Cast(*that)); | 339 return Persistent<T>(T::Cast(*that)); |
| 336 } | 340 } |
| 337 | 341 |
| 338 /** | 342 /** |
| 339 * Creates a new persistent handle for an existing local or | 343 * Creates a new persistent handle for an existing local or |
| (...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 /** Tests for a named lookup interceptor.*/ | 1053 /** Tests for a named lookup interceptor.*/ |
| 1050 bool HasNamedLookupInterceptor(); | 1054 bool HasNamedLookupInterceptor(); |
| 1051 | 1055 |
| 1052 /** Tests for an index lookup interceptor.*/ | 1056 /** Tests for an index lookup interceptor.*/ |
| 1053 bool HasIndexedLookupInterceptor(); | 1057 bool HasIndexedLookupInterceptor(); |
| 1054 | 1058 |
| 1055 /** | 1059 /** |
| 1056 * Turns on access check on the object if the object is an instance of | 1060 * Turns on access check on the object if the object is an instance of |
| 1057 * a template that has access check callbacks. If an object has no | 1061 * a template that has access check callbacks. If an object has no |
| 1058 * access check info, the object cannot be accessed by anyone. | 1062 * access check info, the object cannot be accessed by anyone. |
| 1059 */ | 1063 */ |
| 1060 void TurnOnAccessCheck(); | 1064 void TurnOnAccessCheck(); |
| 1061 | 1065 |
| 1062 static Local<Object> New(); | 1066 static Local<Object> New(); |
| 1063 static Object* Cast(Value* obj); | 1067 static Object* Cast(Value* obj); |
| 1064 private: | 1068 private: |
| 1065 Object(); | 1069 Object(); |
| 1066 }; | 1070 }; |
| 1067 | 1071 |
| 1068 | 1072 |
| 1069 /** | 1073 /** |
| (...skipping 1338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2408 | 2412 |
| 2409 } // namespace v8 | 2413 } // namespace v8 |
| 2410 | 2414 |
| 2411 | 2415 |
| 2412 #undef EXPORT | 2416 #undef EXPORT |
| 2413 #undef EXPORT_INLINE | 2417 #undef EXPORT_INLINE |
| 2414 #undef TYPE_CHECK | 2418 #undef TYPE_CHECK |
| 2415 | 2419 |
| 2416 | 2420 |
| 2417 #endif // V8_H_ | 2421 #endif // V8_H_ |
| OLD | NEW |