Commit graph

27 commits

Author SHA1 Message Date
rohan.prinja
1f02c4ebbb task -> thread 2016-01-10 17:58:13 +09:00
Ms2ger
0c61be7a57 Rustfmt some of script. 2015-11-18 11:14:05 +01:00
Bobby Holley
069c40f788 Check modified event state from layout and dirty it there.
This adds some overhead, but also provides the small performance benefit of
avoiding dirtying in the case where an event state is toggled an even
number of times between reflows.

The main benefit here though is that it sets us up to be smarter about
what we mark as dirty using restyle hints.
2015-10-27 12:48:48 -07:00
Ravi Shankar
889eec364b sorted the extern crate, mod & use declarations 2015-09-24 02:12:45 +05:30
Brandon Fairchild
de3547e401 Fix reported test-tidy errors for unmerged import blocks
This merges import blocks that were reported by tidy as unmerged.
2015-09-19 12:50:14 -04:00
Manish Goregaokar
54c036cd66 Elide most 'a lifetimes 2015-09-04 08:55:51 +05:30
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]: 2cc08f289a/components/script/dom/servohtmlparser.rs
[4]: a7e29939a1/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