This is a regression from https://trac.webkit.org/changeset/248440/webkit.
rdar://problem/54168065
Is this a race condition where we don't have the PID yet when we try to create the sandbox extension?
(In reply to Brent Fulgham from comment #2) > Is this a race condition where we don't have the PID yet when we try to > create the sandbox extension? I think the pid is valid, but I will double-check.
Created attachment 376109 [details] Patch
Comment on attachment 376109 [details] Patch Oh! Got it.
(In reply to Brent Fulgham from comment #2) > Is this a race condition where we don't have the PID yet when we try to > create the sandbox extension? You are right, Brent. There seems to be a race between creating the sandbox extension when starting the load and getting the pid of the new WebContent process.
Created attachment 376162 [details] Patch
Comment on attachment 376162 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=376162&action=review > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:352 > + return false; Do we cleanly recover if this returns false? I.e., if the pid isn't available and so we don't create the extension, does WebKit try again later?
(In reply to Brent Fulgham from comment #8) > Comment on attachment 376162 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=376162&action=review > > > Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:352 > > + return false; > > Do we cleanly recover if this returns false? I.e., if the pid isn't > available and so we don't create the extension, does WebKit try again later? If the pid is invalid, the patch falls back to creating an extension without the pid. I am not sure if this is the optimal solution. I am also looking into creating the extension with an audit token instead of a pid. Thanks for reviewing!
*** This bug has been marked as a duplicate of bug 200772 ***