aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--components/script/dom/bindings/trace.rs4
-rw-r--r--components/script/dom/browsercontext.rs11
2 files changed, 7 insertions, 8 deletions
diff --git a/components/script/dom/bindings/trace.rs b/components/script/dom/bindings/trace.rs
index eb03b360471..eb0496864a3 100644
--- a/components/script/dom/bindings/trace.rs
+++ b/components/script/dom/bindings/trace.rs
@@ -180,9 +180,9 @@ impl<T: JSTraceable+Copy> JSTraceable for Cell<T> {
}
}
-impl JSTraceable for Traceable<*mut JSObject> {
+impl JSTraceable for *mut JSObject {
fn trace(&self, trc: *mut JSTracer) {
- trace_object(trc, "object", **self);
+ trace_object(trc, "object", *self);
}
}
diff --git a/components/script/dom/browsercontext.rs b/components/script/dom/browsercontext.rs
index 927078d4d30..f3b71cefd03 100644
--- a/components/script/dom/browsercontext.rs
+++ b/components/script/dom/browsercontext.rs
@@ -3,7 +3,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
use dom::bindings::js::{JS, JSRef, Temporary};
-use dom::bindings::trace::Traceable;
use dom::bindings::utils::Reflectable;
use dom::document::Document;
use dom::window::Window;
@@ -20,7 +19,7 @@ use std::ptr;
pub struct BrowserContext {
history: Vec<SessionHistoryEntry>,
active_index: uint,
- window_proxy: Traceable<*mut JSObject>,
+ window_proxy: *mut JSObject,
}
impl BrowserContext {
@@ -28,7 +27,7 @@ impl BrowserContext {
let mut context = BrowserContext {
history: vec!(SessionHistoryEntry::new(document)),
active_index: 0,
- window_proxy: Traceable::new(ptr::null_mut()),
+ window_proxy: ptr::null_mut(),
};
context.create_window_proxy();
context
@@ -44,8 +43,8 @@ impl BrowserContext {
}
pub fn window_proxy(&self) -> *mut JSObject {
- assert!(self.window_proxy.deref().is_not_null());
- *self.window_proxy
+ assert!(self.window_proxy.is_not_null());
+ self.window_proxy
}
fn create_window_proxy(&mut self) {
@@ -62,7 +61,7 @@ impl BrowserContext {
WrapperNew(cx, parent, *handler.deref())
});
assert!(wrapper.is_not_null());
- self.window_proxy = Traceable::new(wrapper);
+ self.window_proxy = wrapper;
}
}