WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 170093
Add API to get available content extension identifiers in a WKContentExtensionStore
https://bugs.webkit.org/show_bug.cgi?id=170093
Summary
Add API to get available content extension identifiers in a WKContentExtensio...
Alex Christensen
Reported
2017-03-24 19:16:46 PDT
Based on API review feedback, this would make sense to have.
Attachments
patch
(14.42 KB, patch)
2017-03-24 19:19 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Patch
(14.86 KB, patch)
2017-04-10 17:09 PDT
,
Alex Christensen
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Alex Christensen
Comment 1
2017-03-24 19:19:41 PDT
Created
attachment 305352
[details]
patch
Geoffrey Garen
Comment 2
2017-04-10 11:00:41 PDT
Comment on
attachment 305352
[details]
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?
Alex Christensen
Comment 3
2017-04-10 11:03:03 PDT
Comment on
attachment 305352
[details]
patch View in context:
https://bugs.webkit.org/attachment.cgi?id=305352&action=review
>> Source/WebKit2/UIProcess/API/Cocoa/WKContentExtensionStore.mm:115 >> + NSMutableArray<NSString *> *nsIdentifiers = [NSMutableArray arrayWithCapacity:100]; > > Why not use the capacity in identifiers?
100 ought to be enough for anyone. JK, this should obviously be the actual capacity.
Alex Christensen
Comment 4
2017-04-10 17:09:28 PDT
Created
attachment 306760
[details]
Patch
Alex Christensen
Comment 5
2017-04-10 17:11:47 PDT
http://trac.webkit.org/r215209
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug