[webkit-reviews] review granted: [Bug 206557] Fix small memory regression caused by r206365 : [Attachment 388384] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 21 19:22:14 PST 2020


Yusuke Suzuki <ysuzuki at apple.com> has granted Justin Michaud
<justin_michaud at apple.com>'s request for review:
Bug 206557: Fix small memory regression caused by r206365
https://bugs.webkit.org/show_bug.cgi?id=206557

Attachment 388384: Patch

https://bugs.webkit.org/attachment.cgi?id=388384&action=review




--- Comment #5 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 388384
  --> https://bugs.webkit.org/attachment.cgi?id=388384
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=388384&action=review

r=me with nits.

> Source/JavaScriptCore/runtime/StructureRareData.h:71
> +    bool doGiveUpOnObjectToStringValueCache() { return
m_objectToStringValue.unvalidatedGet() ==
giveUpOnObjectToStringValueCacheValue(); }

`doGiveUpOnObjectToStringValueCache` sounds like we give up caching by this
function. Can you rename it to `canCacheObjectToStringValue()`?

> Source/JavaScriptCore/runtime/StructureRareData.h:72
> +    static JSString* giveUpOnObjectToStringValueCacheValue() { return
bitwise_cast<JSString*>(static_cast<uintptr_t>(1)); }

Let's rename it something like "objectToStringCacheGiveUpMarker()", otherwise,
this function name sounds like we are giving up caching by this function.


More information about the webkit-reviews mailing list