mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Stop implementing Copy for JS<T>.
A copy of a JS<T> doesn't have the rooting properties of the original, so it makes no sense for it to implement Copy.
This commit is contained in:
parent
9d5f09e09c
commit
88a1cbb28b
7 changed files with 47 additions and 35 deletions
|
@ -12,7 +12,7 @@ use dom::bindings::codegen::InheritTypes::{EventCast, EventTargetCast, NodeCast}
|
|||
use dom::bindings::codegen::UnionTypes::ImageDataOrHTMLImageElementOrHTMLCanvasElementOrHTMLVideoElement;
|
||||
use dom::bindings::conversions::ToJSValConvertible;
|
||||
use dom::bindings::global::{GlobalField, GlobalRef};
|
||||
use dom::bindings::js::{JS, LayoutJS, Root};
|
||||
use dom::bindings::js::{JS, LayoutJS, MutNullableHeap, Root};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::event::{EventBubbles, EventCancelable};
|
||||
use dom::htmlcanvaselement::HTMLCanvasElement;
|
||||
|
@ -78,8 +78,8 @@ pub struct WebGLRenderingContext {
|
|||
canvas: JS<HTMLCanvasElement>,
|
||||
last_error: Cell<Option<WebGLError>>,
|
||||
texture_unpacking_settings: Cell<TextureUnpacking>,
|
||||
bound_texture_2d: Cell<Option<JS<WebGLTexture>>>,
|
||||
bound_texture_cube_map: Cell<Option<JS<WebGLTexture>>>,
|
||||
bound_texture_2d: MutNullableHeap<JS<WebGLTexture>>,
|
||||
bound_texture_cube_map: MutNullableHeap<JS<WebGLTexture>>,
|
||||
}
|
||||
|
||||
impl WebGLRenderingContext {
|
||||
|
@ -104,8 +104,8 @@ impl WebGLRenderingContext {
|
|||
canvas: JS::from_ref(canvas),
|
||||
last_error: Cell::new(None),
|
||||
texture_unpacking_settings: Cell::new(CONVERT_COLORSPACE),
|
||||
bound_texture_2d: Cell::new(None),
|
||||
bound_texture_cube_map: Cell::new(None),
|
||||
bound_texture_2d: MutNullableHeap::new(None),
|
||||
bound_texture_cube_map: MutNullableHeap::new(None),
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue