Fix observed sandbox violations related to media playback.
Created attachment 391343 [details] Patch
Created attachment 391346 [details] Patch
Created attachment 391368 [details] Patch
Comment on attachment 391368 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=391368&action=review > Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:289 > + if (!parameters.mediaCacheDirectory.isEmpty()) { > + String parentFolder = parameters.mediaCacheDirectory; > + if ((auto position = parentFolder.reverseFind("/")) != notFound) > + parentFolder = parentFolder.substring(0, position); > + SandboxExtension::createHandleWithoutResolvingPath(parentFolder, SandboxExtension::Type::ReadWrite, parameters.mediaCacheDirectorySandboxExtensionHandle); > + } Two things: - I think it would be better to do this in the WebProcess, this process should just use the path provided. - This shouldn't be necessary at all, please file a bug about the media framework behavior.
Created attachment 391369 [details] Patch
(In reply to Eric Carlson from comment #4) > Comment on attachment 391368 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=391368&action=review > > > Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:289 > > + if (!parameters.mediaCacheDirectory.isEmpty()) { > > + String parentFolder = parameters.mediaCacheDirectory; > > + if ((auto position = parentFolder.reverseFind("/")) != notFound) > > + parentFolder = parentFolder.substring(0, position); > > + SandboxExtension::createHandleWithoutResolvingPath(parentFolder, SandboxExtension::Type::ReadWrite, parameters.mediaCacheDirectorySandboxExtensionHandle); > > + } > > Two things: > - I think it would be better to do this in the WebProcess, this process > should just use the path provided. > - This shouldn't be necessary at all, please file a bug about the media > framework behavior. Thanks for reviewing! I will file a bug about the media framework behavior.
Comment on attachment 391369 [details] Patch Clearing flags on attachment: 391369 Committed r257135: <https://trac.webkit.org/changeset/257135>
<rdar://problem/59818090>