| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace return_address usage for rooting with stack guards and convenience macros.
The existing `Rooted` and `RootedVec` users were migrated the the following two macros:
```rust
let x = Rooted::new(cx, value);
// Was changed to:
rooted!(in(cx) let x = value);
// Which expands to:
let mut __root = Rooted::new_unrooted(value);
let x = RootedGuard::new(cx, &mut __root);
```
```rust
let mut v = RootedVec::new();
v.extend(iterator);
// Was changed to:
rooted_vec!(let v <- iterator);
// Which expands to:
let mut __root = RootableVec::new();
let v = RootedVec::new(&mut __root, iterator);
```
The `rooted!` macro depends on servo/rust-mozjs#272.
These APIs based on two types, a container to be rooted and a rooting guard, allow implementing both `Rooted`-style rooting and `Traceable`-based rooting in stable Rust, without abusing `return_address`.
Such macros may have been tried before, but in 1.9 their hygiene is broken, they work only since 1.10.
Sadly, `Rooted` is a FFI type and completely exposed, so I cannot prevent anyone from creating their own, although all fields but the value get overwritten by `RootedGuard::new` anyway.
`RootableVec` OTOH is *guaranteed* to be empty when not rooted, which makes it harmless AFAICT.
By fixing rust-lang/rust#34227, this PR enables Servo to build with `-Zorbit`.
---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix rust-lang/rust#34227
- [x] These changes do not require tests because they are not functional changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/11872)
<!-- Reviewable:end -->
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
interrupted panic to the origin of the JS execution via TLS before resuming. Fix #6462.
|
|
|
|
| |
unscopable
|
| |
|
|
|
|
| |
This allows us to use global_root_from_object in the context of a Condition.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
This entirely removes the 'non-geckolib' feature of the util crate.
|
| |
|
|
|
|
| |
https://github.com/rust-lang/rust/pull/33593 made them useless.
|
|
|
|
|
| |
This removes the need for the final null byte and we can make
NonCallbackInterfaceObjectClass::new safe again I guess.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #11152
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
update.sh downloads all *.py tests from mozilla central
components/script/dom/bindings/codegen/parser/update.sh downloads all *.py tests from https://dxr.mozilla.org/mozilla-central/source/dom/bindings/parser/tests
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9890)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
the latest *.py tests from
https://hg.mozilla.org/mozilla-central/archive/tip.tar.gz/dom/bindings/parser/tests/
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Update SpiderMonkey
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10756)
<!-- Reviewable:end -->
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
conditionally-exposed ones.
|
|/ / |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It's now set through the intermediate InterfaceConstructorBehavior structure,
which lets us improve the abstraction around NonCallbackInterfaceObjectClass
a bit better.
When the interface's constructor is supposed to always throw, the error for
calling `Foo()` without new is "Illegal constructor.". when the interface
actually defines an interface, the error is instead
"This constructor needs to be called with `new`.".
|
| | |
|
| | |
|
| |
| |
| |
| | |
Fixes #10596.
|
| |
| |
| |
| | |
code is unreachable after return, and identical to the upper block
|
| | |
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix #9511. Export webidl enums using "pub use".
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355
Rebase of #9691.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10152)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| | |
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed compile error in generated code, when webidl constructors have same number of args
One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9786)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
number of args
Edited test webidl to show issue, and fix
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
We need them to be cached to not instantiate them multiple times with
lazy initialisation.
|
| | |
|
| |
| |
| |
| |
| |
| | |
According to JSProxy.h, without this the default implementation calls
ownPropertyKeys and filters out the unenumerable properties. We know when such
things exist so we don't need to do that.
|