Make get() and set() on MutNullableHeap use the correct types.

get() must always return a rooted value, because we have no way of
ensuring the value won't be invalidated. set() takes an &T because it's
convenient; there isn't any need to expose JS<T>.
This commit is contained in:
Eli Friedman 2015-10-14 17:48:28 -07:00
parent 7a08b29201
commit 57584e74c6
11 changed files with 68 additions and 67 deletions

View file

@ -360,7 +360,7 @@ impl WebGLRenderingContextMethods for WebGLRenderingContext {
if let Some(texture) = texture {
match texture.bind(target) {
Ok(_) => slot.set(Some(JS::from_ref(texture))),
Ok(_) => slot.set(Some(texture)),
Err(err) => return self.webgl_error(err),
}
} else {