Summary: | [GPUProcess] Add basic GPUProcess crash handling for canvas | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Chris Dumez <cdumez> | ||||||
Component: | WebKit2 | Assignee: | Chris Dumez <cdumez> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | darin, sabouhallawa, simon.fraser, thorton, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=219007 | ||||||||
Attachments: |
|
Description
Chris Dumez
2020-11-13 15:13:27 PST
Created attachment 414098 [details]
Patch
Comment on attachment 414098 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414098&action=review > Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:83 > + float resolutionScale() const override { return m_resolutionScale; } final? > Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:66 > + // Register itself as a MessageReceiver in the GPUProcessConnection. Comment doesn't add anything. > Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:70 > + IPC::MessageReceiverMap& messageReceiverMap = connection.messageReceiverMap(); auto? > Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:74 > + send(Messages::GPUConnectionToWebProcess::CreateRenderingBackend(m_renderingBackendIdentifier), 0); Comment doesn't add anything. > Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:101 > + connectToGPUProcess(); > + > + for (auto& pair : m_remoteResourceCacheProxy.imageBuffers()) { > + if (auto& baseImageBuffer = pair.value) { > + if (is<AcceleratedRemoteImageBufferProxy>(*baseImageBuffer)) > + recreateImageBuffer(*this, downcast<AcceleratedRemoteImageBufferProxy>(*baseImageBuffer), pair.key, m_renderingBackendIdentifier); > + else > + recreateImageBuffer(*this, downcast<UnacceleratedRemoteImageBufferProxy>(*baseImageBuffer), pair.key, m_renderingBackendIdentifier); > + } > + } It's weird to see this code in a "didClose" function. It would be nicer to move this to a "reestablishGPUConnection" function. Created attachment 414103 [details]
Patch
Committed r269809: <https://trac.webkit.org/changeset/269809> All reviewed patches have been landed. Closing bug and clearing flags on attachment 414103 [details]. Comment on attachment 414103 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=414103&action=review > Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:416 > + RetainPtr<CGContextRef> context = CGBitmapContextCreate(rgba, viewWidthInPixels, viewHeightInPixels, 8, 4 * viewWidthInPixels, colorSpace.get(), kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); Missing adoptCF here, so this bitmap context will leak. (In reply to Darin Adler from comment #6) > Comment on attachment 414103 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=414103&action=review > > > Tools/TestWebKitAPI/Tests/WebKitCocoa/GPUProcess.mm:416 > > + RetainPtr<CGContextRef> context = CGBitmapContextCreate(rgba, viewWidthInPixels, viewHeightInPixels, 8, 4 * viewWidthInPixels, colorSpace.get(), kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); > > Missing adoptCF here, so this bitmap context will leak. I had copied from an existing screenshot tests. Will fix existing tests and new tests via https://bugs.webkit.org/show_bug.cgi?id=218988. Thanks. |