| 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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 502 /** | 502 /** |
| 503 * If non-empty, destroy the underlying storage cell | 503 * If non-empty, destroy the underlying storage cell |
| 504 * and create a new one with the contents of other if other is non empty | 504 * and create a new one with the contents of other if other is non empty |
| 505 */ | 505 */ |
| 506 template <class S> | 506 template <class S> |
| 507 V8_INLINE void Reset(Isolate* isolate, const PersistentBase<S>& other); | 507 V8_INLINE void Reset(Isolate* isolate, const PersistentBase<S>& other); |
| 508 | 508 |
| 509 V8_INLINE bool IsEmpty() const { return val_ == NULL; } | 509 V8_INLINE bool IsEmpty() const { return val_ == NULL; } |
| 510 V8_INLINE void Empty() { val_ = 0; } | 510 V8_INLINE void Empty() { val_ = 0; } |
| 511 | 511 |
| 512 V8_INLINE Local<T> Get(Isolate* isolate) const { |
| 513 return Local<T>::New(isolate, *this); |
| 514 } |
| 515 |
| 512 template <class S> | 516 template <class S> |
| 513 V8_INLINE bool operator==(const PersistentBase<S>& that) const { | 517 V8_INLINE bool operator==(const PersistentBase<S>& that) const { |
| 514 internal::Object** a = reinterpret_cast<internal::Object**>(this->val_); | 518 internal::Object** a = reinterpret_cast<internal::Object**>(this->val_); |
| 515 internal::Object** b = reinterpret_cast<internal::Object**>(that.val_); | 519 internal::Object** b = reinterpret_cast<internal::Object**>(that.val_); |
| 516 if (a == NULL) return b == NULL; | 520 if (a == NULL) return b == NULL; |
| 517 if (b == NULL) return false; | 521 if (b == NULL) return false; |
| 518 return *a == *b; | 522 return *a == *b; |
| 519 } | 523 } |
| 520 | 524 |
| 521 template <class S> | 525 template <class S> |
| (...skipping 7816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8338 */ | 8342 */ |
| 8339 | 8343 |
| 8340 | 8344 |
| 8341 } // namespace v8 | 8345 } // namespace v8 |
| 8342 | 8346 |
| 8343 | 8347 |
| 8344 #undef TYPE_CHECK | 8348 #undef TYPE_CHECK |
| 8345 | 8349 |
| 8346 | 8350 |
| 8347 #endif // V8_H_ | 8351 #endif // V8_H_ |
| OLD | NEW |