[webkit-reviews] review denied: [Bug 115410] Change HashTraits<RefPtr<P> >::PassOutType to PassRefPtr for better performance : [Attachment 200304] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu May 2 09:27:20 PDT 2013
Darin Adler <darin at apple.com> has denied Mikhail Pozdnyakov
<mikhail.pozdnyakov at intel.com>'s request for review:
Bug 115410: Change HashTraits<RefPtr<P> >::PassOutType to PassRefPtr for better
performance
https://bugs.webkit.org/show_bug.cgi?id=115410
Attachment 200304: patch
https://bugs.webkit.org/attachment.cgi?id=200304&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=200304&action=review
If we are having trouble making nullptr work, maybe we can make a zero work?
I’m sure there is some way to do this. I think you are learning now why I
landed this with a FIXME rather than doing this task originally.
> Source/WTF/wtf/HashTraits.h:145
> + static RefPtr<P>& emptyValue()
> + {
> + static RefPtr<P>& null = *(new RefPtr<P>);
> + return null;
> + }
I understand this is easier to get right than the alternative, but it’s not
going to be efficient to fetch a global variable all the time. Since the whole
point of this is to get better performance, we must not make this change!
More information about the webkit-reviews
mailing list