diff options
Diffstat (limited to 'Source/JavaScriptCore/heap/Weak.h')
-rw-r--r-- | Source/JavaScriptCore/heap/Weak.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/heap/Weak.h b/Source/JavaScriptCore/heap/Weak.h index 3c3d1d0ce..efb2a9a56 100644 --- a/Source/JavaScriptCore/heap/Weak.h +++ b/Source/JavaScriptCore/heap/Weak.h @@ -151,6 +151,11 @@ template<typename T> inline WeakImpl* Weak<T>::hashTableDeletedValue() return reinterpret_cast<WeakImpl*>(-1); } +template <typename T> inline bool operator==(const Weak<T>& lhs, const Weak<T>& rhs) +{ + return lhs.get() == rhs.get(); +} + // This function helps avoid modifying a weak table while holding an iterator into it. (Object allocation // can run a finalizer that modifies the table. We avoid that by requiring a pre-constructed object as our value.) template<typename Map, typename Key, typename Value> inline void weakAdd(Map& map, const Key& key, Value value) |