[webkit-changes] [285090] trunk/Source
Title: [285090] trunk/Source Revision 285090 Author mmaxfi...@apple.com Date 2021-10-30 20:22:46 -0700 (Sat, 30 Oct 2021) Log Message Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBuffer::logicalSize() https://bugs.webkit.org/show_bug.cgi?id=232528 Reviewed by Tim Horton. Source/WebCore: These are the callers which seem obviously correct to migrate from truncatedLogicalSize() to logicalSize(), because these are the callers that immediately cast the result to FloatSize. That means, before this patch, these callers are going from float -> int -> float. This patch is the fourth step in https://bugs.webkit.org/show_bug.cgi?id=225377. There is no situation where truncating the logical size is meaningful - we either want the float logical size, or we want the physical number of texels in the image (which is the logical size, times the resolution, rounded up to an int size). Eventually, we should move all callers off of truncatedLogicalSize() and on to either logicalSize() or a yet-to-be-written physicalSize()/texelCount()/bikeshedName(). * platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawImageBuffer): (WebCore::GraphicsContext::drawConsumingImageBuffer): * platform/graphics/displaylists/DisplayListImageBuffer.h: (WebCore::DisplayList::ImageBuffer::ImageBuffer): * platform/graphics/filters/FEBlend.cpp: (WebCore::FEBlend::platformApplySoftware): * platform/graphics/filters/FEComposite.cpp: (WebCore::FEComposite::platformApplySoftware): * rendering/CSSFilter.cpp: (WebCore::CSSFilter::allocateBackingStoreIfNeeded): * rendering/svg/RenderSVGResourcePattern.cpp: (WebCore::RenderSVGResourcePattern::buildPattern): Source/WebKit: * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::RemoteImageBufferProxy): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp trunk/Source/WebCore/platform/graphics/displaylists/DisplayListImageBuffer.h trunk/Source/WebCore/platform/graphics/filters/FEBlend.cpp trunk/Source/WebCore/platform/graphics/filters/FEComposite.cpp trunk/Source/WebCore/rendering/CSSFilter.cpp trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h Diff Modified: trunk/Source/WebCore/ChangeLog (285089 => 285090) --- trunk/Source/WebCore/ChangeLog 2021-10-31 03:19:15 UTC (rev 285089) +++ trunk/Source/WebCore/ChangeLog 2021-10-31 03:22:46 UTC (rev 285090) @@ -1,3 +1,34 @@ +2021-10-30 Myles C. Maxfield + +Migrate the first few callers from ImageBuffer::truncatedLogicalSize() to ImageBuffer::logicalSize() +https://bugs.webkit.org/show_bug.cgi?id=232528 + +Reviewed by Tim Horton. + +These are the callers which seem obviously correct to migrate from truncatedLogicalSize() to logicalSize(), +because these are the callers that immediately cast the result to FloatSize. That means, before this patch, +these callers are going from float -> int -> float. + +This patch is the fourth step in https://bugs.webkit.org/show_bug.cgi?id=225377. There is no situation where +truncating the logical size is meaningful - we either want the float logical size, or we want the physical +number of texels in the image (which is the logical size, times the resolution, rounded up to an int size). +Eventually, we should move all callers off of truncatedLogicalSize() and on to either logicalSize() or +a yet-to-be-written physicalSize()/texelCount()/bikeshedName(). + +* platform/graphics/GraphicsContext.cpp: +(WebCore::GraphicsContext::drawImageBuffer): +(WebCore::GraphicsContext::drawConsumingImageBuffer): +* platform/graphics/displaylists/DisplayListImageBuffer.h: +(WebCore::DisplayList::ImageBuffer::ImageBuffer): +* platform/graphics/filters/FEBlend.cpp: +(WebCore::FEBlend::platformApplySoftware): +* platform/graphics/filters/FEComposite.cpp: +(WebCore::FEComposite::platformApplySoftware): +* rendering/CSSFilter.cpp: +(WebCore::CSSFilter::allocateBackingStoreIfNeeded): +* rendering/svg/RenderSVGResourcePattern.cpp: +(WebCore::RenderSVGResourcePattern::buildPattern): + 2021-10-30 Wenson Hsieh Layer tree should not be stuck in frozen state after explicitly stopping a page load Modified: trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp (285089 => 285090) --- trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2021-10-31 03:19:15 UTC (rev 285089) +++ trunk/Source/WebCore/platform/graphics/GraphicsContext.cpp 2021-10-31 03:22:46 UTC (rev 285090) @@ -591,12 +591,12 @@ void GraphicsContext::drawImageBuffer(ImageBuffer& image, const FloatPoint& destination, const ImagePaintingOptions& imagePaintingOptions) { -drawImageBuffer(image, FloatRect(destination,
[webkit-changes] [285089] trunk
Title: [285089] trunk Revision 285089 Author wenson_hs...@apple.com Date 2021-10-30 20:19:15 -0700 (Sat, 30 Oct 2021) Log Message Layer tree should not be stuck in frozen state after explicitly stopping a page load https://bugs.webkit.org/show_bug.cgi?id=232532 rdar://84522357 Reviewed by Tim Horton. Source/WebCore: Add WEBCORE_EXPORT to a method. See WebKit/ChangeLog for more details. Test: http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html * loader/FrameLoader.h: Source/WebKit: >From diagnostic logs gathered in rdar://84522357, it's apparently possible for the layer tree to be stuck in a state where it's indefinitely frozen after the user explicitly stops the page load (e.g. by tapping on the "x" button in Safari). Specifically, these logs indicate that the `PageTransition` layer tree freeze reason may persist even after the user has canceled the load, leading to situations where content may be visible but unresponsive. >From code inspection, this may happen for multiple reasons, one of which is that a media element has incremented the load event delay count, which in turn prevents us from transitioning to completed state inside `FrameLoader::checkLoadCompleteForThisFrame()`. It's unknown whether this (in particular) is the cause of unresponsiveness observed by the reporter of rdar://84522357, but we can at least use this in order to come up with a layout test; to mitigate all instances where the `PageTransition` reason may persist after the load has been stopped, we make `WebPage::stopLoading()` complete the page transition (thereby lifting the freeze reason) if needed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::stopLoading): Tools: Add support for `TestRunner.stopLoading()`, which immediately stops the page load, emulating what would normally happen if the user taps or clicks the "x" button to cancel loading in Safari. See the layout test for more details. * DumpRenderTree/TestRunner.cpp: (stopLoadingCallback): (TestRunner::staticFunctions): * DumpRenderTree/TestRunner.h: * DumpRenderTree/mac/TestRunnerMac.mm: (TestRunner::stopLoading): * DumpRenderTree/win/TestRunnerWin.cpp: (TestRunner::stopLoading): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::stopLoading): * WebKitTestRunner/InjectedBundle/TestRunner.h: LayoutTests: Add a test that verifies that a `requestAnimationFrame()` callback fires even after stopping page load. This test fails without the fix in this patch, since the layer tree ends up in a permanently frozen state. * http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt: Added. * http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/loader/FrameLoader.h trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp trunk/Tools/ChangeLog trunk/Tools/DumpRenderTree/TestRunner.cpp trunk/Tools/DumpRenderTree/TestRunner.h trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm trunk/Tools/DumpRenderTree/win/TestRunnerWin.cpp trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h Added Paths trunk/LayoutTests/http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt trunk/LayoutTests/http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html Diff Modified: trunk/LayoutTests/ChangeLog (285088 => 285089) --- trunk/LayoutTests/ChangeLog 2021-10-31 02:37:24 UTC (rev 285088) +++ trunk/LayoutTests/ChangeLog 2021-10-31 03:19:15 UTC (rev 285089) @@ -1,3 +1,17 @@ +2021-10-30 Wenson Hsieh + +Layer tree should not be stuck in frozen state after explicitly stopping a page load +https://bugs.webkit.org/show_bug.cgi?id=232532 +rdar://84522357 + +Reviewed by Tim Horton. + +Add a test that verifies that a `requestAnimationFrame()` callback fires even after stopping page load. This +test fails without the fix in this patch, since the layer tree ends up in a permanently frozen state. + +* http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt: Added. +* http/tests/navigation/unfreeze-layer-tree-after-stopping-load.html: Added. + 2021-10-30 Myles C. Maxfield [GPU Process] Small ImageBuffers cause the web process to crash Added: trunk/LayoutTests/http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt (0 => 285089) --- trunk/LayoutTests/http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt (rev 0) +++ trunk/LayoutTests/http/tests/navigation/unfreeze-layer-tree-after-stopping-load-expected.txt 2021-10-31 03:19:15 UTC (rev 285089) @@ -0,0 +1 @@ +This test requires WebKitTestRunner/DumpRenderTree. Added:
[webkit-changes] [285088] trunk/Source/WebKit
Title: [285088] trunk/Source/WebKit Revision 285088 Author mmaxfi...@apple.com Date 2021-10-30 19:37:24 -0700 (Sat, 30 Oct 2021) Log Message Web process shouldn't crash if ImageBuffer::ensureBackendCreated() fails https://bugs.webkit.org/show_bug.cgi?id=232520 Reviewed by Simon Fraser. Guard against the possibility of it returning null. No new tests because there shouldn't be any behavior change after https://bugs.webkit.org/show_bug.cgi?id=232470. It's still good to do this, though, to be defensive. * Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: (WebKit::RemoteLayerBackingStore::encode const): * WebProcess/GPU/graphics/RemoteImageBufferProxy.h: (WebKit::RemoteImageBufferProxy::createImageBufferBackendHandle): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h Diff Modified: trunk/Source/WebKit/ChangeLog (285087 => 285088) --- trunk/Source/WebKit/ChangeLog 2021-10-31 02:24:17 UTC (rev 285087) +++ trunk/Source/WebKit/ChangeLog 2021-10-31 02:37:24 UTC (rev 285088) @@ -1,5 +1,23 @@ 2021-10-30 Myles C. Maxfield +Web process shouldn't crash if ImageBuffer::ensureBackendCreated() fails +https://bugs.webkit.org/show_bug.cgi?id=232520 + + +Reviewed by Simon Fraser. + +Guard against the possibility of it returning null. + +No new tests because there shouldn't be any behavior change after https://bugs.webkit.org/show_bug.cgi?id=232470. +It's still good to do this, though, to be defensive. + +* Shared/RemoteLayerTree/RemoteLayerBackingStore.mm: +(WebKit::RemoteLayerBackingStore::encode const): +* WebProcess/GPU/graphics/RemoteImageBufferProxy.h: +(WebKit::RemoteImageBufferProxy::createImageBufferBackendHandle): + +2021-10-30 Myles C. Maxfield + [GPU Process] Small ImageBuffers cause the web process to crash https://bugs.webkit.org/show_bug.cgi?id=232470 Modified: trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm (285087 => 285088) --- trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2021-10-31 02:24:17 UTC (rev 285087) +++ trunk/Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm 2021-10-31 02:37:24 UTC (rev 285088) @@ -117,13 +117,16 @@ if (m_frontBuffer.imageBuffer) { switch (m_type) { case Type::IOSurface: -if (m_frontBuffer.imageBuffer->canMapBackingStore()) -handle = static_cast(*m_frontBuffer.imageBuffer->ensureBackendCreated()).createImageBufferBackendHandle(); -else -handle = static_cast(*m_frontBuffer.imageBuffer->ensureBackendCreated()).createImageBufferBackendHandle(); +if (auto* backend = m_frontBuffer.imageBuffer->ensureBackendCreated()) { +if (m_frontBuffer.imageBuffer->canMapBackingStore()) +handle = static_cast(*backend).createImageBufferBackendHandle(); +else +handle = static_cast(*backend).createImageBufferBackendHandle(); +} break; case Type::Bitmap: -handle = static_cast(*m_frontBuffer.imageBuffer->ensureBackendCreated()).createImageBufferBackendHandle(); +if (auto* backend = m_frontBuffer.imageBuffer->ensureBackendCreated()) +handle = static_cast(*backend).createImageBufferBackendHandle(); break; } } @@ -132,8 +135,10 @@ #if ENABLE(CG_DISPLAY_LIST_BACKED_IMAGE_BUFFER) std::optional displayListHandle; -if (m_frontBuffer.displayListImageBuffer) -displayListHandle = static_cast(*m_frontBuffer.displayListImageBuffer->ensureBackendCreated()).createImageBufferBackendHandle(); +if (m_frontBuffer.displayListImageBuffer) { +if (auto* backend = m_frontBuffer.displayListImageBuffer->ensureBackendCreated()) +displayListHandle = static_cast(*backend).createImageBufferBackendHandle(); +} encoder << displayListHandle; #endif Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h (285087 => 285088) --- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h 2021-10-31 02:24:17 UTC (rev 285087) +++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h 2021-10-31 02:37:24 UTC (rev 285088) @@ -75,8 +75,9 @@ ImageBufferBackendHandle createImageBufferBackendHandle() { -ensureBackendCreated(); -return m_backend->createImageBufferBackendHandle(); +if (ensureBackendCreated()) +return m_backend->createImageBufferBackendHandle(); +return { }; } WebCore::GraphicsContextFlushIdentifier lastSentFlushIdentifier() const { return m_sentFlushIdentifier; } ___ webkit-changes mailing list
[webkit-changes] [285087] trunk
Title: [285087] trunk Revision 285087 Author mmaxfi...@apple.com Date 2021-10-30 19:24:17 -0700 (Sat, 30 Oct 2021) Log Message [GPU Process] Small ImageBuffers cause the web process to crash https://bugs.webkit.org/show_bug.cgi?id=232470 Reviewed by Tim Horton. Source/WebKit: The problem is when the (floating point) size < 1x1, but the size*resolution is >= 1x1. In this situation, calculateSafeBackendSize() is correctly determining that this isn't a zero-sized ImageBuffer, but when we go to actually pass the size to the GPU process, we call this: IntSize logicalSize() const override { return IntSize(m_parameters.logicalSize); } So, the logical size gets truncated down to 0, and then the GPU process fails to allocate the ImageBuffer, and then the web process blocks on the GPU process indefinitely, and then eventually times out and then crashes. I'm going to deal with that last step (the crash itself) in a secondary patch - if the web process doesn't hear from the GPU process, it shouldn't crash. This patch simply exposes a floatLogicalSize() function on ImageBuffer, so we can get the full-fidelity logical size to pass that to the GPU process. Test: compositing/device-pixel-image-buffer-hidpi.html * WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: (WebKit::RemoteRenderingBackendProxy::createRemoteImageBuffer): LayoutTests: * compositing/device-pixel-image-buffer-hidpi-expected.html: Added. * compositing/device-pixel-image-buffer-hidpi.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp Added Paths trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi-expected.html trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi.html Diff Modified: trunk/LayoutTests/ChangeLog (285086 => 285087) --- trunk/LayoutTests/ChangeLog 2021-10-31 01:24:38 UTC (rev 285086) +++ trunk/LayoutTests/ChangeLog 2021-10-31 02:24:17 UTC (rev 285087) @@ -1,3 +1,14 @@ +2021-10-30 Myles C. Maxfield + +[GPU Process] Small ImageBuffers cause the web process to crash +https://bugs.webkit.org/show_bug.cgi?id=232470 + + +Reviewed by Tim Horton. + +* compositing/device-pixel-image-buffer-hidpi-expected.html: Added. +* compositing/device-pixel-image-buffer-hidpi.html: Added. + 2021-10-30 Chris Dumez [ BigSur wk2 Debug arm64 ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html is a flaky crash Added: trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi-expected.html (0 => 285087) --- trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi-expected.html (rev 0) +++ trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi-expected.html 2021-10-31 02:24:17 UTC (rev 285087) @@ -0,0 +1,10 @@ + + + + + + +This test passes if there is no crash. The crash might happen on a subsequent test. +Hello + + Added: trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi.html (0 => 285087) --- trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi.html (rev 0) +++ trunk/LayoutTests/compositing/device-pixel-image-buffer-hidpi.html 2021-10-31 02:24:17 UTC (rev 285087) @@ -0,0 +1,10 @@ + + + + + + +This test passes if there is no crash. The crash might happen on a subsequent test. +Hello + + Modified: trunk/Source/WebKit/ChangeLog (285086 => 285087) --- trunk/Source/WebKit/ChangeLog 2021-10-31 01:24:38 UTC (rev 285086) +++ trunk/Source/WebKit/ChangeLog 2021-10-31 02:24:17 UTC (rev 285087) @@ -1,3 +1,32 @@ +2021-10-30 Myles C. Maxfield + +[GPU Process] Small ImageBuffers cause the web process to crash +https://bugs.webkit.org/show_bug.cgi?id=232470 + + +Reviewed by Tim Horton. + +The problem is when the (floating point) size < 1x1, but the size*resolution is >= 1x1. +In this situation, calculateSafeBackendSize() is correctly determining that this +isn't a zero-sized ImageBuffer, but when we go to actually pass the size to the GPU +process, we call this: + +IntSize logicalSize() const override { return IntSize(m_parameters.logicalSize); } + +So, the logical size gets truncated down to 0, and then the GPU process fails to allocate +the ImageBuffer, and then the web process blocks on the GPU process indefinitely, and then +eventually times out and then crashes. I'm going to deal with that last step (the crash +itself) in a secondary patch - if the web process doesn't hear from the GPU process, it +shouldn't crash. + +This patch simply exposes a floatLogicalSize() function on ImageBuffer, so we can get +the full-fidelity logical size to pass that to the GPU process. + +Test: compositing/device-pixel-image-buffer-hidpi.html + +* WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp: +
[webkit-changes] [285086] trunk
Title: [285086] trunk Revision 285086 Author cdu...@apple.com Date 2021-10-30 18:24:38 -0700 (Sat, 30 Oct 2021) Log Message Improve error handling in sendWithAsyncReply() https://bugs.webkit.org/show_bug.cgi?id=232508 Reviewed by Darin Adler. Source/WebKit: * Platform/IPC/Connection.cpp: (IPC::Connection::invalidate): We stop delivering messages as soon as |m_valid| becomes false. It is thus a good idea to cancel any pending async reply handlers as soon as we set m_isValid to false. We were doing it correctly in connectionDidClose() but not in invalidate(). The Connection destructor would eventually call the async reply handlers. However, I have noticed when investigating a leak that this may delay the calling of the reply handler for a long time if something keeps the Connection alive (or forever in case of a leak). * Platform/IPC/Connection.h: (IPC::Connection::sendWithAsyncReply): Return early if the connection is no longer valid and call the completion handler right away (but asynchronously). Previously, we'd register the async reply handler and then the call to sendMessage() would fail. * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _getContentsAsStringWithCompletionHandlerKeepIPCConnectionAliveForTesting:]): * UIProcess/API/Cocoa/WKWebViewPrivate.h: Add helper SPI for API test. Tools: Add API test coverage. * TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm: (TEST): Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/Platform/IPC/Connection.cpp trunk/Source/WebKit/Platform/IPC/Connection.h trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKWebViewGetContents.mm Diff Modified: trunk/Source/WebKit/ChangeLog (285085 => 285086) --- trunk/Source/WebKit/ChangeLog 2021-10-31 01:18:06 UTC (rev 285085) +++ trunk/Source/WebKit/ChangeLog 2021-10-31 01:24:38 UTC (rev 285086) @@ -1,3 +1,32 @@ +2021-10-30 Chris Dumez + +Improve error handling in sendWithAsyncReply() +https://bugs.webkit.org/show_bug.cgi?id=232508 + +Reviewed by Darin Adler. + +* Platform/IPC/Connection.cpp: +(IPC::Connection::invalidate): +We stop delivering messages as soon as |m_valid| becomes false. It is +thus a good idea to cancel any pending async reply handlers as soon +as we set m_isValid to false. We were doing it correctly in connectionDidClose() +but not in invalidate(). The Connection destructor would eventually call +the async reply handlers. However, I have noticed when investigating a leak +that this may delay the calling of the reply handler for a long time if +something keeps the Connection alive (or forever in case of a leak). + +* Platform/IPC/Connection.h: +(IPC::Connection::sendWithAsyncReply): +Return early if the connection is no longer valid and call the +completion handler right away (but asynchronously). Previously, +we'd register the async reply handler and then the call to +sendMessage() would fail. + +* UIProcess/API/Cocoa/WKWebView.mm: +(-[WKWebView _getContentsAsStringWithCompletionHandlerKeepIPCConnectionAliveForTesting:]): +* UIProcess/API/Cocoa/WKWebViewPrivate.h: +Add helper SPI for API test. + 2021-10-30 Kate Cheney [iOS 15] Loads after WKWebView session restore are marked as app-initiated Modified: trunk/Source/WebKit/Platform/IPC/Connection.cpp (285085 => 285086) --- trunk/Source/WebKit/Platform/IPC/Connection.cpp 2021-10-31 01:18:06 UTC (rev 285085) +++ trunk/Source/WebKit/Platform/IPC/Connection.cpp 2021-10-31 01:24:38 UTC (rev 285086) @@ -428,6 +428,7 @@ } m_isValid = false; +clearAsyncReplyHandlers(*this); m_connectionQueue->dispatch([protectedThis = Ref { *this }]() mutable { protectedThis->platformInvalidate(); Modified: trunk/Source/WebKit/Platform/IPC/Connection.h (285085 => 285086) --- trunk/Source/WebKit/Platform/IPC/Connection.h 2021-10-31 01:18:06 UTC (rev 285085) +++ trunk/Source/WebKit/Platform/IPC/Connection.h 2021-10-31 01:24:38 UTC (rev 285086) @@ -546,6 +546,13 @@ { COMPILE_ASSERT(!T::isSync, AsyncMessageExpected); +if (!isValid()) { +RunLoop::main().dispatch([completionHandler = WTFMove(completionHandler)]() mutable { +T::cancelReply(WTFMove(completionHandler)); +}); +return 0; +} + auto encoder = makeUniqueRef(T::name(), destinationID); uint64_t listenerID = nextAsyncReplyHandlerID(); addAsyncReplyHandler(*this, listenerID, CompletionHandler([completionHandler = WTFMove(completionHandler)] (Decoder* decoder) mutable { Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm (285085 => 285086) --- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebView.mm 2021-10-31 01:18:06 UTC (rev 285085) +++
[webkit-changes] [285085] trunk
Title: [285085] trunk Revision 285085 Author cdu...@apple.com Date 2021-10-30 18:18:06 -0700 (Sat, 30 Oct 2021) Log Message [ BigSur wk2 Debug arm64 ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html is a flaky crash https://bugs.webkit.org/show_bug.cgi?id=232500 Reviewed by Eric Carlson. Source/WebCore: The call to HashSet::remove() may cause a memory allocation so we need to extend the scope of the DisableMallocRestrictionsForCurrentThreadScope to avoid assertion hits in debug builds. No new tests, unskipped existing test. * Modules/webaudio/AudioSummingJunction.cpp: (WebCore::AudioSummingJunction::removeOutput): LayoutTests: Unskip test that is no longer crashing. * platform/mac-wk2/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/mac-wk2/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp Diff Modified: trunk/LayoutTests/ChangeLog (285084 => 285085) --- trunk/LayoutTests/ChangeLog 2021-10-30 22:58:21 UTC (rev 285084) +++ trunk/LayoutTests/ChangeLog 2021-10-31 01:18:06 UTC (rev 285085) @@ -1,3 +1,15 @@ +2021-10-30 Chris Dumez + +[ BigSur wk2 Debug arm64 ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html is a flaky crash +https://bugs.webkit.org/show_bug.cgi?id=232500 + + +Reviewed by Eric Carlson. + +Unskip test that is no longer crashing. + +* platform/mac-wk2/TestExpectations: + 2021-10-30 Brandon Stewart Selection extend() should trigger exception with no ranges Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (285084 => 285085) --- trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-10-30 22:58:21 UTC (rev 285084) +++ trunk/LayoutTests/platform/mac-wk2/TestExpectations 2021-10-31 01:18:06 UTC (rev 285085) @@ -1694,4 +1694,3 @@ webkit.org/b/232497 [ BigSur Debug ] media/media-source/media-source-istypesupported-case-sensitive.html [ Pass Crash ] -webkit.org/b/232500 [ Catalina BigSur Debug ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html [ Pass Crash ] Modified: trunk/Source/WebCore/ChangeLog (285084 => 285085) --- trunk/Source/WebCore/ChangeLog 2021-10-30 22:58:21 UTC (rev 285084) +++ trunk/Source/WebCore/ChangeLog 2021-10-31 01:18:06 UTC (rev 285085) @@ -1,3 +1,19 @@ +2021-10-30 Chris Dumez + +[ BigSur wk2 Debug arm64 ] webaudio/AudioBufferSource/audiobuffersource-playbackrate.html is a flaky crash +https://bugs.webkit.org/show_bug.cgi?id=232500 + + +Reviewed by Eric Carlson. + +The call to HashSet::remove() may cause a memory allocation so we need to extend the scope of the +DisableMallocRestrictionsForCurrentThreadScope to avoid assertion hits in debug builds. + +No new tests, unskipped existing test. + +* Modules/webaudio/AudioSummingJunction.cpp: +(WebCore::AudioSummingJunction::removeOutput): + 2021-10-30 Brandon Stewart Selection extend() should trigger exception with no ranges Modified: trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp (285084 => 285085) --- trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp 2021-10-30 22:58:21 UTC (rev 285084) +++ trunk/Source/WebCore/Modules/webaudio/AudioSummingJunction.cpp 2021-10-31 01:18:06 UTC (rev 285085) @@ -75,13 +75,15 @@ { ASSERT(context()); ASSERT(context()->isGraphOwner()); + +// Heap allocations are forbidden on the audio thread for performance reasons so we need to +// explicitly allow the following allocation(s). +DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; + if (!m_outputs.remove()) return false; if (m_pendingRenderingOutputs.isEmpty()) { -// Heap allocations are forbidden on the audio thread for performance reasons so we need to -// explicitly allow the following allocation(s). -DisableMallocRestrictionsForCurrentThreadScope disableMallocRestrictions; m_pendingRenderingOutputs = copyToVector(m_outputs); } else m_pendingRenderingOutputs.removeFirst(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [285084] trunk
Title: [285084] trunk Revision 285084 Author commit-qu...@webkit.org Date 2021-10-30 15:58:21 -0700 (Sat, 30 Oct 2021) Log Message Selection extend() should trigger exception with no ranges https://bugs.webkit.org/show_bug.cgi?id=232420 Patch by Brandon Stewart on 2021-10-30 Reviewed by Chris Dumez. LayoutTests/imported/w3c: Verify extend() will throw an exception when the Selection object contains no Range objects. Chrome and Firefox will also throw an exception in this scenario. https://w3c.github.io/selection-api/#dom-selection-extend * web-platform-tests/selection/extend-exception-expected.txt: Added. * web-platform-tests/selection/extend-exception.html: Added. Source/WebCore: The 'extend' method in the Selection API should throw an exception upon being called if there are no ranges present in the Selection object. https://w3c.github.io/selection-api/#dom-selection-extend Test: imported/w3c/web-platform-tests/selection/extend-exception.html * page/DOMSelection.cpp: (WebCore::DOMSelection::extend): LayoutTests: Resolve errors in test cases introduced by new exception being thrown by extend() when no ranges are present. * editing/execCommand/null_calc_primitive_value_for_css_property.html: * editing/execCommand/transpose-backslash-with-euc.html: * editing/inserting/insert-html-crash-02.html: * editing/selection/DOMSelection-crossing-document-expected.txt: * editing/selection/DOMSelection-crossing-document.html: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html trunk/LayoutTests/editing/execCommand/transpose-backslash-with-euc.html trunk/LayoutTests/editing/inserting/insert-html-crash-02.html trunk/LayoutTests/editing/selection/DOMSelection-crossing-document-expected.txt trunk/LayoutTests/editing/selection/DOMSelection-crossing-document.html trunk/LayoutTests/imported/w3c/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/DOMSelection.cpp Added Paths trunk/LayoutTests/imported/w3c/web-platform-tests/selection/extend-exception-expected.txt trunk/LayoutTests/imported/w3c/web-platform-tests/selection/extend-exception.html Diff Modified: trunk/LayoutTests/ChangeLog (285083 => 285084) --- trunk/LayoutTests/ChangeLog 2021-10-30 19:57:56 UTC (rev 285083) +++ trunk/LayoutTests/ChangeLog 2021-10-30 22:58:21 UTC (rev 285084) @@ -1,3 +1,19 @@ +2021-10-30 Brandon Stewart + +Selection extend() should trigger exception with no ranges +https://bugs.webkit.org/show_bug.cgi?id=232420 + +Reviewed by Chris Dumez. + +Resolve errors in test cases introduced by new exception being thrown by extend() +when no ranges are present. + +* editing/execCommand/null_calc_primitive_value_for_css_property.html: +* editing/execCommand/transpose-backslash-with-euc.html: +* editing/inserting/insert-html-crash-02.html: +* editing/selection/DOMSelection-crossing-document-expected.txt: +* editing/selection/DOMSelection-crossing-document.html: + 2021-10-29 Lauro Moura [GLIB] Gardening timeouts affected by xhtml mimetype misdetection Modified: trunk/LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html (285083 => 285084) --- trunk/LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html 2021-10-30 19:57:56 UTC (rev 285083) +++ trunk/LayoutTests/editing/execCommand/null_calc_primitive_value_for_css_property.html 2021-10-30 22:58:21 UTC (rev 285084) @@ -10,7 +10,9 @@ if (window.testRunner) testRunner.dumpAsText(); -document.getSelection().extend(x); +document.getSelection().collapse(x, 0); +document.getSelection().extend(x); + document.execCommand("insertHTML", false, "The test passes if there is no crash."); } Modified: trunk/LayoutTests/editing/execCommand/transpose-backslash-with-euc.html (285083 => 285084) --- trunk/LayoutTests/editing/execCommand/transpose-backslash-with-euc.html 2021-10-30 19:57:56 UTC (rev 285083) +++ trunk/LayoutTests/editing/execCommand/transpose-backslash-with-euc.html 2021-10-30 22:58:21 UTC (rev 285084) @@ -11,6 +11,7 @@ function test() { var backslashDivElement = document.getElementById("backslash"); +getSelection().collapse(backslashDivElement, 0); getSelection().extend(backslashDivElement, 1); document.execCommand("Transpose"); Modified: trunk/LayoutTests/editing/inserting/insert-html-crash-02.html (285083 => 285084) --- trunk/LayoutTests/editing/inserting/insert-html-crash-02.html 2021-10-30 19:57:56 UTC (rev 285083) +++ trunk/LayoutTests/editing/inserting/insert-html-crash-02.html 2021-10-30 22:58:21 UTC (rev 285084) @@ -13,6 +13,7 @@ let iframe0 = document.createElement('iframe'); document.body.appendChild(iframe0); document.body.appendChild(document.createElement('iframe')); +getSelection().collapse(document.body, 0);
[webkit-changes] [285083] trunk/Source/WebCore
Title: [285083] trunk/Source/WebCore Revision 285083 Author za...@apple.com Date 2021-10-30 12:57:56 -0700 (Sat, 30 Oct 2021) Log Message [LFC][IFC] Add bidi level to InlineDisplay::Box https://bugs.webkit.org/show_bug.cgi?id=232531 Reviewed by Antti Koivisto. InlineItem -> Line::Run -> InlineDisplay::Box. * layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp: (WebCore::Layout::InlineDisplayContentBuilder::build): (WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): (WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes): * layout/formattingContexts/inline/InlineLine.cpp: (WebCore::Layout::Line::appendTextContent): (WebCore::Layout::m_bidiLevel): (WebCore::Layout::Line::Run::Run): (WebCore::Layout::Line::Run::expand): * layout/formattingContexts/inline/InlineLine.h: (WebCore::Layout::Line::Run::bidiLevel const): * layout/formattingContexts/inline/display/InlineDisplayBox.h: (WebCore::InlineDisplay::Box::Box): (WebCore::InlineDisplay::Box::bidiLevel const): * layout/integration/InlineIteratorBoxModernPath.h: (WebCore::InlineIterator::BoxModernPath::bidiLevel const): * layout/integration/LayoutIntegrationPagination.cpp: (WebCore::LayoutIntegration::makeAdjustedContent): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineLine.h trunk/Source/WebCore/layout/formattingContexts/inline/display/InlineDisplayBox.h trunk/Source/WebCore/layout/integration/InlineIteratorBoxModernPath.h trunk/Source/WebCore/layout/integration/LayoutIntegrationPagination.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (285082 => 285083) --- trunk/Source/WebCore/ChangeLog 2021-10-30 17:26:57 UTC (rev 285082) +++ trunk/Source/WebCore/ChangeLog 2021-10-30 19:57:56 UTC (rev 285083) @@ -1,5 +1,33 @@ 2021-10-30 Alan Bujtas +[LFC][IFC] Add bidi level to InlineDisplay::Box +https://bugs.webkit.org/show_bug.cgi?id=232531 + +Reviewed by Antti Koivisto. + +InlineItem -> Line::Run -> InlineDisplay::Box. + +* layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp: +(WebCore::Layout::InlineDisplayContentBuilder::build): +(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineContent): +(WebCore::Layout::InlineDisplayContentBuilder::createBoxesAndUpdateGeometryForLineSpanningInlineBoxes): +* layout/formattingContexts/inline/InlineLine.cpp: +(WebCore::Layout::Line::appendTextContent): +(WebCore::Layout::m_bidiLevel): +(WebCore::Layout::Line::Run::Run): +(WebCore::Layout::Line::Run::expand): +* layout/formattingContexts/inline/InlineLine.h: +(WebCore::Layout::Line::Run::bidiLevel const): +* layout/formattingContexts/inline/display/InlineDisplayBox.h: +(WebCore::InlineDisplay::Box::Box): +(WebCore::InlineDisplay::Box::bidiLevel const): +* layout/integration/InlineIteratorBoxModernPath.h: +(WebCore::InlineIterator::BoxModernPath::bidiLevel const): +* layout/integration/LayoutIntegrationPagination.cpp: +(WebCore::LayoutIntegration::makeAdjustedContent): + +2021-10-30 Alan Bujtas + [LFC][IFC] Add skeleton implementation for bidi content handling https://bugs.webkit.org/show_bug.cgi?id=232524 Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp (285082 => 285083) --- trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp 2021-10-30 17:26:57 UTC (rev 285082) +++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineDisplayContentBuilder.cpp 2021-10-30 19:57:56 UTC (rev 285083) @@ -60,7 +60,7 @@ // Every line starts with a root box, even the empty ones. auto rootInlineBoxRect = lineBox.logicalRectForRootInlineBox(); rootInlineBoxRect.moveBy(lineBoxLogicalTopLeft); -boxes.append({ lineIndex, InlineDisplay::Box::Type::RootInlineBox, root(), rootInlineBoxRect, rootInlineBoxRect, { }, { }, lineBox.rootInlineBox().hasContent() }); +boxes.append({ lineIndex, InlineDisplay::Box::Type::RootInlineBox, root(), UBIDI_DEFAULT_LTR, rootInlineBoxRect, rootInlineBoxRect, { }, { }, lineBox.rootInlineBox().hasContent() }); createBoxesAndUpdateGeometryForLineSpanningInlineBoxes(lineBox, lineBoxLogicalTopLeft, lineIndex, boxes); createBoxesAndUpdateGeometryForLineContent(lineContent, lineBox, lineBoxLogicalTopLeft, lineIndex, boxes); @@ -105,6 +105,7 @@ boxes.append({ lineIndex , InlineDisplay::Box::Type::Text , layoutBox +, lineRun.bidiLevel() , textRunRect , inkOverflow() ,
[webkit-changes] [285082] trunk/Source/WebCore
Title: [285082] trunk/Source/WebCore Revision 285082 Author za...@apple.com Date 2021-10-30 10:26:57 -0700 (Sat, 30 Oct 2021) Log Message [LFC][IFC] Add skeleton implementation for bidi content handling https://bugs.webkit.org/show_bug.cgi?id=232524 Reviewed by Antti Koivisto. Add dedicated functions for inline content types that need separate bidi handling (text vs. inline box vs. atomic etc). * layout/formattingContexts/inline/InlineFormattingContext.cpp: (WebCore::Layout::InlineFormattingContext::collectContentIfNeeded): * layout/formattingContexts/inline/InlineFormattingState.h: (WebCore::Layout::InlineFormattingState::addInlineItems): (WebCore::Layout::InlineFormattingState::addInlineItem): Deleted. * layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::build): (WebCore::Layout::InlineItemsBuilder::collectInlineItems): (WebCore::Layout::InlineItemsBuilder::breakInlineItemsAtBidiBoundaries): (WebCore::Layout::InlineItemsBuilder::handleTextContent): (WebCore::Layout::InlineItemsBuilder::handleInlineBox): (WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox): (WebCore::Layout::InlineItemsBuilder::createAndAppendTextItems): Deleted. * layout/formattingContexts/inline/InlineItemsBuilder.h: (WebCore::Layout::InlineItemsBuilder::root const): (WebCore::Layout::InlineItemsBuilder::formattingState const): Deleted. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.h Diff Modified: trunk/Source/WebCore/ChangeLog (285081 => 285082) --- trunk/Source/WebCore/ChangeLog 2021-10-30 17:09:52 UTC (rev 285081) +++ trunk/Source/WebCore/ChangeLog 2021-10-30 17:26:57 UTC (rev 285082) @@ -1,5 +1,31 @@ 2021-10-30 Alan Bujtas +[LFC][IFC] Add skeleton implementation for bidi content handling +https://bugs.webkit.org/show_bug.cgi?id=232524 + +Reviewed by Antti Koivisto. + +Add dedicated functions for inline content types that need separate bidi handling (text vs. inline box vs. atomic etc). + +* layout/formattingContexts/inline/InlineFormattingContext.cpp: +(WebCore::Layout::InlineFormattingContext::collectContentIfNeeded): +* layout/formattingContexts/inline/InlineFormattingState.h: +(WebCore::Layout::InlineFormattingState::addInlineItems): +(WebCore::Layout::InlineFormattingState::addInlineItem): Deleted. +* layout/formattingContexts/inline/InlineItemsBuilder.cpp: +(WebCore::Layout::InlineItemsBuilder::build): +(WebCore::Layout::InlineItemsBuilder::collectInlineItems): +(WebCore::Layout::InlineItemsBuilder::breakInlineItemsAtBidiBoundaries): +(WebCore::Layout::InlineItemsBuilder::handleTextContent): +(WebCore::Layout::InlineItemsBuilder::handleInlineBox): +(WebCore::Layout::InlineItemsBuilder::handleInlineLevelBox): +(WebCore::Layout::InlineItemsBuilder::createAndAppendTextItems): Deleted. +* layout/formattingContexts/inline/InlineItemsBuilder.h: +(WebCore::Layout::InlineItemsBuilder::root const): +(WebCore::Layout::InlineItemsBuilder::formattingState const): Deleted. + +2021-10-30 Alan Bujtas + [LFC][IFC] InlineItem should not cross bidi level boundary https://bugs.webkit.org/show_bug.cgi?id=232509 Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp (285081 => 285082) --- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2021-10-30 17:09:52 UTC (rev 285081) +++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingContext.cpp 2021-10-30 17:26:57 UTC (rev 285082) @@ -524,7 +524,7 @@ if (!formattingState.inlineItems().isEmpty()) return; auto inlineItemsBuilder = InlineItemsBuilder { root(), formattingState }; -inlineItemsBuilder.build(); +formattingState.addInlineItems(inlineItemsBuilder.build()); } InlineRect InlineFormattingContext::computeGeometryForLineContent(const LineBuilder::LineContent& lineContent) Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h (285081 => 285082) --- trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h 2021-10-30 17:09:52 UTC (rev 285081) +++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineFormattingState.h 2021-10-30 17:26:57 UTC (rev 285082) @@ -51,7 +51,7 @@ InlineItems& inlineItems() { return m_inlineItems; } const InlineItems& inlineItems() const { return m_inlineItems; } -void addInlineItem(InlineItem&& inlineItem) { m_inlineItems.append(WTFMove(inlineItem)); } +void addInlineItems(InlineItems&& inlineItems) {
[webkit-changes] [285081] trunk/Tools
Title: [285081] trunk/Tools Revision 285081 Author gsnedd...@apple.com Date 2021-10-30 10:09:52 -0700 (Sat, 30 Oct 2021) Log Message Ensure we stop LayoutTest servers without them becoming zombies https://bugs.webkit.org/show_bug.cgi?id=225189 Reviewed by Jonathan Bedard. Also increase the polling frequency in HttpServerBase._wait_for_action, as this is a major source of delay when running run-webkit-tests --dry-run due to the number of servers we're starting nowadays. * Scripts/webkitpy/common/system/executive_mock.py: (MockProcess.__init__): Rename self.returncode to _returncode (MockProcess.returncode): returncode should be None if process is still running * Scripts/webkitpy/layout_tests/servers/http_server.py: (Lighttpd._spawn_process): Store Popen object (Lighttpd._check_and_kill): Skip "kill" if process has returned (Lighttpd._is_server_running_on_all_ports): Correctly raise ServerError if it has returned * Scripts/webkitpy/layout_tests/servers/http_server_base.py: (HttpServerBase.start): Change polling frequency for cygwin from 0.1Hz to default (HttpServerBase._wait_for_action): Increase default polling frequency to 10Hz from 1Hz * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: (WebPlatformTestServer._stop_running_server): Poll first so we don't have zombies keeping references to pipes Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server_base.py trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py Diff Modified: trunk/Tools/ChangeLog (285080 => 285081) --- trunk/Tools/ChangeLog 2021-10-30 16:08:17 UTC (rev 285080) +++ trunk/Tools/ChangeLog 2021-10-30 17:09:52 UTC (rev 285081) @@ -1,3 +1,28 @@ +2021-10-30 Sam Sneddon + +Ensure we stop LayoutTest servers without them becoming zombies +https://bugs.webkit.org/show_bug.cgi?id=225189 + + +Reviewed by Jonathan Bedard. + +Also increase the polling frequency in HttpServerBase._wait_for_action, as this is a major +source of delay when running run-webkit-tests --dry-run due to the number of servers we're +starting nowadays. + +* Scripts/webkitpy/common/system/executive_mock.py: +(MockProcess.__init__): Rename self.returncode to _returncode +(MockProcess.returncode): returncode should be None if process is still running +* Scripts/webkitpy/layout_tests/servers/http_server.py: +(Lighttpd._spawn_process): Store Popen object +(Lighttpd._check_and_kill): Skip "kill" if process has returned +(Lighttpd._is_server_running_on_all_ports): Correctly raise ServerError if it has returned +* Scripts/webkitpy/layout_tests/servers/http_server_base.py: +(HttpServerBase.start): Change polling frequency for cygwin from 0.1Hz to default +(HttpServerBase._wait_for_action): Increase default polling frequency to 10Hz from 1Hz +* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: +(WebPlatformTestServer._stop_running_server): Poll first so we don't have zombies keeping references to pipes + 2021-10-30 Kate Cheney [iOS 15] Loads after WKWebView session restore are marked as app-initiated Modified: trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py (285080 => 285081) --- trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py 2021-10-30 16:08:17 UTC (rev 285080) +++ trunk/Tools/Scripts/webkitpy/common/system/executive_mock.py 2021-10-30 17:09:52 UTC (rev 285081) @@ -42,9 +42,15 @@ self.stdout = BytesIO(string_utils.encode(stdout)) self.stderr = BytesIO(string_utils.encode(stderr)) self.stdin = BytesIO() -self.returncode = returncode +self._returncode = returncode self._is_running = False +@property +def returncode(self): +if self._is_running: +return None +return self._returncode + def wait(self): self._is_running = False return self.returncode Modified: trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py (285080 => 285081) --- trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py 2021-10-30 16:08:17 UTC (rev 285080) +++ trunk/Tools/Scripts/webkitpy/layout_tests/servers/http_server.py 2021-10-30 17:09:52 UTC (rev 285081) @@ -199,8 +199,8 @@ def _spawn_process(self): _log.debug('Starting %s server, cmd="%s"' % (self._name, self._start_cmd)) -process = self._executive.popen(self._start_cmd, env=self._env, shell=False, stderr=self._executive.PIPE) -pid = process.pid +self._process = self._executive.popen(self._start_cmd, env=self._env, shell=False, stderr=self._executive.PIPE) +pid = self._process.pid self._filesystem.write_text_file(self._pid_file,
[webkit-changes] [285080] trunk
Title: [285080] trunk Revision 285080 Author katherine_che...@apple.com Date 2021-10-30 09:08:17 -0700 (Sat, 30 Oct 2021) Log Message [iOS 15] Loads after WKWebView session restore are marked as app-initiated https://bugs.webkit.org/show_bug.cgi?id=232486 Reviewed by Brent Fulgham. Source/WebKit: Return app initiated value in the page's SessionState so it can be restored by third party apps using the [WKWebView setInteractionState] API. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::sessionState const): * UIProcess/mac/LegacySessionStateCoding.cpp: (WebKit::encodeLegacySessionState): (WebKit::decodeLegacySessionState): Tools: * TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm: Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/WebPageProxy.cpp trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp trunk/Tools/ChangeLog trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/AppPrivacyReport.mm Diff Modified: trunk/Source/WebKit/ChangeLog (285079 => 285080) --- trunk/Source/WebKit/ChangeLog 2021-10-30 13:44:39 UTC (rev 285079) +++ trunk/Source/WebKit/ChangeLog 2021-10-30 16:08:17 UTC (rev 285080) @@ -1,3 +1,20 @@ +2021-10-30 Kate Cheney + +[iOS 15] Loads after WKWebView session restore are marked as app-initiated +https://bugs.webkit.org/show_bug.cgi?id=232486 + + +Reviewed by Brent Fulgham. + +Return app initiated value in the page's SessionState so it can be restored +by third party apps using the [WKWebView setInteractionState] API. + +* UIProcess/WebPageProxy.cpp: +(WebKit::WebPageProxy::sessionState const): +* UIProcess/mac/LegacySessionStateCoding.cpp: +(WebKit::encodeLegacySessionState): +(WebKit::decodeLegacySessionState): + 2021-10-29 Lauro Moura [GLIB][SOUP] Unify memoryPressureMonitorDisabled implementation Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (285079 => 285080) --- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-10-30 13:44:39 UTC (rev 285079) +++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-10-30 16:08:17 UTC (rev 285080) @@ -3773,6 +3773,7 @@ sessionState.provisionalURL = URL(URL(), provisionalURLString); sessionState.renderTreeSize = renderTreeSize(); +sessionState.isAppInitiated = m_lastNavigationWasAppInitiated; return sessionState; } Modified: trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp (285079 => 285080) --- trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp 2021-10-30 13:44:39 UTC (rev 285079) +++ trunk/Source/WebKit/UIProcess/mac/LegacySessionStateCoding.cpp 2021-10-30 16:08:17 UTC (rev 285080) @@ -41,6 +41,7 @@ static const CFStringRef sessionHistoryKey = CFSTR("SessionHistory"); static const CFStringRef provisionalURLKey = CFSTR("ProvisionalURL"); static const CFStringRef renderTreeSizeKey = CFSTR("RenderTreeSize"); +static const CFStringRef isAppInitiatedKey = CFSTR("IsAppInitiated"); // Session history keys. static const uint32_t sessionHistoryVersion = 1; @@ -481,6 +482,7 @@ auto sessionHistoryDictionary = encodeSessionHistory(sessionState.backForwardListState); auto provisionalURLString = sessionState.provisionalURL.isNull() ? nullptr : sessionState.provisionalURL.string().createCFString(); RetainPtr renderTreeSizeNumber(adoptCF(CFNumberCreate(kCFAllocatorDefault, kCFNumberSInt64Type, ))); +RetainPtr isAppInitiated = adoptCF(sessionState.isAppInitiated ? kCFBooleanTrue : kCFBooleanFalse); RetainPtr stateDictionary; if (provisionalURLString) { @@ -487,12 +489,14 @@ stateDictionary = createDictionary({ { sessionHistoryKey, sessionHistoryDictionary.get() }, { provisionalURLKey, provisionalURLString.get() }, -{ renderTreeSizeKey, renderTreeSizeNumber.get() } +{ renderTreeSizeKey, renderTreeSizeNumber.get() }, +{ isAppInitiatedKey, isAppInitiated.get() } }); } else { stateDictionary = createDictionary({ { sessionHistoryKey, sessionHistoryDictionary.get() }, -{ renderTreeSizeKey, renderTreeSizeNumber.get() } +{ renderTreeSizeKey, renderTreeSizeNumber.get() }, +{ isAppInitiatedKey, isAppInitiated.get() } }); } @@ -1152,6 +1156,11 @@ else sessionState.renderTreeSize = 0; +if (auto isAppInitiated = dynamic_cf_cast(CFDictionaryGetValue(sessionStateDictionary, isAppInitiatedKey))) +sessionState.isAppInitiated = isAppInitiated == kCFBooleanTrue; +else +sessionState.isAppInitiated = true; + return true; } Modified: trunk/Tools/ChangeLog (285079 => 285080) --- trunk/Tools/ChangeLog 2021-10-30 13:44:39 UTC (rev 285079) +++ trunk/Tools/ChangeLog 2021-10-30 16:08:17 UTC (rev 285080) @@ -1,3 +1,13 @@ +2021-10-30 Kate Cheney + +[iOS 15] Loads after WKWebView session restore are marked as
[webkit-changes] [285079] trunk/Source/WebCore
Title: [285079] trunk/Source/WebCore Revision 285079 Author za...@apple.com Date 2021-10-30 06:44:39 -0700 (Sat, 30 Oct 2021) Log Message [LFC][IFC] InlineItem should not cross bidi level boundary https://bugs.webkit.org/show_bug.cgi?id=232509 Reviewed by Antti Koivisto. Every inline item has a bidi level even when the content is not considered strictly as bidi (i.e. we don't call into ubidi to figure level information). * layout/formattingContexts/inline/InlineItem.h: (WebCore::Layout::InlineItem::bidiLevel const): (WebCore::Layout::InlineItem::InlineItem): * layout/formattingContexts/inline/InlineItemsBuilder.cpp: (WebCore::Layout::InlineItemsBuilder::createAndAppendTextItems): * layout/formattingContexts/inline/InlineSoftLineBreakItem.h: (WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem): (WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem): * layout/formattingContexts/inline/InlineTextItem.cpp: (WebCore::Layout::InlineTextItem::InlineTextItem): (WebCore::Layout::InlineTextItem::left const): (WebCore::Layout::InlineTextItem::right const): * layout/formattingContexts/inline/InlineTextItem.h: (WebCore::Layout::InlineTextItem::createWhitespaceItem): (WebCore::Layout::InlineTextItem::createNonWhitespaceItem): (WebCore::Layout::InlineTextItem::createEmptyItem): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/layout/formattingContexts/inline/InlineItem.h trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineSoftLineBreakItem.h trunk/Source/WebCore/layout/formattingContexts/inline/InlineTextItem.cpp trunk/Source/WebCore/layout/formattingContexts/inline/InlineTextItem.h Diff Modified: trunk/Source/WebCore/ChangeLog (285078 => 285079) --- trunk/Source/WebCore/ChangeLog 2021-10-30 06:48:10 UTC (rev 285078) +++ trunk/Source/WebCore/ChangeLog 2021-10-30 13:44:39 UTC (rev 285079) @@ -1,3 +1,29 @@ +2021-10-30 Alan Bujtas + +[LFC][IFC] InlineItem should not cross bidi level boundary +https://bugs.webkit.org/show_bug.cgi?id=232509 + +Reviewed by Antti Koivisto. + +Every inline item has a bidi level even when the content is not considered strictly as bidi (i.e. we don't call into ubidi to figure level information). + +* layout/formattingContexts/inline/InlineItem.h: +(WebCore::Layout::InlineItem::bidiLevel const): +(WebCore::Layout::InlineItem::InlineItem): +* layout/formattingContexts/inline/InlineItemsBuilder.cpp: +(WebCore::Layout::InlineItemsBuilder::createAndAppendTextItems): +* layout/formattingContexts/inline/InlineSoftLineBreakItem.h: +(WebCore::Layout::InlineSoftLineBreakItem::createSoftLineBreakItem): +(WebCore::Layout::InlineSoftLineBreakItem::InlineSoftLineBreakItem): +* layout/formattingContexts/inline/InlineTextItem.cpp: +(WebCore::Layout::InlineTextItem::InlineTextItem): +(WebCore::Layout::InlineTextItem::left const): +(WebCore::Layout::InlineTextItem::right const): +* layout/formattingContexts/inline/InlineTextItem.h: +(WebCore::Layout::InlineTextItem::createWhitespaceItem): +(WebCore::Layout::InlineTextItem::createNonWhitespaceItem): +(WebCore::Layout::InlineTextItem::createEmptyItem): + 2021-10-29 Alan Bujtas [LFC][IFC] Move InlineTextItem construction to InlineItemsBuilder Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItem.h (285078 => 285079) --- trunk/Source/WebCore/layout/formattingContexts/inline/InlineItem.h 2021-10-30 06:48:10 UTC (rev 285078) +++ trunk/Source/WebCore/layout/formattingContexts/inline/InlineItem.h 2021-10-30 13:44:39 UTC (rev 285079) @@ -29,6 +29,7 @@ #include "LayoutBox.h" #include "LayoutUnits.h" +#include namespace WebCore { namespace Layout { @@ -45,9 +46,10 @@ InlineBoxEnd, Float }; -InlineItem(const Box& layoutBox, Type); +InlineItem(const Box& layoutBox, Type, UBiDiLevel = UBIDI_DEFAULT_LTR); Type type() const { return m_type; } +UBiDiLevel bidiLevel() const { return m_bidiLevel; } const Box& layoutBox() const { return *m_layoutBox; } const RenderStyle& style() const { return layoutBox().style(); } const RenderStyle& firstLineStyle() const { return layoutBox().firstLineStyle(); } @@ -65,6 +67,7 @@ private: const Box* m_layoutBox { nullptr }; Type m_type { }; +UBiDiLevel m_bidiLevel { UBIDI_DEFAULT_LTR }; protected: // For InlineTextItem @@ -80,9 +83,10 @@ unsigned m_startOrPosition { 0 }; }; -inline InlineItem::InlineItem(const Box& layoutBox, Type type) +inline InlineItem::InlineItem(const Box& layoutBox, Type type, UBiDiLevel bidiLevel) : m_layoutBox() , m_type(type) +, m_bidiLevel(bidiLevel) { } Modified: trunk/Source/WebCore/layout/formattingContexts/inline/InlineItemsBuilder.cpp (285078 => 285079)
[webkit-changes] [285078] trunk/Source/JavaScriptCore
Title: [285078] trunk/Source/_javascript_Core Revision 285078 Author ysuz...@apple.com Date 2021-10-29 23:48:10 -0700 (Fri, 29 Oct 2021) Log Message [JSC] Having StructureStubInfo and CallLinkInfo via FixedVector for Baseline JIT https://bugs.webkit.org/show_bug.cgi?id=232521 Reviewed by Saam Barati. We know # of StructureStubInfo and # of CallLinkInfo after compiling Baseline JIT code. So when installing a code into CodeBlock, we do not need to use Bag<>. Instead we can just use FixedVector to allocate these instances. We keep FixedVector and FixedVector in JITData for Baseline JIT. And moving Bag and Bag to DFG::CommonData when they are instantiated for DFG / FTL codes. * bytecode/CallLinkInfo.cpp: (JSC::CallLinkInfo::CallLinkInfo): Deleted. * bytecode/CallLinkInfo.h: (JSC::CallLinkInfo::CallLinkInfo): * bytecode/CodeBlock.cpp: (JSC::CodeBlock::setupWithUnlinkedBaselineCode): (JSC::CodeBlock::~CodeBlock): (JSC::CodeBlock::propagateTransitions): (JSC::CodeBlock::finalizeJITInlineCaches): (JSC::CodeBlock::getICStatusMap): (JSC::CodeBlock::findStubInfo): (JSC::CodeBlock::getCallLinkInfoForBytecodeIndex): (JSC::CodeBlock::resetJITData): (JSC::CodeBlock::stronglyVisitStrongReferences): (JSC::CodeBlock::jettison): (JSC::CodeBlock::findPC): (JSC::CodeBlock::addOptimizingStubInfo): Deleted. (JSC::CodeBlock::addCallLinkInfo): Deleted. * bytecode/CodeBlock.h: * bytecode/StructureStubInfo.cpp: (JSC::StructureStubInfo::StructureStubInfo): Deleted. * bytecode/StructureStubInfo.h: (JSC::StructureStubInfo::StructureStubInfo): * dfg/DFGCommonData.h: (JSC::DFG::CommonData::addCallLinkInfo): * dfg/DFGSpeculativeJIT.cpp: (JSC::DFG::SpeculativeJIT::compileDeleteById): (JSC::DFG::SpeculativeJIT::compileDeleteByVal): (JSC::DFG::SpeculativeJIT::compileInById): (JSC::DFG::SpeculativeJIT::compileInByVal): (JSC::DFG::SpeculativeJIT::compileHasPrivate): (JSC::DFG::SpeculativeJIT::compileGetPrivateNameByVal): (JSC::DFG::SpeculativeJIT::compilePutPrivateName): (JSC::DFG::SpeculativeJIT::compileCheckPrivateBrand): (JSC::DFG::SpeculativeJIT::compileSetPrivateBrand): (JSC::DFG::SpeculativeJIT::compileInstanceOfForCells): (JSC::DFG::SpeculativeJIT::cachedPutById): * dfg/DFGSpeculativeJIT32_64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): (JSC::DFG::SpeculativeJIT::emitCall): (JSC::DFG::SpeculativeJIT::compileGetByVal): (JSC::DFG::SpeculativeJIT::compile): * dfg/DFGSpeculativeJIT64.cpp: (JSC::DFG::SpeculativeJIT::cachedGetById): (JSC::DFG::SpeculativeJIT::cachedGetByIdWithThis): (JSC::DFG::SpeculativeJIT::emitCall): (JSC::DFG::SpeculativeJIT::compileGetByVal): (JSC::DFG::SpeculativeJIT::compile): * ftl/FTLLowerDFGToB3.cpp: (JSC::FTL::DFG::LowerDFGToB3::getPrivateName): (JSC::FTL::DFG::LowerDFGToB3::compilePrivateBrandAccess): (JSC::FTL::DFG::LowerDFGToB3::compilePutPrivateName): (JSC::FTL::DFG::LowerDFGToB3::cachedPutById): (JSC::FTL::DFG::LowerDFGToB3::compileGetByValImpl): (JSC::FTL::DFG::LowerDFGToB3::compilePutByVal): (JSC::FTL::DFG::LowerDFGToB3::compileDelBy): (JSC::FTL::DFG::LowerDFGToB3::compileCompareStrictEq): * jit/BaselineJITCode.h: * jit/JIT.cpp: (JSC::JIT::addUnlinkedCallLinkInfo): (JSC::JIT::link): * jit/JIT.h: * jit/JITCall.cpp: (JSC::JIT::compileOpCall): (JSC::JIT::emit_op_iterator_open): (JSC::JIT::emit_op_iterator_next): * jit/JITInlineCacheGenerator.cpp: (JSC::JITInlineCacheGenerator::JITInlineCacheGenerator): (JSC::JITByIdGenerator::JITByIdGenerator): (JSC::JITGetByIdGenerator::JITGetByIdGenerator): (JSC::JITGetByIdWithThisGenerator::JITGetByIdWithThisGenerator): (JSC::JITPutByIdGenerator::JITPutByIdGenerator): (JSC::JITDelByValGenerator::JITDelByValGenerator): (JSC::JITDelByIdGenerator::JITDelByIdGenerator): (JSC::JITInByValGenerator::JITInByValGenerator): (JSC::JITInByIdGenerator::JITInByIdGenerator): (JSC::JITInstanceOfGenerator::JITInstanceOfGenerator): (JSC::JITGetByValGenerator::JITGetByValGenerator): (JSC::JITPutByValGenerator::JITPutByValGenerator): (JSC::JITPrivateBrandAccessGenerator::JITPrivateBrandAccessGenerator): * jit/JITInlineCacheGenerator.h: * jit/JITOpcodes.cpp: (JSC::JIT::emit_op_instanceof): * jit/JITOpcodes32_64.cpp: (JSC::JIT::emit_op_instanceof): * jit/JITPropertyAccess.cpp: (JSC::JIT::emit_op_get_by_val): (JSC::JIT::emit_op_get_private_name): (JSC::JIT::emit_op_set_private_brand): (JSC::JIT::emit_op_check_private_brand): (JSC::JIT::emit_op_put_by_val): (JSC::JIT::emit_op_put_private_name): (JSC::JIT::emit_op_del_by_id): (JSC::JIT::emit_op_del_by_val): (JSC::JIT::emit_op_try_get_by_id): (JSC::JIT::emit_op_get_by_id_direct): (JSC::JIT::emit_op_get_by_id): (JSC::JIT::emit_op_get_by_id_with_this): (JSC::JIT::emit_op_put_by_id): (JSC::JIT::emit_op_in_by_id): (JSC::JIT::emit_op_in_by_val): (JSC::JIT::emitHasPrivate): (JSC::JIT::emit_op_enumerator_get_by_val): Modified Paths trunk/Source/_javascript_Core/ChangeLog trunk/Source/_javascript_Core/bytecode/CallLinkInfo.cpp trunk/Source/_javascript_Core/bytecode/CallLinkInfo.h
[webkit-changes] [285077] trunk/Source/WebKit
Title: [285077] trunk/Source/WebKit Revision 285077 Author lmo...@igalia.com Date 2021-10-29 23:28:57 -0700 (Fri, 29 Oct 2021) Log Message [GLIB][SOUP] Unify memoryPressureMonitorDisabled implementation https://bugs.webkit.org/show_bug.cgi?id=232519 Reviewed by Carlos Garcia Campos. Covered by existing tests. Follow up the fix of r285062, to avoid having two copies of the same function around. * UIProcess/glib/WebProcessPoolGLib.cpp: (WebKit::WebProcessPool::platformInitialize): (WebKit::WebProcessPool::platformInitializeWebProcess): (WebKit::memoryPressureMonitorDisabled): Deleted. * UIProcess/linux/MemoryPressureMonitor.cpp: (WebKit::MemoryPressureMonitor::disabled): * UIProcess/linux/MemoryPressureMonitor.h: * UIProcess/soup/WebProcessPoolSoup.cpp: (WebKit::WebProcessPool::platformInitializeNetworkProcess): (WebKit::memoryPressureMonitorDisabledSoup): Deleted. Modified Paths trunk/Source/WebKit/ChangeLog trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.h trunk/Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp Diff Modified: trunk/Source/WebKit/ChangeLog (285076 => 285077) --- trunk/Source/WebKit/ChangeLog 2021-10-30 05:25:59 UTC (rev 285076) +++ trunk/Source/WebKit/ChangeLog 2021-10-30 06:28:57 UTC (rev 285077) @@ -1,3 +1,26 @@ +2021-10-29 Lauro Moura + +[GLIB][SOUP] Unify memoryPressureMonitorDisabled implementation +https://bugs.webkit.org/show_bug.cgi?id=232519 + +Reviewed by Carlos Garcia Campos. + +Covered by existing tests. + +Follow up the fix of r285062, to avoid having two copies of +the same function around. + +* UIProcess/glib/WebProcessPoolGLib.cpp: +(WebKit::WebProcessPool::platformInitialize): +(WebKit::WebProcessPool::platformInitializeWebProcess): +(WebKit::memoryPressureMonitorDisabled): Deleted. +* UIProcess/linux/MemoryPressureMonitor.cpp: +(WebKit::MemoryPressureMonitor::disabled): +* UIProcess/linux/MemoryPressureMonitor.h: +* UIProcess/soup/WebProcessPoolSoup.cpp: +(WebKit::WebProcessPool::platformInitializeNetworkProcess): +(WebKit::memoryPressureMonitorDisabledSoup): Deleted. + 2021-10-29 Tim Horton Add release logging of display list size to CGDisplayListImageBufferBackend Modified: trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp (285076 => 285077) --- trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp 2021-10-30 05:25:59 UTC (rev 285076) +++ trunk/Source/WebKit/UIProcess/glib/WebProcessPoolGLib.cpp 2021-10-30 06:28:57 UTC (rev 285077) @@ -29,6 +29,7 @@ #include "WebProcessPool.h" #include "LegacyGlobalSettings.h" +#include "MemoryPressureMonitor.h" #include "WebMemoryPressureHandler.h" #include "WebProcessCreationParameters.h" #include @@ -52,12 +53,6 @@ namespace WebKit { -static bool memoryPressureMonitorDisabled() -{ -static const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); -return disableMemoryPressureMonitor && !strcmp(disableMemoryPressureMonitor, "1"); -} - void WebProcessPool::platformInitialize() { #if PLATFORM(GTK) @@ -66,7 +61,7 @@ if (const char* forceComplexText = getenv("WEBKIT_FORCE_COMPLEX_TEXT")) m_alwaysUsesComplexTextCodePath = !strcmp(forceComplexText, "1"); -if (!memoryPressureMonitorDisabled()) +if (!MemoryPressureMonitor::disabled()) installMemoryPressureHandler(); } @@ -97,7 +92,7 @@ parameters.memoryCacheDisabled = m_memoryCacheDisabled || LegacyGlobalSettings::singleton().cacheModel() == CacheModel::DocumentViewer; -if (memoryPressureMonitorDisabled()) +if (MemoryPressureMonitor::disabled()) parameters.shouldSuppressMemoryPressureHandler = true; #if USE(GSTREAMER) Modified: trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp (285076 => 285077) --- trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp 2021-10-30 05:25:59 UTC (rev 285076) +++ trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.cpp 2021-10-30 06:28:57 UTC (rev 285077) @@ -29,6 +29,7 @@ #if OS(LINUX) #include "WebProcessPool.h" +#include #include #include #include @@ -389,6 +390,18 @@ })->detach(); } +bool MemoryPressureMonitor::s_disabled = false; + +bool MemoryPressureMonitor::disabled() +{ +static std::once_flag flag; +std::call_once(flag, []() { +auto envvar = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR"); +s_disabled = envvar && !strcmp(envvar, "1"); +}); +return s_disabled; +} + void CGroupMemoryController::setMemoryControllerPath(CString memoryControllerPath) { if (memoryControllerPath == m_cgroupMemoryControllerPath) Modified: trunk/Source/WebKit/UIProcess/linux/MemoryPressureMonitor.h (285076 => 285077) ---