[webkit-reviews] review canceled: [Bug 195776] Reduce the size of Node::deref by eliminating an explicit parentNode check : [Attachment 364721] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Mar 14 21:21:31 PDT 2019
Ryosuke Niwa <rniwa at webkit.org> has canceled Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 195776: Reduce the size of Node::deref by eliminating an explicit
parentNode check
https://bugs.webkit.org/show_bug.cgi?id=195776
Attachment 364721: Patch
https://bugs.webkit.org/attachment.cgi?id=364721&action=review
--- Comment #14 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 364721
--> https://bugs.webkit.org/attachment.cgi?id=364721
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=364721&action=review
>> Source/WebCore/dom/Node.h:723
>> + return m_refCount >= 2;
>
> This seems wrong. The point of this is function to return true only if Node
has no more than one ref and no less than one ref. Not to return 1 if it has
more than one ref. I think the correct implementation is one of these:
>
> return (m_refCount >> 1) == 1;
> return (m_refCount & ~1) == 2;
Oh oops, you're right.
> Source/WebCore/dom/Node.h:728
> return m_refCount;
This also needs to be fixed.
More information about the webkit-reviews
mailing list