Commit graph

61 commits

Author SHA1 Message Date
Ms2ger
505159a464 Import the util crate as util rather than servo_util.
This used to conflict with the util crate from the standard library, which
has long since been removed.

The import in layout has not been changed because of a conflict with the
util mod there.
2015-01-29 12:16:41 +01:00
Ms2ger
238f3e2d91 Require documentation for all code in dom::bindings (excluding dom::bindings::codegen). 2015-01-25 22:01:04 +01:00
Ms2ger
7ec11b22b4 Document DOMRefCell.
Based on the RefCell documentation.
2014-12-20 15:11:20 +01:00
Ms2ger
0274978a08 Remove the unused DOMRefCell::unwrap method. 2014-12-20 15:03:11 +01:00
Ms2ger
86d609abaf Use RefCell in DOMRefCell to reduce duplicated code. 2014-11-14 21:18:43 +01:00
Jack Moffitt
d1b433a3b3 Rust upgrade to rustc hash b03a2755193cd756583bcf5831cf4545d75ecb8a 2014-11-13 11:17:43 +10:00
Keegan McAllister
f508a82582 Provide safety check helpers in release builds
debug_assert! uses

    if cfg!(not(ndebug)) { ... }

so the body in a release build is dead code, but it still needs to compile.
2014-10-24 16:53:58 -07:00
Keegan McAllister
49234484d6 Ignore the HTML parser's borrow flag in GC tracing
Adds some other dynamic checks in debug builds.
2014-10-24 16:27:37 -07:00
Keegan McAllister
6ec0939a22 Dynamically check DOMRefCell access from layout in debug builds 2014-10-24 16:27:37 -07:00
Keegan McAllister
96e180a22c Customize RefCell instead of wrapping it
This gets rid of a dubious transmute:

    let val = mem::transmute::<&RefCell<T>, &T>(&self.base);

The code duplication will be reduced once rust-lang/rust#18131 is fixed.
2014-10-24 16:27:36 -07:00
Tetsuharu OHZEKI
80593d9cc5 Add DOMRefCell<T> for safe borrowing in layout.
This type simply wraps `RefCell<T>` to add the special method,
and introduce the method to return the pointer of the value contained in
itself, for used in layout task.
2014-10-15 13:41:03 +09:00