Changeset 96465 in webkit for trunk/Source/JavaScriptCore/heap/Strong.h
- Timestamp:
- Oct 1, 2011, 5:54:56 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Strong.h
r95901 r96465 34 34 35 35 class JSGlobalData; 36 HandleSlot allocateGlobalHandle(JSGlobalData&);37 36 38 37 // A strongly referenced handle that prevents the object it points to from being garbage collected. … … 49 48 } 50 49 51 Strong(JSGlobalData& globalData, ExternalType value = ExternalType()) 52 : Handle<T>(allocateGlobalHandle(globalData)) 53 { 54 set(value); 55 } 50 Strong(JSGlobalData&, ExternalType = ExternalType()); 56 51 57 Strong(JSGlobalData& globalData, Handle<T> handle) 58 : Handle<T>(allocateGlobalHandle(globalData)) 59 { 60 set(handle.get()); 61 } 52 Strong(JSGlobalData&, Handle<T>); 62 53 63 54 Strong(const Strong& other) … … 96 87 } 97 88 98 void set(JSGlobalData& globalData, ExternalType value) 99 { 100 if (!slot()) 101 setSlot(allocateGlobalHandle(globalData)); 102 set(value); 103 } 89 void set(JSGlobalData&, ExternalType); 104 90 105 91 template <typename U> Strong& operator=(const Strong<U>& other)
Note:
See TracChangeset
for help on using the changeset viewer.