Changeset 48825 in webkit
- Timestamp:
- Sep 28, 2009 1:09:40 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r48824 r48825 1 2009-09-28 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 https://bugs.webkit.org/show_bug.cgi?id=28054 6 7 Use derefInNotNull() to work around winscw compiler forward declaration bug 8 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 should be reverted when the above bug is fixed in winscw compiler. 14 15 Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make winscw compiler 16 work with the default UnSpecifiedBoolType() operator, which removes the winscw hack. 17 18 * wtf/RefPtr.h: 19 (WTF::RefPtr::~RefPtr): 20 (WTF::RefPtr::clear): 21 (WTF::RefPtr::operator UnspecifiedBoolType): 22 1 23 2009-09-28 Gabor Loki <loki@inf.u-szeged.hu> 2 24 -
trunk/JavaScriptCore/wtf/RefPtr.h
r45072 r48825 49 49 bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); } 50 50 51 ~RefPtr() { if (T* ptr = m_ptr) ptr->deref(); }51 ~RefPtr() { derefIfNotNull(m_ptr); } 52 52 53 53 template <typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) ptr->ref(); } … … 55 55 T* get() const { return m_ptr; } 56 56 57 void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = 0; }57 void clear() { derefIfNotNull(m_ptr); m_ptr = 0; } 58 58 PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; } 59 59 … … 64 64 65 65 // This conversion operator allows implicit conversion to bool but not to other integer types. 66 #if COMPILER(WINSCW) 67 operator bool() const { return m_ptr; } 68 #else 69 typedef T* RefPtr::*UnspecifiedBoolType; 66 typedef T* (RefPtr::*UnspecifiedBoolType); 70 67 operator UnspecifiedBoolType() const { return m_ptr ? &RefPtr::m_ptr : 0; } 71 #endif72 68 73 69 RefPtr& operator=(const RefPtr&); -
trunk/WebCore/ChangeLog
r48822 r48825 1 2009-09-28 Yongjun Zhang <yongjun.zhang@nokia.com> 2 3 Reviewed by Eric Seidel. 4 5 Make JObjectWrapper::ref() and deref() public accessible to derefIfNull(). 6 7 Will be reverted when the following winscw compiler bug is fixed. 8 https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812 9 10 * bridge/jni/jni_instance.h: 11 1 12 2009-09-28 Andrew Scherkus <scherkus@chromium.org> 2 13 -
trunk/WebCore/bridge/jni/jni_instance.h
r43122 r48825 48 48 friend class JavaMethod; 49 49 50 protected: 51 JObjectWrapper(jobject instance); 52 ~JObjectWrapper(); 53 50 public: 54 51 void ref() { _refCount++; } 55 52 void deref() … … 59 56 } 60 57 58 protected: 59 JObjectWrapper(jobject instance); 60 ~JObjectWrapper(); 61 61 62 jobject _instance; 62 63
Note: See TracChangeset
for help on using the changeset viewer.