Summary: | [iOS] Do not create sandbox reports when the UI process cannot issue extensions to diagnostics service | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Per Arne Vollan <pvollan> | ||||
Component: | WebKit Misc. | Assignee: | Per Arne Vollan <pvollan> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, bfulgham, cdumez, cmarcelo, commit-queue, dbates, ews-watchlist, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Per Arne Vollan
2020-02-05 11:26:26 PST
Created attachment 389838 [details]
Patch
Comment on attachment 389838 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389838&action=review > Source/WebKit/Shared/SandboxExtension.h:59 > + }; You could maybe do: enum class Flags : uint32_t { Default = 0, NoReport = SANDBOX_EXTENSION_NO_REPORT }; Then I think that OptionSet<Flags> would map to unit32_t, and do the |-ing for you. But you would need to add SandboxSPI.h header, which might be undesirable. > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:91 > + extensionFlags |= SANDBOX_EXTENSION_NO_REPORT; I don't think you need this code, if you make the OptionSet<Flags> as I suggested. > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:97 > + return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE, path, extensionFlags); I wonder if we should consider adding SANDBOX_EXTENSION_CANONICAL to our file paths (if we ensure we always work with fully-resolved paths). (In reply to Brent Fulgham from comment #3) > Comment on attachment 389838 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=389838&action=review > > > Source/WebKit/Shared/SandboxExtension.h:59 > > + }; > > You could maybe do: > > enum class Flags : uint32_t { > Default = 0, > NoReport = SANDBOX_EXTENSION_NO_REPORT > }; > > > Then I think that OptionSet<Flags> would map to unit32_t, and do the |-ing > for you. > > But you would need to add SandboxSPI.h header, which might be undesirable. > Good idea! However, I don't think this will compile on other platforms. Are you OK with keeping as is? > > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:91 > > + extensionFlags |= SANDBOX_EXTENSION_NO_REPORT; > > I don't think you need this code, if you make the OptionSet<Flags> as I > suggested. > > > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:97 > > + return sandbox_extension_issue_file(APP_SANDBOX_READ_WRITE, path, extensionFlags); > > I wonder if we should consider adding SANDBOX_EXTENSION_CANONICAL to our > file paths (if we ensure we always work with fully-resolved paths). I think that would be good enhancement! Perhaps we could do this in a follow-up patch? Thanks for reviewing! Comment on attachment 389838 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=389838&action=review >>> Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:91 >>> + extensionFlags |= SANDBOX_EXTENSION_NO_REPORT; >> >> I don't think you need this code, if you make the OptionSet<Flags> as I suggested. > > I think that would be good enhancement! Perhaps we could do this in a follow-up patch? > > Thanks for reviewing! Sure -- no need to do now. Comment on attachment 389838 [details] Patch Clearing flags on attachment: 389838 Committed r255874: <https://trac.webkit.org/changeset/255874> All reviewed patches have been landed. Closing bug. |