Bug 229100 - Use Vector<SandboxExtension::Handle> instead of SandboxExtension::HandleArray
Summary: Use Vector<SandboxExtension::Handle> instead of SandboxExtension::HandleArray
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alex Christensen
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-13 15:14 PDT by Alex Christensen
Modified: 2021-08-19 19:35 PDT (History)
13 users (show)

See Also:


Attachments
Patch (73.63 KB, patch)
2021-08-13 15:15 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Patch (73.64 KB, patch)
2021-08-19 13:16 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff
Fix internal build? (2.11 KB, patch)
2021-08-19 18:43 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2021-08-13 15:14:09 PDT
Use Vector<SandboxExtension::Handle> instead of SandboxExtension::HandleArray
Comment 1 Alex Christensen 2021-08-13 15:15:16 PDT
Created attachment 435520 [details]
Patch
Comment 2 Chris Dumez 2021-08-19 12:33:32 PDT
Comment on attachment 435520 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435520&action=review

r=me

> Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:428
> +bool SandboxExtension::consumePermanently(const Vector<SandboxExtension::Handle>& handleArray)

Wouldn't `const Vector<Handle>&` work?

> Source/WebKit/Shared/SandboxExtension.h:127
> +inline auto SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral, const Vector<String>&) -> Vector<Handle> { return { }; }

Do we need the auto return value here? Wouldn't `Vector<Handle>` as return value work here since we're in the class scope?
Comment 3 Alex Christensen 2021-08-19 12:34:39 PDT
(In reply to Chris Dumez from comment #2)
> Comment on attachment 435520 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=435520&action=review
> 
> r=me
> 
> > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:428
> > +bool SandboxExtension::consumePermanently(const Vector<SandboxExtension::Handle>& handleArray)
> 
> Wouldn't `const Vector<Handle>&` work?
Yes.

> > Source/WebKit/Shared/SandboxExtension.h:127
> > +inline auto SandboxExtension::createReadOnlyHandlesForFiles(ASCIILiteral, const Vector<String>&) -> Vector<Handle> { return { }; }
> 
> Do we need the auto return value here? Wouldn't `Vector<Handle>` as return
> value work here since we're in the class scope?
No, only trailing return values are in the class scope.
Comment 4 Alex Christensen 2021-08-19 13:16:40 PDT
Created attachment 435896 [details]
Patch
Comment 5 EWS 2021-08-19 16:02:58 PDT
Committed r281277 (240702@main): <https://commits.webkit.org/240702@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435896 [details].
Comment 6 Radar WebKit Bug Importer 2021-08-19 16:03:58 PDT
<rdar://problem/82145920>
Comment 7 Wenson Hsieh 2021-08-19 18:43:18 PDT
Reopening to attach new patch.
Comment 8 Wenson Hsieh 2021-08-19 18:43:19 PDT
Created attachment 435933 [details]
Fix internal build?
Comment 9 EWS 2021-08-19 19:35:43 PDT
Committed r281289 (240713@main): <https://commits.webkit.org/240713@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435933 [details].