aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/root.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2017-09-26 01:21:01 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2017-09-26 09:49:02 +0200
commitc52fd0a78041ec22db1c4b391556368cd8b87b02 (patch)
tree80e283b6af26f0fd7bd3d620d45be6a52d4854b4 /components/script/dom/bindings/root.rs
parentd29335040d78a19f25830061484cf70dc03a9c21 (diff)
downloadservo-c52fd0a78041ec22db1c4b391556368cd8b87b02.tar.gz
servo-c52fd0a78041ec22db1c4b391556368cd8b87b02.zip
Rename MutNullableJS<T> to MutNullableDom<T>
Diffstat (limited to 'components/script/dom/bindings/root.rs')
-rw-r--r--components/script/dom/bindings/root.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/components/script/dom/bindings/root.rs b/components/script/dom/bindings/root.rs
index a7f4bb9e411..dbfe4023d63 100644
--- a/components/script/dom/bindings/root.rs
+++ b/components/script/dom/bindings/root.rs
@@ -298,15 +298,15 @@ impl<T: DomObject + PartialEq> PartialEq<T> for MutDom<T> {
/// on `Dom<T>`.
#[must_root]
#[derive(JSTraceable)]
-pub struct MutNullableJS<T: DomObject> {
+pub struct MutNullableDom<T: DomObject> {
ptr: UnsafeCell<Option<Dom<T>>>,
}
-impl<T: DomObject> MutNullableJS<T> {
- /// Create a new `MutNullableJS`.
- pub fn new(initial: Option<&T>) -> MutNullableJS<T> {
+impl<T: DomObject> MutNullableDom<T> {
+ /// Create a new `MutNullableDom`.
+ pub fn new(initial: Option<&T>) -> MutNullableDom<T> {
debug_assert!(thread_state::get().is_script());
- MutNullableJS {
+ MutNullableDom {
ptr: UnsafeCell::new(initial.map(Dom::from_ref)),
}
}
@@ -344,7 +344,7 @@ impl<T: DomObject> MutNullableJS<T> {
}
}
- /// Set this `MutNullableJS` to the given value.
+ /// Set this `MutNullableDom` to the given value.
pub fn set(&self, val: Option<&T>) {
debug_assert!(thread_state::get().is_script());
unsafe {
@@ -360,7 +360,7 @@ impl<T: DomObject> MutNullableJS<T> {
}
}
-impl<T: DomObject> PartialEq for MutNullableJS<T> {
+impl<T: DomObject> PartialEq for MutNullableDom<T> {
fn eq(&self, other: &Self) -> bool {
unsafe {
*self.ptr.get() == *other.ptr.get()
@@ -368,7 +368,7 @@ impl<T: DomObject> PartialEq for MutNullableJS<T> {
}
}
-impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableJS<T> {
+impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableDom<T> {
fn eq(&self, other: &Option<&T>) -> bool {
unsafe {
*self.ptr.get() == other.map(Dom::from_ref)
@@ -376,17 +376,17 @@ impl<'a, T: DomObject> PartialEq<Option<&'a T>> for MutNullableJS<T> {
}
}
-impl<T: DomObject> Default for MutNullableJS<T> {
+impl<T: DomObject> Default for MutNullableDom<T> {
#[allow(unrooted_must_root)]
- fn default() -> MutNullableJS<T> {
+ fn default() -> MutNullableDom<T> {
debug_assert!(thread_state::get().is_script());
- MutNullableJS {
+ MutNullableDom {
ptr: UnsafeCell::new(None),
}
}
}
-impl<T: DomObject> HeapSizeOf for MutNullableJS<T> {
+impl<T: DomObject> HeapSizeOf for MutNullableDom<T> {
fn heap_size_of_children(&self) -> usize {
// See comment on HeapSizeOf for Dom<T>.
0