tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit f76aa0dcee3eb0125f34425c7795931fe4dc71c4
parent 03756741ebaeb36695b1470f6c8923ed56c55eb8
Author: Mukilan Thiyagarajan <mukilan@igalia.com>
Date:   Mon,  8 Dec 2025 12:29:32 +0000

Bug 2004568 [wpt PR 56545] - webgl: Unconditionally decrement busy count of WebGL contexts., a=testonly

Automatic update from web-platform-tests
webgl: Unconditionally decrement busy count of WebGL contexts.

The current logic returns early without decrementing the busy count if
there are the swap chain doesn't have a front surface. This happens if
the context was created but never used for rendering, as seen in the
linked issue. Since the count is always incremented when locking, this
causes the count to never reach zero, causing the cleanup logic in
`remove_webgl_context` to skip freeing the context and associated
resources.

Fixes #41082.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

--

wpt-commits: 4051cb57bfa1e82b370e52bab6dd2e5b7b8f8554
wpt-pr: 56545

Diffstat:
Atesting/web-platform/tests/webgl/basic-unused-context-crash.html | 12++++++++++++
1 file changed, 12 insertions(+), 0 deletions(-)

diff --git a/testing/web-platform/tests/webgl/basic-unused-context-crash.html b/testing/web-platform/tests/webgl/basic-unused-context-crash.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<title>WebGL context that is created but not used should not cause a crash</title> +<link rel="author" title="Frédéric Wang" href="mailto:fwang@igalia.com"> +<link rel="author" title="Mukilan Thiyagarajan" href="mailto:mukilan@igalia.com" /> +<link rel="issue" href="https://github.com/servo/servo/issues/41082" /> + +<p>Test passes if it doesn't crash.</p> + +<canvas id="canvas"></canvas> +<script> + canvas.getContext("webgl"); +</script>