diff --git a/components/canvas/webgl_thread.rs b/components/canvas/webgl_thread.rs index 7447b4c6b55..bee847021f4 100644 --- a/components/canvas/webgl_thread.rs +++ b/components/canvas/webgl_thread.rs @@ -382,6 +382,10 @@ impl WebGLThread { self.webrender_api.update_resources(txn.resource_updates) } + // We need to make the context current so its resources can be disposed of. + let _ = + Self::make_current_if_needed(context_id, &self.contexts, &mut self.bound_context_id); + // Release GL context. self.contexts.remove(&context_id); diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index df20041a903..7c34c6dd8b1 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -10604,6 +10604,16 @@ {} ] ], + "mozilla/webgl/clearcolor_blue.html": [ + [ + {} + ] + ], + "mozilla/webgl/clearcolor_green.html": [ + [ + {} + ] + ], "mozilla/webgl/clearcolor_ref.html": [ [ {} @@ -20092,6 +20102,14 @@ "4760f382f0374985a334a5f6d0e0fe055670c61d", "reftest" ], + "mozilla/webgl/clearcolor_blue.html": [ + "d534babb2a664b7cb861f1cc253020e319f281e9", + "support" + ], + "mozilla/webgl/clearcolor_green.html": [ + "db11b31ab9839777d9d74cf7f2c46de00349c76e", + "support" + ], "mozilla/webgl/clearcolor_ref.html": [ "49cce2cc9009057742cb17e3fd452a986bd6c177", "support" @@ -20116,6 +20134,10 @@ "691535db4766536d66769408212cb13f3f64bef6", "testharness" ], + "mozilla/webgl/history.html": [ + "d470c229fbcca5a47d3370e8e58bae34882be491", + "testharness" + ], "mozilla/webgl/img/rust-logo-256x256.png": [ "63506dd85efce44f8433942a6f4e54d718a97046", "support" diff --git a/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_blue.html b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_blue.html new file mode 100644 index 00000000000..d534babb2a6 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_blue.html @@ -0,0 +1,33 @@ + + + + + WebGL ClearColor Test + + + + + + + + + diff --git a/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_green.html b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_green.html new file mode 100644 index 00000000000..db11b31ab98 --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/webgl/clearcolor_green.html @@ -0,0 +1,33 @@ + + + + + WebGL ClearColor Test + + + + + + + + + diff --git a/tests/wpt/mozilla/tests/mozilla/webgl/history.html b/tests/wpt/mozilla/tests/mozilla/webgl/history.html new file mode 100644 index 00000000000..d470c229fbc --- /dev/null +++ b/tests/wpt/mozilla/tests/mozilla/webgl/history.html @@ -0,0 +1,42 @@ + + +Traversing history with webgl content does not panic + + + +