Re-landing an independent part of a previously rolled out threading patch.
authorap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 20:03:43 +0000 (20:03 +0000)
committerap@webkit.org <ap@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 5 Jun 2008 20:03:43 +0000 (20:03 +0000)
        * wtf/ThreadSpecific.h: Make sure to initialize POD thread-specific varaibles, too
        (replaced "new T" with "new T()").

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34380 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/ThreadSpecific.h

index 03bf96bd849826c9f24e1a0f8cf364f6b95dcb79..897df5653fef49028aa673b44c18dfecbc0108dd 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-05  Alexey Proskuryakov  <ap@webkit.org>
+
+        Re-landing an independent part of a previously rolled out threading patch.
+
+        * wtf/ThreadSpecific.h: Make sure to initialize POD thread-specific varaibles, too
+        (replaced "new T" with "new T()").
+
 2008-06-05  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Hyatt.
index c82d6d14128d76f3c7a69044f47cba768742a81a..8fac1bb3850bcfc95f057bcb82e8483d0d200836 100644 (file)
@@ -115,6 +115,7 @@ inline void ThreadSpecific<T>::destroy(void* ptr)
 
 template<typename T>
 inline ThreadSpecific<T>::ThreadSpecific()
+    : m_data()
 {
 }
 
@@ -141,7 +142,7 @@ inline ThreadSpecific<T>::operator T*()
 {
     T* ptr = static_cast<T*>(get());
     if (!ptr) {
-        ptr = new T;
+        ptr = new T();
         set(ptr);
     }
     return ptr;