Use WebProcess::existingGPUProcessConnection() whenever possible, instead of WebProcess::ensureGPUProcessConnection(). This avoids relaunching the GPUProcess if it has already exited.
Created attachment 426360 [details] Patch
Comment on attachment 426360 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426360&action=review > Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.cpp:58 > + if (auto* gpuProcessConnection = WebProcess::singleton().existingGPUProcessConnection()) { I don’t think it’s an improvement to use the multi-word name for the local variable. Yes, it’s the GPU Process connection, but the name can just be connection in such tight if statements. You may not agree, but I really prefer simple single-word names when possible, even if there is some slight ambiguity.
Comment on attachment 426360 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=426360&action=review >> Source/WebKit/WebProcess/GPU/media/RemoteAudioHardwareListener.cpp:58 >> + if (auto* gpuProcessConnection = WebProcess::singleton().existingGPUProcessConnection()) { > > I don’t think it’s an improvement to use the multi-word name for the local variable. Yes, it’s the GPU Process connection, but the name can just be connection in such tight if statements. You may not agree, but I really prefer simple single-word names when possible, even if there is some slight ambiguity. Ok. I went this way because connection->connection() looks a bit weird. The ambiguity between IPC::Connection and GPUProcessConnection is a bit annoying.
Created attachment 426362 [details] Patch
(In reply to Chris Dumez from comment #4) > Created attachment 426362 [details] > Patch Renamed to "connection".
Committed r276218 (236700@main): <https://commits.webkit.org/236700@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426362 [details].
<rdar://problem/77110077>