| Summary: | Use WebProcess::existingGPUProcessConnection() whenever possible | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
| Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | darin, eric.carlson, ews-watchlist, ggaren, glenn, jer.noble, kkinnunen, philipj, sergio, simon.fraser, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Chris Dumez
2021-04-17 18:58:33 PDT
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]. |