Josh Matthews
8620fe5995
Start reporting memory usage for Window and all nodes in all DOM trees for frame treese in script tasks.
2015-08-03 23:05:00 -04:00
Michael Wu
b7301ca06c
Fix some warnings caused by the SM upgrade
2015-06-19 22:07:08 -04:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Josh Matthews
5c7be5c9c3
Make async XMLHttpRequest requests use async network events.
2015-04-16 11:46:39 -04:00
Corey Farwell
2a01cec521
Utilize Option::expect
2015-04-06 14:06:05 -07:00
Manish Goregaokar
3479d3fa7f
Replace unsafe_blocks by unsafe_code.
2015-03-21 10:27:32 +01:00
Avi Weinstock
bcc27d9bd0
Replace borrow with borrow_for_gc_trace in JSTraceable::trace (Issue #4778 ).
2015-03-03 09:06:45 -05:00
Tetsuharu OHZEKI
dbb0f49bc7
DOMRefCell<T>.is_mutably_borrowed() should return the state correctly.
...
This method returned the result of `RefCell<T>.try_borrow().is_some()`.
But it meant whether the state **is not** BorrowState::Writing.
This wrong is introduced by [1], Before it revision, this method had
returned whether the state is BorrowState::Writing or not.
This doesn't change callers of this method because git blames ([3], [4]) says
that the caller is introduced by [2] and [2] is introduced before [1].
[1]: 86d609abaf
[2]: 49234484d6
[3]: https://github.com/servo/servo/blame/2cc08f289ab909de44fa09a07b2c43b70ce379b9/components/script/dom/servohtmlparser.rs
[4]: https://github.com/servo/servo/blame/a7e29939a1df679bd865573dc71f7ba65f0268c4/components/script/dom/bindings/cell.rs
2015-02-13 05:53:22 +09:00
Tetsuharu OHZEKI
552a418a33
Fix warnings about RefCell<T>.try_borrow().
2015-02-13 05:40:46 +09:00
Diego Marcos
7b9c902a0a
Adds borrow_for_script_deallocation and unsafe_mut_js_info method to avoid 'DOMRefCell already mutably borrowed' messages. This is just a temporary fix until the Rust standard library allows borrowing already-borrowed RefCell values during unwinding.
...
It also removes LiveDOMReferences destructor that it's a no-op but it contains an assert that was being violated causing an endless cycle of destructor calls ending up in a stack overflow.
2015-01-30 12:07:53 -08:00
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