aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/reflector.rs
Commit message (Collapse)AuthorAgeFilesLines
* Use `#![register_tool]` instead of `#![register_attr]`Simon Sapin2019-11-151-1/+1
| | | | CC https://github.com/rust-lang/rust/issues/66079
* Modify *::get_cx methods to return a safe JSContext instead of a raw onemarmeladema2019-07-241-9/+3
|
* Wrap(Global)Method now takes a SafeJSContext instead of a JSContextmarmeladema2019-07-241-3/+10
| | | | as first argument.
* Update MPL license to https (part 3)Jan Andre Ikenmeyer2018-11-191-1/+1
|
* Reorder importsPyfisch2018-11-061-1/+1
|
* `cargo fix --edition`Simon Sapin2018-11-061-3/+3
|
* Format script componentchansuke2018-09-191-9/+12
|
* Updated to mozjs v0.7.1.Alan Jeffrey2018-05-301-1/+1
|
* Adapt Servo for mozjs 0.6 and the changes introduced in servo/rust-mozjs#393Marcin Mielniczuk2018-03-281-1/+2
|
* Use unsafe Heap::handle wherever neededIgor Matuszewski2018-03-231-1/+2
|
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`.
* Make DomRoot<T> a type alias of a more general Root<T> typeAnthony Ramine2017-09-281-1/+1
| | | | | | | This Root<T> relies on the concept of a stable trace object, which doesn't move for the whole lifetime of the T value. For safety reasons, T must be 'static. The only implementor of StableTraceObject for now is Dom<T>.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-4/+4
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Replace inheritance_integrity by trait shenanigansAnthony Ramine2017-02-151-2/+1
| | | | | | | | | | | | | | | | | For each derived DomObject impl, we also generate a dummy trait ShouldNotImplDomObject that is implemented for all T: DomObject. We then try to implement it for each field type except the first one. If compilation succeed, this means that field type doesn't implement DomObject itself otherwise it would break coherence rules. error[E0119]: conflicting implementations of trait `dom::xmlhttprequest::_IMPL_DOMOBJECT_FOR_XMLHttpRequest::ShouldNotImplDomObject` for type `((), SomeFieldTypeThatShouldNotImplementDomObject)`: --> /Users/nox/src/servo/components/script/dom/xmlhttprequest.rs:120:1 | 120 | #[dom_struct] | ^^^^^^^^^^^^^ | | | first implementation here | conflicting implementation for `((), SomeFieldTypeThatShouldNotImplementDomObject)`
* Derive DomObject with a proc macroAnthony Ramine2017-02-141-0/+12
|
* Use Heap in DOM object reflector implementation to ensure GC barriers are used.Josh Matthews2017-01-201-15/+11
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-4/+4
| | | | Fixes https://github.com/servo/servo/issues/8473.
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-2/+4
| | | | rebase + marked the necessary new code as unsafe
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-1/+1
|
* Remove GlobalRoot and GlobalRefAnthony Ramine2016-10-061-2/+1
|
* Remove Reflectable::globalAnthony Ramine2016-10-061-6/+1
|
* Remove global_root_from_reflectorAnthony Ramine2016-10-061-2/+2
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-1/+6
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-6/+12
|
* Extract mutability out of Reflectable trait.Josh Matthews2016-09-071-2/+6
|
* Add global default method for Reflectable traitChad Kimes2016-01-111-1/+6
|
* Remove `#[allow(raw_pointer_derive)]` attributesBrandon Fairchild2015-11-271-1/+1
| | | | | | The attributes are unused. Fixes #8699.
* Rustfmt some of script.Ms2ger2015-11-181-6/+5
|
* rearrange imports to be in alphabetical orderrohan.prinja2015-10-301-1/+1
|
* more refactoringrohan.prinja2015-10-301-0/+79