Changeset 242747 in webkit
- Timestamp:
- Mar 11, 2019, 3:37:43 PM (7 years ago)
- Location:
- trunk/Source/WTF
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
wtf/text/StringImpl.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WTF/ChangeLog
r242732 r242747 1 2019-03-11 Yusuke Suzuki <ysuzuki@apple.com> 2 3 [JSC] Make StaticStringImpl & StaticSymbolImpl actually static 4 https://bugs.webkit.org/show_bug.cgi?id=194212 5 6 Reviewed by Mark Lam. 7 8 Avoid mutation onto refcounts if `isStatic()` returns true so that the content of StaticStringImpl never gets modified. 9 10 * wtf/text/StringImpl.h: 11 (WTF::StringImpl::ref): 12 (WTF::StringImpl::deref): 13 1 14 2019-03-11 Sihui Liu <sihui_liu@apple.com> 2 15 -
trunk/Source/WTF/wtf/text/StringImpl.h
r242252 r242747 1065 1065 STRING_STATS_REF_STRING(*this); 1066 1066 1067 if (UNLIKELY(isStatic())) 1068 return; 1067 1069 m_refCount += s_refCountIncrement; 1068 1070 } … … 1072 1074 STRING_STATS_DEREF_STRING(*this); 1073 1075 1076 if (UNLIKELY(isStatic())) 1077 return; 1074 1078 unsigned tempRefCount = m_refCount - s_refCountIncrement; 1075 1079 if (!tempRefCount) {
Note:
See TracChangeset
for help on using the changeset viewer.