[webkit-reviews] review granted: [Bug 170093] Add API to get available content extension identifiers in a WKContentExtensionStore : [Attachment 305352] patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Apr 10 11:00:41 PDT 2017
Geoffrey Garen <ggaren at apple.com> has granted Alex Christensen
<achristensen at apple.com>'s request for review:
Bug 170093: Add API to get available content extension identifiers in a
WKContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=170093
Attachment 305352: patch
https://bugs.webkit.org/attachment.cgi?id=305352&action=review
--- Comment #2 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 305352
--> https://bugs.webkit.org/attachment.cgi?id=305352
patch
View in context: https://bugs.webkit.org/attachment.cgi?id=305352&action=review
r=me
> Source/WebKit2/UIProcess/API/APIContentExtensionStore.cpp:404
> + completionHandler(identifiers);
I think you need to WTFMove(identifiers) again in this argument expression or
you will copy the vector. (The capture expression creates an rvalue reference
by WTFMove, but immediately assigns that reference to an lvalue named
"identifiers".)
> Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.mm:115
> + NSMutableArray<NSString *> *nsIdentifiers = [NSMutableArray
arrayWithCapacity:100];
Why not use the capacity in identifiers?
More information about the webkit-reviews
mailing list