Changeset 48988 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 1, 2009, 12:18:02 PM (16 years ago)
Author:
[email protected]
Message:

2009-10-01 Yongjun Zhang <[email protected]>

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=29187

Don't inline ~ListRefPtr() to work around winscw compiler forward declaration
bug regarding templated classes.

The compiler bug is reported at:
https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812

The change will be reverted when the above bug is fixed in winscw compiler.

  • wtf/ListRefPtr.h: (WTF::::~ListRefPtr):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r48976 r48988  
     12009-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
    1182009-10-01  Zoltan Horvath  <[email protected]>
    219
  • trunk/JavaScriptCore/wtf/ListRefPtr.h

    r35900 r48988  
    3535        // see comment in PassRefPtr.h for why this takes const reference
    3636        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();
    4439       
    4540        ListRefPtr& operator=(T* optr) { RefPtr<T>::operator=(optr); return *this; }
     
    4944        template <typename U> ListRefPtr& operator=(const PassRefPtr<U>& o) { RefPtr<T>::operator=(o); return *this; }
    5045    };
     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    }
    5160
    5261    template <typename T> inline T* getPtr(const ListRefPtr<T>& p)
Note: See TracChangeset for help on using the changeset viewer.