| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Remove the need for rust-mozjs to use unstable Rust features
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18875)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
http://www.robohornet.org gives a score of 101.36 on master,
and 102.68 with this PR. The latter is slightly better,
but probably within noise level.
So it looks like this PR does not affect DOM performance.
This is expected since `Box::new` is defined as:
```rust
impl<T> Box<T> {
#[inline(always)]
pub fn new(x: T) -> Box<T> {
box x
}
}
```
With inlining, it should compile to the same as box syntax.
|
|
|
|
| |
For now, only "capture" is supported.
|
|
|
|
|
|
|
| |
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>.
|
| |
|
| |
|
| |
|
|
|
|
| |
The type DomRoot<T> is now the first one defined in it.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
I don't want to do such a gratuitous rename, but with all the other types
now having "Dom" as part of their name, and especially with "DomOnceCell",
I feel like the other cell type that we already have should also follow
the convention. That argument loses weight though when we realise there
is still DOMString and other things.
|
|
|
|
| |
Like DOMRefCell<T>.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Mark dictionaries containing GC values as must_root, and wrap them in
RootedTraceableBox in automatically-generated APIs. To accommodate
union variants that are now flagged as unsafe, add RootedTraceableBox
to union variants that need to be rooted, rather than wrapping the
entire union value.
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Improve Promise
The elephant 🐘 (not PHP's) still remains in the room: `Rc<Promise>` shouldn't require `#[allow(unrooted_must_root)]`.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18600)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| |
| | |
We shouldn't have to pass a raw JSContext pointer, and to enter the
promise's context's compartment by hand.
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Using OnceCell<T> from Mitochondria
<!-- Please describe your changes on the following line: -->
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13402 (github issue number if applicable).
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18059)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
adding oncecell for JS references
removing option<JS<T>> to <JS<T>>
changing return types
removing get method and refactoring the function
changing getElements method
lint fixes
moving to default
simplifying return
ordering
Removing elements
linting
|
| |
| |
| |
| |
| | |
Having both TaskBox and TaskOnce allows us to remove the superfluous inner boxing
from CancellableTask<T>.
|
| | |
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Rename Runnable to Task and other improvements
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18533)
<!-- Reviewable:end -->
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The changes are:
* `*Runnable` -> `*Task`;
* `RunnableMsg` -> `Task`;
* `RunnableWrapper` -> `TaskCanceller`;
* `MainThreadRunnable` -> `MainThreadTask`;
* `wrap_runnable` -> `wrap_task`;
* `get_runnable_wrapper` -> `task_canceller`;
* `handler` -> `run`;
* `main_thread_handler` -> `run_with_script_thread`.
|