[webkit-reviews] review granted: [Bug 225948] Speed up debug validation in CacheableIdentifier::createFromIdentifierOwnedByCodeBlock(). : [Attachment 429018] proposed patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue May 18 19:08:19 PDT 2021


Yusuke Suzuki <ysuzuki at apple.com> has granted Mark Lam <mark.lam at apple.com>'s
request for review:
Bug 225948: Speed up debug validation in
CacheableIdentifier::createFromIdentifierOwnedByCodeBlock().
https://bugs.webkit.org/show_bug.cgi?id=225948

Attachment 429018: proposed patch.

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




--- Comment #4 from Yusuke Suzuki <ysuzuki at apple.com> ---
Comment on attachment 429018
  --> https://bugs.webkit.org/attachment.cgi?id=429018
proposed patch.

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

> Source/JavaScriptCore/bytecode/CodeBlock.cpp:2919
> +	   if (!m_rareData || m_rareData->m_cachedIdentifierUids.size() !=
numberOfIdentifiers) {

m_cachedIdentifierUids.size() is dangerous without taking a lock. If it is in
the middle of growing, then it can be SEGV since HashSet stores its size into
the backing memory.
The other part looks good to me.


More information about the webkit-reviews mailing list