Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 61fa4ec7e27b1e704bd40a3e068f4f1206f007a5
https://github.com/WebKit/WebKit/commit/61fa4ec7e27b1e704bd40a3e068f4f1206f007a5
Author: Cameron McCormack <[email protected]>
Date: 2026-10-10 (Sat, 10 Oct 2026)
Changed paths:
M LayoutTests/inspector/canvas/create-context-2d-expected.txt
M LayoutTests/inspector/canvas/create-context-2d.html
M LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt
M LayoutTests/inspector/canvas/create-context-bitmaprenderer.html
M LayoutTests/inspector/canvas/create-context-webgl-expected.txt
M LayoutTests/inspector/canvas/create-context-webgl2-expected.txt
M LayoutTests/inspector/canvas/resources/create-context-utilities.js
M LayoutTests/platform/mac-wk2/TestExpectations
M LayoutTests/platform/mac/TestExpectations
Log Message:
-----------
Fix flaky inspector/canvas/create-context-* tests caused by conservative GC
keeping a canvas alive
https://bugs.webkit.org/show_bug.cgi?id=178028
rdar://188664511
Reviewed by Alexey Proskuryakov.
A stale stack pointer can keep any one canvas alive indefinitely, so
create many canvases and wait for any of them to be destroyed, which
decreases the chance of the test failing since it's unlikely that all
canvases will be inadvertently retained by the conservative stack
scanning. This is the approach recommended in bug 211595.
(The opportunistic task scheduler runs an eden GC from a run-loop exit
observer while the canvas is still in the document, and that GC leaves
the address of the canvas's JS wrapper (or its context's) in stack
memory the next __CFRunLoopRun frame reuses without overwriting it.
JSC's conservative stack scan then finds that stale address on every
later GC, so the removed canvas is never collected and canvasRemoved
never arrives.)
* LayoutTests/inspector/canvas/create-context-2d-expected.txt:
* LayoutTests/inspector/canvas/create-context-2d.html:
* LayoutTests/inspector/canvas/create-context-bitmaprenderer-expected.txt:
* LayoutTests/inspector/canvas/create-context-bitmaprenderer.html:
* LayoutTests/inspector/canvas/create-context-webgl-expected.txt:
* LayoutTests/inspector/canvas/create-context-webgl2-expected.txt:
* LayoutTests/inspector/canvas/resources/create-context-utilities.js:
* LayoutTests/platform/mac-wk2/TestExpectations:
* LayoutTests/platform/mac/TestExpectations:
Canonical link: https://commits.webkit.org/323304@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications