aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom
diff options
context:
space:
mode:
authorMatthew Rasmus <mattr@zzntd.com>2015-01-07 19:07:27 -0800
committerMatthew Rasmus <mattr@zzntd.com>2015-01-08 08:51:11 -0800
commitdc721199985feaf94d23af3e7c5ab2a12e15bcbe (patch)
tree62111fce4d1cb4dac19ee085f23aeeb67bf526a4 /components/script/dom
parent01d4739d168aaa8c3b1ec4b4e6f1ab99a0596251 (diff)
downloadservo-dc721199985feaf94d23af3e7c5ab2a12e15bcbe.tar.gz
servo-dc721199985feaf94d23af3e7c5ab2a12e15bcbe.zip
Fix `non_upper_case_globals` warnings
Diffstat (limited to 'components/script/dom')
-rw-r--r--components/script/dom/bindings/js.rs6
-rw-r--r--components/script/dom/bindings/refcounted.rs10
2 files changed, 8 insertions, 8 deletions
diff --git a/components/script/dom/bindings/js.rs b/components/script/dom/bindings/js.rs
index a0c099769f0..ac8da0f8ba6 100644
--- a/components/script/dom/bindings/js.rs
+++ b/components/script/dom/bindings/js.rs
@@ -51,7 +51,7 @@ use dom::node::Node;
use js::jsapi::JSObject;
use js::jsval::JSVal;
use layout_interface::TrustedNodeAddress;
-use script_task::StackRoots;
+use script_task::STACK_ROOTS;
use servo_util::smallvec::{SmallVec, SmallVec16};
use std::cell::{Cell, UnsafeCell};
@@ -101,7 +101,7 @@ impl<T: Reflectable> Temporary<T> {
/// Create a stack-bounded root for this value.
pub fn root(self) -> Root<T> {
- StackRoots.with(|ref collection| {
+ STACK_ROOTS.with(|ref collection| {
let RootCollectionPtr(collection) = collection.get().unwrap();
unsafe {
Root::new(&*collection, &self.inner)
@@ -164,7 +164,7 @@ impl<T: Reflectable> JS<T> {
/// Root this JS-owned value to prevent its collection as garbage.
pub fn root(&self) -> Root<T> {
- StackRoots.with(|ref collection| {
+ STACK_ROOTS.with(|ref collection| {
let RootCollectionPtr(collection) = collection.get().unwrap();
unsafe {
Root::new(&*collection, self)
diff --git a/components/script/dom/bindings/refcounted.rs b/components/script/dom/bindings/refcounted.rs
index 1f6149394f2..adf7d71fde5 100644
--- a/components/script/dom/bindings/refcounted.rs
+++ b/components/script/dom/bindings/refcounted.rs
@@ -36,7 +36,7 @@ use std::collections::hash_map::{HashMap, Vacant, Occupied};
use std::rc::Rc;
use std::sync::{Arc, Mutex};
-thread_local!(pub static LiveReferences: Rc<RefCell<Option<LiveDOMReferences>>> = Rc::new(RefCell::new(None)))
+thread_local!(pub static LIVE_REFERENCES: Rc<RefCell<Option<LiveDOMReferences>>> = Rc::new(RefCell::new(None)))
/// A safe wrapper around a raw pointer to a DOM object that can be
@@ -57,7 +57,7 @@ impl<T: Reflectable> Trusted<T> {
/// be prevented from being GCed for the duration of the resulting `Trusted<T>` object's
/// lifetime.
pub fn new(cx: *mut JSContext, ptr: JSRef<T>, script_chan: Box<ScriptChan + Send>) -> Trusted<T> {
- LiveReferences.with(|ref r| {
+ LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
let live_references = r.as_ref().unwrap();
let refcount = live_references.addref(cx, &*ptr as *const T);
@@ -74,7 +74,7 @@ impl<T: Reflectable> Trusted<T> {
/// a different thread than the original value from which this `Trusted<T>` was
/// obtained.
pub fn to_temporary(&self) -> Temporary<T> {
- assert!(LiveReferences.with(|ref r| {
+ assert!(LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
let live_references = r.as_ref().unwrap();
self.owner_thread == (&*live_references) as *const _ as *const libc::c_void
@@ -123,7 +123,7 @@ pub struct LiveDOMReferences {
impl LiveDOMReferences {
/// Set up the task-local data required for storing the outstanding DOM references.
pub fn initialize() {
- LiveReferences.with(|ref r| {
+ LIVE_REFERENCES.with(|ref r| {
*r.borrow_mut() = Some(LiveDOMReferences {
table: RefCell::new(HashMap::new()),
})
@@ -152,7 +152,7 @@ impl LiveDOMReferences {
/// Unpin the given DOM object if its refcount is 0.
pub fn cleanup(cx: *mut JSContext, raw_reflectable: *const libc::c_void) {
- LiveReferences.with(|ref r| {
+ LIVE_REFERENCES.with(|ref r| {
let r = r.borrow();
let live_references = r.as_ref().unwrap();
let reflectable = raw_reflectable as *const Reflector;