aboutsummaryrefslogtreecommitdiffstats
path: root/components/dom_struct/lib.rs
Commit message (Collapse)AuthorAgeFilesLines
* Format components dom_struct, domobject_derive and embedder_traits #21373kingdido9992018-09-031-2/+5
|
* Upgrade to rustc 1.29.0-nightly (1ecf6929d 2018-07-16)Simon Sapin2018-07-181-3/+0
|
* Assert that DOM structs have the correct first fieldManish Goregaokar2018-07-031-2/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOM structs embed their parent type as their first field. This introduces a `.parent()` method to the DOM struct that returns its first field, and codegens a type assert that ensures that `.parent()` returns the parent struct. This generates: On `#[dom_struct]`: ```rust impl HasParent for Type { type Parent = ParentType; fn as_parent(&self) -> ParentType { &self.first_field } } ``` In the codegen files: ```rust impl Type { fn __assert_parent_type(&self) { let _: &ParentType = self.as_parent(); } } ````
* Upgrade to rustc 1.28.0-nightly (524ad9b9e 2018-05-29)Anthony Ramine2018-05-301-0/+1
| | | | Fixes https://github.com/servo/servo/issues/20844
* Revert "Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)"Josh Matthews2018-05-181-1/+1
| | | | This reverts commit 46ad8110172cfc9d8d420e8eb41863f3d394e24d.
* Upgrade to rustc 1.27.0-nightly (8a37c75a3 2018-05-02)Simon Sapin2018-05-041-1/+1
|
* Upgrade to rustc 1.27.0-nightly (056f589fb 2018-04-07)Simon Sapin2018-04-091-3/+2
|
* Upgrade to rustc 1.24.0-nightly (5a2465e2b 2017-12-06)Simon Sapin2017-12-071-0/+4
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Use the better TokenStream API in dom_structAnthony Ramine2017-09-011-10/+5
| | | | | | | | | | | | | | | | | | | | | | Before: ``` error[E0412]: cannot find type `SourceBuffer` in this scope --> /Users/nox/src/servo/components/script/dom/mediasource.rs:25:1 | 25 | #[dom_struct] | ^^^^^^^^^^^^^ did you mean `SourceBufferList`? ``` After: ``` error[E0412]: cannot find type `SourceBuffer` in this scope --> /Users/nox/src/servo/components/script/dom/mediasource.rs:28:39 | 28 | source_buffers: DOMRefCell<Vec<JS<SourceBuffer>>>, | ^^^^^^^^^^^^ did you mean `SourceBufferList`? ```
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+28