Title: [163347] trunk/Source/WTF
Revision
163347
Author
ander...@apple.com
Date
2014-02-03 17:03:38 -0800 (Mon, 03 Feb 2014)

Log Message

StringImpl::tailOffset() should return the offset right after m_hashAndFlags
https://bugs.webkit.org/show_bug.cgi?id=128141

Reviewed by Andreas Kling.

* wtf/text/StringImpl.h:
(WTF::StringImpl::tailOffset):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (163346 => 163347)


--- trunk/Source/WTF/ChangeLog	2014-02-04 01:02:23 UTC (rev 163346)
+++ trunk/Source/WTF/ChangeLog	2014-02-04 01:03:38 UTC (rev 163347)
@@ -1,5 +1,15 @@
 2014-02-03  Anders Carlsson  <ander...@apple.com>
 
+        StringImpl::tailOffset() should return the offset right after m_hashAndFlags
+        https://bugs.webkit.org/show_bug.cgi?id=128141
+
+        Reviewed by Andreas Kling.
+
+        * wtf/text/StringImpl.h:
+        (WTF::StringImpl::tailOffset):
+
+2014-02-03  Anders Carlsson  <ander...@apple.com>
+
         More tail pointer consolidation
         https://bugs.webkit.org/show_bug.cgi?id=128139
 

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (163346 => 163347)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2014-02-04 01:02:23 UTC (rev 163346)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2014-02-04 01:03:38 UTC (rev 163347)
@@ -778,7 +778,12 @@
     template<typename T>
     static ptrdiff_t tailOffset()
     {
+#if COMPILER(MSVC)
+        // MSVC doesn't support alignof yet.
         return roundUpToMultipleOf<alignof(T)>(sizeof(StringImpl));
+#else
+        return roundUpToMultipleOf<__alignof(T)>(offsetof(StringImpl, m_hashAndFlags) + sizeof(StringImpl::m_hashAndFlags));
+#endif
     }
 
     template<typename T>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to