[webkit-reviews] review granted: [Bug 44221] Add ability to get all the keys from a WKDictionaryRef : [Attachment 64790] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 18 21:41:18 PDT 2010


Adam Roben (aroben) <aroben at apple.com> has granted Sam Weinig
<sam at webkit.org>'s request for review:
Bug 44221: Add ability to get all the keys from a WKDictionaryRef
https://bugs.webkit.org/show_bug.cgi?id=44221

Attachment 64790: Patch
https://bugs.webkit.org/attachment.cgi?id=64790&action=review

------- Additional Comments from Adam Roben (aroben) <aroben at apple.com>
> +PassRefPtr<ImmutableArray> ImmutableDictionary::keys()

Can this be a const member function?

> +    size_t size = m_map.size();
> +    if (!size)

I thought we used isEmpty() for things like this.

> +    APIObject** array = new APIObject*[size];

I think using OwnArrayPtr would be better. Or, if not, why not make the type
APIObject*[]?

> +    return ImmutableArray::adopt(array, size);

And this should take a PassOwnPtr!

r=me


More information about the webkit-reviews mailing list