Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 24861604232cde7d8f66d33fbd01ce388f8ff5e8
https://github.com/WebKit/WebKit/commit/24861604232cde7d8f66d33fbd01ce388f8ff5e8
Author: Said Abou-Hallawa <[email protected]>
Date: 2025-03-03 (Mon, 03 Mar 2025)
Changed paths:
M LayoutTests/platform/mac-wk2/TestExpectations
M Source/WebCore/platform/graphics/ImageBuffer.h
M Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.cpp
M Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.h
M
Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp
M Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h
M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/DrawingToPDF.mm
Log Message:
-----------
REGRESSION(290300@main): SaveAsPDF crashes if site-isolation is enabled
https://bugs.webkit.org/show_bug.cgi?id=288620
rdar://145673736
Reviewed by Simon Fraser.
290300@main made the snapshot for site-isolation happens through a DisplayList.
But generating the PDFDocument was happening on the main thread. This caused a
threading issue which was fixed in 291031@main.
The fix of this threading issue in 291031@main was to move generating the
PDFDocument
back to the `RemoteRendering WorkQueue` which is the correct approach.
But DrawingContext::replayDisplayList() requires a ControlFactory to be created
on the same thread. Otherwise it will call ControlFactory::shared() which
creates
a MainThreadNeverDestroyed ControlFactory. This causes this crash because
ControlFactory::shared() has to be called only from the main thread.
The fix is to make RemoteRenderingBackend create a ControlFactory and pass it to
ImageBufferDisplayListBackend::create().
* LayoutTests/platform/mac-wk2/TestExpectations:
* Source/WebCore/platform/graphics/ImageBuffer.h:
(WebCore::ImageBuffer::create):
* Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.cpp:
(WebCore::ImageBufferDisplayListBackend::create):
(WebCore::ImageBufferDisplayListBackend::ImageBufferDisplayListBackend):
(WebCore::ImageBufferDisplayListBackend::copyNativeImage):
(WebCore::ImageBufferDisplayListBackend::sinkIntoPDFDocument):
* Source/WebCore/platform/graphics/ImageBufferDisplayListBackend.h:
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.cpp:
(WebCore::DisplayList::DrawingContext::replayDisplayList):
* Source/WebCore/platform/graphics/displaylists/DisplayListDrawingContext.h:
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::allocateImageBufferInternal):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/DrawingToPDF.mm:
(TestWebKitAPI::enableSiteIsolation):
(TestWebKitAPI::TEST(DrawingToPDF, SiteIsolationFormControl)):
Canonical link: https://commits.webkit.org/291521@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes