Changeset 79948 in webkit
- Timestamp:
- Feb 28, 2011 5:06:21 PM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r79924 r79948 1 2011-02-28 Oliver Hunt <oliver@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Stop using DeprecatedPtr for the global exception slot 6 https://bugs.webkit.org/show_bug.cgi?id=55424 7 8 Create GCRootPtr to signify that the exception slot is 9 a gcroot, and so is exempt from the usual writebarrier 10 restrictions. 11 12 * runtime/JSGlobalData.h: 13 * runtime/WriteBarrier.h: 14 (JSC::GCRootPtr::GCRootPtr): 15 (JSC::GCRootPtr::operator=): 16 1 17 2011-02-28 Adam Barth <abarth@webkit.org> 2 18 -
trunk/Source/JavaScriptCore/runtime/JSGlobalData.h
r79904 r79948 207 207 Heap heap; 208 208 209 DeprecatedPtr<Unknown> exception;209 GCRootPtr<Unknown> exception; 210 210 #if ENABLE(JIT) 211 211 ReturnAddressPtr exceptionLocation; -
trunk/Source/JavaScriptCore/runtime/WriteBarrier.h
r78945 r79948 152 152 }; 153 153 154 template <typename T> class GCRootPtr : public WriteBarrierBase<T> { 155 public: 156 GCRootPtr() { } 157 GCRootPtr(T* value) 158 { 159 this->setWithoutWriteBarrier(value); 160 } 161 162 GCRootPtr& operator=(T* value) 163 { 164 this->setWithoutWriteBarrier(value); 165 return *this; 166 } 167 168 private: 169 using WriteBarrier<T>::set; 170 using WriteBarrier<T>::setWithoutWriteBarrier; 171 }; 172 173 template <> class GCRootPtr<Unknown> : public WriteBarrierBase<Unknown> { 174 public: 175 GCRootPtr() { } 176 GCRootPtr(JSValue value) 177 { 178 this->setWithoutWriteBarrier(value); 179 } 180 181 GCRootPtr& operator=(JSValue value) 182 { 183 this->setWithoutWriteBarrier(value); 184 return *this; 185 } 186 187 private: 188 using WriteBarrierBase<Unknown>::set; 189 using WriteBarrierBase<Unknown>::setWithoutWriteBarrier; 190 }; 191 154 192 template <typename U, typename V> inline bool operator==(const DeprecatedPtr<U>& lhs, const DeprecatedPtr<V>& rhs) 155 193 {
Note: See TracChangeset
for help on using the changeset viewer.