| 234 | */ |
| 235 | template <class S> |
| 236 | V8_INLINE static Local<T> Cast(Local<S> that) { |
| 237 | #ifdef V8_ENABLE_CHECKS |
| 238 | // If we're going to perform the type check then we have to check |
| 239 | // that the handle isn't empty before doing the checked cast. |
| 240 | if (that.IsEmpty()) return Local<T>(); |
| 241 | #endif |
| 242 | return Local<T>(T::Cast(*that)); |
| 243 | } |
| 244 | |
| 245 | /** |
| 246 | * Calling this is equivalent to Local<S>::Cast(). |