Title: [183722] trunk/Source/WTF
Revision
183722
Author
[email protected]
Date
2015-05-02 13:55:59 -0700 (Sat, 02 May 2015)

Log Message

Generated static StringImpls should have static flag set.
<https://webkit.org/b/144516>

Reviewed by Darin Adler.

Discovered this while tracking down a string ref leak. Turns out that the strings
generated by StaticString.pm were not getting the static flag set on them.

The only practical difference from this AFAICT is that now the garbage collector
will correctly see that these strings have no extra memory cost to worry about.

* wtf/text/StringImpl.h:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (183721 => 183722)


--- trunk/Source/WTF/ChangeLog	2015-05-02 19:26:21 UTC (rev 183721)
+++ trunk/Source/WTF/ChangeLog	2015-05-02 20:55:59 UTC (rev 183722)
@@ -1,3 +1,18 @@
+2015-05-02  Andreas Kling  <[email protected]>
+
+        Generated static StringImpls should have static flag set.
+        <https://webkit.org/b/144516>
+
+        Reviewed by Darin Adler.
+
+        Discovered this while tracking down a string ref leak. Turns out that the strings
+        generated by StaticString.pm were not getting the static flag set on them.
+
+        The only practical difference from this AFAICT is that now the garbage collector
+        will correctly see that these strings have no extra memory cost to worry about.
+
+        * wtf/text/StringImpl.h:
+
 2015-05-01  Martin Robinson  <[email protected]>
 
         USE(...) macro should expect unprefixed variables

Modified: trunk/Source/WTF/wtf/text/StringImpl.h (183721 => 183722)


--- trunk/Source/WTF/wtf/text/StringImpl.h	2015-05-02 19:26:21 UTC (rev 183721)
+++ trunk/Source/WTF/wtf/text/StringImpl.h	2015-05-02 20:55:59 UTC (rev 183722)
@@ -892,7 +892,7 @@
         unsigned m_hashAndFlags;
 
         // These values mimic ConstructFromLiteral.
-        static const unsigned s_initialRefCount = s_refCountIncrement;
+        static const unsigned s_initialRefCount = s_refCountFlagIsStaticString;
         static const unsigned s_initialFlags = s_hashFlag8BitBuffer | StringNormal | BufferInternal;
         static const unsigned s_hashShift = s_flagCount;
     };
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to