Changeset 48988 in webkit for trunk/JavaScriptCore
- Timestamp:
- Oct 1, 2009, 12:18:02 PM (16 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r48976 r48988 1 2009-10-01 Yongjun Zhang <[email protected]> 2 3 Reviewed by Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=29187 6 7 Don't inline ~ListRefPtr() to work around winscw compiler forward declaration 8 bug regarding templated classes. 9 10 The compiler bug is reported at: 11 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812 12 13 The change will be reverted when the above bug is fixed in winscw compiler. 14 15 * wtf/ListRefPtr.h: 16 (WTF::::~ListRefPtr): 17 1 18 2009-10-01 Zoltan Horvath <[email protected]> 2 19 -
trunk/JavaScriptCore/wtf/ListRefPtr.h
r35900 r48988 35 35 // see comment in PassRefPtr.h for why this takes const reference 36 36 template <typename U> ListRefPtr(const PassRefPtr<U>& o) : RefPtr<T>(o) {} 37 38 ~ListRefPtr() 39 { 40 RefPtr<T> reaper = this->release(); 41 while (reaper && reaper->hasOneRef()) 42 reaper = reaper->releaseNext(); // implicitly protects reaper->next, then derefs reaper 43 } 37 38 ~ListRefPtr(); 44 39 45 40 ListRefPtr& operator=(T* optr) { RefPtr<T>::operator=(optr); return *this; } … … 49 44 template <typename U> ListRefPtr& operator=(const PassRefPtr<U>& o) { RefPtr<T>::operator=(o); return *this; } 50 45 }; 46 47 // Remove inline for winscw compiler to prevent the compiler agressively resolving 48 // T::ref() in RefPtr<T>'s copy constructor. The bug is reported at: 49 // https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812. 50 template <typename T> 51 #if !COMPILER(WINSCW) 52 inline 53 #endif 54 ListRefPtr<T>::~ListRefPtr() 55 { 56 RefPtr<T> reaper = this->release(); 57 while (reaper && reaper->hasOneRef()) 58 reaper = reaper->releaseNext(); // implicitly protects reaper->next, then derefs reaper 59 } 51 60 52 61 template <typename T> inline T* getPtr(const ListRefPtr<T>& p)
Note:
See TracChangeset
for help on using the changeset viewer.