Changeset 183722 in webkit


Ignore:
Timestamp:
May 2, 2015 1:55:59 PM (9 years ago)
Author:
akling@apple.com
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:
Location:
trunk/Source/WTF
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r183697 r183722  
     12015-05-02  Andreas Kling  <akling@apple.com>
     2
     3        Generated static StringImpls should have static flag set.
     4        <https://webkit.org/b/144516>
     5
     6        Reviewed by Darin Adler.
     7
     8        Discovered this while tracking down a string ref leak. Turns out that the strings
     9        generated by StaticString.pm were not getting the static flag set on them.
     10
     11        The only practical difference from this AFAICT is that now the garbage collector
     12        will correctly see that these strings have no extra memory cost to worry about.
     13
     14        * wtf/text/StringImpl.h:
     15
    1162015-05-01  Martin Robinson  <mrobinson@igalia.com>
    217
  • trunk/Source/WTF/wtf/text/StringImpl.h

    r183624 r183722  
    893893
    894894        // These values mimic ConstructFromLiteral.
    895         static const unsigned s_initialRefCount = s_refCountIncrement;
     895        static const unsigned s_initialRefCount = s_refCountFlagIsStaticString;
    896896        static const unsigned s_initialFlags = s_hashFlag8BitBuffer | StringNormal | BufferInternal;
    897897        static const unsigned s_hashShift = s_flagCount;
Note: See TracChangeset for help on using the changeset viewer.