mirror of
https://github.com/servo/servo.git
synced 2025-06-24 17:14:33 +01:00
Convert as many of Page's RefCell fields to Cell as possible (fixes #1990).
This commit is contained in:
parent
eb67f69b2d
commit
04c807dd53
3 changed files with 32 additions and 30 deletions
|
@ -10,7 +10,7 @@ use js::jsval::JSVal;
|
|||
|
||||
use libc;
|
||||
use std::cast;
|
||||
use std::cell::RefCell;
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::ptr;
|
||||
use std::ptr::null;
|
||||
use serialize::{Encodable, Encoder};
|
||||
|
@ -142,6 +142,12 @@ impl<S: Encoder<E>, E, T: Encodable<S, E>> Encodable<S, E> for Traceable<RefCell
|
|||
}
|
||||
}
|
||||
|
||||
impl<S: Encoder<E>, E, T: Encodable<S, E>+Copy> Encodable<S, E> for Traceable<Cell<T>> {
|
||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
||||
self.deref().get().encode(s)
|
||||
}
|
||||
}
|
||||
|
||||
impl<S: Encoder<E>, E> Encodable<S, E> for Traceable<*JSObject> {
|
||||
fn encode(&self, s: &mut S) -> Result<(), E> {
|
||||
trace_object(get_jstracer(s), "object", **self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue