| Summary: | RemoteRenderingBackend should not send IPC in the middle of destruction | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||||
| Component: | WebKit2 | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | cdumez, darin, kkinnunen, thorton, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | WebKit Nightly Build | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 232113 | ||||||||
| Attachments: |
|
||||||||
|
Description
Wenson Hsieh
2021-10-22 15:29:00 PDT
The issue here is that while we're tearing down the stream connection (and running through the remaining IPC stream messages as a result), if one of those stream messages is `RemoteRenderingBackend::didFlush()`, we'll end up trying to send an IPC message (and call into IPC::MessageSender methods) during destruction of RemoteRenderingBackend. This work needs to happen earlier — probably right after we've torn down the IPC stream connection. *** Bug 232183 has been marked as a duplicate of this bug. *** Created attachment 442240 [details]
Patch
Comment on attachment 442240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442240&action=review > Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:147 > + m_remoteDisplayLists.set(renderingResourceIdentifier, remoteDisplayList); When we know the key is not already in the map, set is just a slower slightly larger version of add. The difference is that after doing an add, set overwrites the value if the key is already in the map. Given that, I would have used add here. Comment on attachment 442240 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=442240&action=review Thanks for the review! >> Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:147 >> + m_remoteDisplayLists.set(renderingResourceIdentifier, remoteDisplayList); > > When we know the key is not already in the map, set is just a slower slightly larger version of add. The difference is that after doing an add, set overwrites the value if the key is already in the map. Given that, I would have used add here. Makes sense, since we should only be adding new entries here — I'll change this to use `add()`. Created attachment 442317 [details]
Patch for landing
Committed r284768 (243477@main): <https://commits.webkit.org/243477@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 442317 [details]. |