mirror of
https://github.com/servo/servo.git
synced 2025-07-24 15:50:21 +01:00
Rename Root<T> to DomRoot<T>
In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
This commit is contained in:
parent
577370746e
commit
f87c2a8d76
291 changed files with 1774 additions and 1770 deletions
|
@ -6,7 +6,7 @@ use canvas_traits::webgl::{webgl_channel, WebGLCommand, WebGLError};
|
|||
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::{self, OESVertexArrayObjectMethods};
|
||||
use dom::bindings::codegen::Bindings::OESVertexArrayObjectBinding::OESVertexArrayObjectConstants;
|
||||
use dom::bindings::reflector::{DomObject, Reflector, reflect_dom_object};
|
||||
use dom::bindings::root::{Dom, MutNullableDom, Root};
|
||||
use dom::bindings::root::{Dom, DomRoot, MutNullableDom};
|
||||
use dom::webglrenderingcontext::WebGLRenderingContext;
|
||||
use dom::webglvertexarrayobjectoes::WebGLVertexArrayObjectOES;
|
||||
use dom_struct::dom_struct;
|
||||
|
@ -46,7 +46,7 @@ impl OESVertexArrayObject {
|
|||
|
||||
impl OESVertexArrayObjectMethods for OESVertexArrayObject {
|
||||
// https://www.khronos.org/registry/webgl/extensions/OES_vertex_array_object/
|
||||
fn CreateVertexArrayOES(&self) -> Option<Root<WebGLVertexArrayObjectOES>> {
|
||||
fn CreateVertexArrayOES(&self) -> Option<DomRoot<WebGLVertexArrayObjectOES>> {
|
||||
let (sender, receiver) = webgl_channel().unwrap();
|
||||
self.ctx.send_command(WebGLCommand::CreateVertexArray(sender));
|
||||
|
||||
|
@ -132,7 +132,7 @@ impl OESVertexArrayObjectMethods for OESVertexArrayObject {
|
|||
|
||||
impl WebGLExtension for OESVertexArrayObject {
|
||||
type Extension = OESVertexArrayObject;
|
||||
fn new(ctx: &WebGLRenderingContext) -> Root<OESVertexArrayObject> {
|
||||
fn new(ctx: &WebGLRenderingContext) -> DomRoot<OESVertexArrayObject> {
|
||||
reflect_dom_object(box OESVertexArrayObject::new_inherited(ctx),
|
||||
&*ctx.global(),
|
||||
OESVertexArrayObjectBinding::Wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue