Auto merge of #21959 - servo:webgl, r=jdm

Fix a couple of Drop implementations for WebGL objects

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/21959)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2018-10-16 08:16:28 -04:00 committed by GitHub
commit a77ad4288c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -161,6 +161,5 @@ impl WebGLBuffer {
impl Drop for WebGLBuffer {
fn drop(&mut self) {
self.mark_for_deletion();
assert!(self.is_deleted());
}
}

View file

@ -163,3 +163,9 @@ impl WebGLRenderbuffer {
Ok(())
}
}
impl Drop for WebGLRenderbuffer {
fn drop(&mut self) {
self.delete();
}
}