[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.21-584-g1e41756

vestbo at webkit.org vestbo at webkit.org
Fri Feb 26 22:16:47 UTC 2010


The following commit has been merged in the webkit-1.1 branch:
commit e89a412df96bcbaa078f745156a95fa774ece51e
Author: vestbo at webkit.org <vestbo at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Wed Feb 10 11:59:02 2010 +0000

    Use derefIfNotNull() to work around WINSCW compiler forward declaration bug
    
    Patch by Yongjun Zhang <yongjun.zhang at nokia.com> on 2009-10-06
    Reviewed by Simon Hausmann.
    
    The compiler bug is reported at
    https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
    
    The change should be reverted when the above bug is fixed in WINSCW compiler.
    
    JObjectWrapper::ref() and deref() made public accessible to derefIfNull().
    
    https://bugs.webkit.org/show_bug.cgi?id=28054
    
    * bridge/jni/jsc/JavaInstanceJSC.h:
    * bridge/jni/v8/JavaInstanceV8.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54596 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 80da7f8..26b1dee 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -2,6 +2,19 @@
 
         Reviewed by Simon Hausmann.
 
+        Use derefIfNotNull() to work around WINSCW compiler forward declaration bug
+
+        The compiler bug is reported at
+        https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812.
+
+        The change should be reverted when the above bug is fixed in WINSCW compiler.
+
+        https://bugs.webkit.org/show_bug.cgi?id=28054
+
+2009-10-06  Yongjun Zhang  <yongjun.zhang at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
         Get rid of WINSCW hack for UnSpecifiedBoolType
 
         Add parenthesis around (RefPtr::*UnspecifiedBoolType) to make the WINSCW
diff --git a/JavaScriptCore/wtf/RefPtr.h b/JavaScriptCore/wtf/RefPtr.h
index e527ced..2dcfbf7 100644
--- a/JavaScriptCore/wtf/RefPtr.h
+++ b/JavaScriptCore/wtf/RefPtr.h
@@ -24,6 +24,7 @@
 #include <algorithm>
 #include "AlwaysInline.h"
 #include "FastAllocBase.h"
+#include "PassRefPtr.h"
 
 namespace WTF {
 
@@ -50,13 +51,13 @@ namespace WTF {
         RefPtr(HashTableDeletedValueType) : m_ptr(hashTableDeletedValue()) { }
         bool isHashTableDeletedValue() const { return m_ptr == hashTableDeletedValue(); }
 
-        ~RefPtr() { if (T* ptr = m_ptr) ptr->deref(); }
+        ~RefPtr() { derefIfNotNull(m_ptr); }
         
         template <typename U> RefPtr(const RefPtr<U>& o) : m_ptr(o.get()) { if (T* ptr = m_ptr) ptr->ref(); }
         
         T* get() const { return m_ptr; }
         
-        void clear() { if (T* ptr = m_ptr) ptr->deref(); m_ptr = 0; }
+        void clear() { derefIfNotNull(m_ptr); m_ptr = 0; }
         PassRefPtr<T> release() { PassRefPtr<T> tmp = adoptRef(m_ptr); m_ptr = 0; return tmp; }
 
         T& operator*() const { return *m_ptr; }
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 64974b5..4f81ca7 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,17 @@
+2009-10-06  Yongjun Zhang  <yongjun.zhang at nokia.com>
+
+        Reviewed by Simon Hausmann.
+
+        Make JObjectWrapper::ref() and deref() public accessible to derefIfNull().
+
+        Will be reverted when the following winscw compiler bug is fixed.
+        https://xdabug001.ext.nokia.com/bugzilla/show_bug.cgi?id=9812
+
+        https://bugs.webkit.org/show_bug.cgi?id=28054
+
+        * bridge/jni/jsc/JavaInstanceJSC.h:
+        * bridge/jni/v8/JavaInstanceV8.h:
+
 2010-02-10  Yaar Schnitman  <yaar at chromium.org>
 
         Reviewed by Adam Barth.
diff --git a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
index d7b6102..a46c6d3 100644
--- a/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
+++ b/WebCore/bridge/jni/jsc/JavaInstanceJSC.h
@@ -50,10 +50,6 @@ public:
     jobject instance() const { return m_instance; }
     void setInstance(jobject instance) { m_instance = instance; }
 
-protected:
-    JObjectWrapper(jobject instance);
-    ~JObjectWrapper();
-
     void ref() { m_refCount++; }
     void deref()
     {
@@ -61,6 +57,10 @@ protected:
             delete this;
     }
 
+protected:
+    JObjectWrapper(jobject instance);
+    ~JObjectWrapper();
+
     jobject m_instance;
 
 private:
diff --git a/WebCore/bridge/jni/v8/JavaInstanceV8.h b/WebCore/bridge/jni/v8/JavaInstanceV8.h
index c18f2d6..c928c05 100644
--- a/WebCore/bridge/jni/v8/JavaInstanceV8.h
+++ b/WebCore/bridge/jni/v8/JavaInstanceV8.h
@@ -50,10 +50,6 @@ public:
     jobject instance() const { return m_instance; }
     void setInstance(jobject instance) { m_instance = instance; }
 
-protected:
-    JObjectWrapper(jobject);
-    ~JObjectWrapper();
-
     void ref() { m_refCount++; }
     void deref()
     {
@@ -61,6 +57,10 @@ protected:
             delete this;
     }
 
+protected:
+    JObjectWrapper(jobject);
+    ~JObjectWrapper();
+
     jobject m_instance;
 
 private:

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list