Auto merge of #25998 - jdm:vao-drop, r=nox

Avoid a panic when closing webgl pages using VAOs

- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25891
- [x] These changes do not require tests because GC behaviour at shutdown is nondeterministic and difficult to test
This commit is contained in:
bors-servo 2020-03-27 09:55:12 -04:00 committed by GitHub
commit a927f1ad8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 12 deletions

View file

@ -164,7 +164,7 @@ impl WebGLBuffer {
);
}
pub fn decrement_attached_counter(&self) {
pub fn decrement_attached_counter(&self, fallible: bool) {
self.attached_counter.set(
self.attached_counter
.get()
@ -172,7 +172,7 @@ impl WebGLBuffer {
.expect("refcount underflowed"),
);
if self.is_deleted() {
self.delete(false);
self.delete(fallible);
}
}