| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All interface objects now share the same hasInstance
r? @nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9633)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| | |
refer to #9531
|
| | |
|
|/
|
|
| |
Use it on DOMException.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
generate typedefs in CodegenRust.
fixes #9384
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9419)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| | |
module
|
|/ |
|
|
|
|
|
|
|
|
| |
That way it does not depend on the return value for the same type.
This hopefully makes the code more clear, and avoids errors if something
changes in the future (for example, we could want to pass slices as
sequence arguments).
|
|
|
|
| |
Unblocks #9053
|
| |
|
| |
|
| |
|
|
|
|
| |
JS_NewFunction doesn't allow us to set the prototype of the interface objects.
|
| |
|
| |
|
|
|
|
| |
window.NodeFilter's prototype should be the object prototype.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function do_create_interface_objects is removed in favour of 4 functions:
create_callback_interface_object, create_interface_prototype_object,
create_noncallback_interface_object and create_named_constructors.
While this increases the amount of codegen'd code, this greatly improves the
readability of the code involved in this part of DOM, instead of having one function
doing 4 different things. We can always find a more adequate abstraction later.
NativeProperties and everything related to the interface objects have been removed
from the utils module.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Slightly reduce the output of codegen
Interfaces which we know are never instantiated can generate less code.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8993)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
This makes codegen not emit anything strictly related to the interface which
are never used in the case of abstract interfaces, such as the Wrap method
or the DOMJSClass.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not create modules from files with nothing to codegen (fixes #8711)
Fixes #8711.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8996)
<!-- Reviewable:end -->
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove all our patches to the WebIDL parser
All the tweaks we need can just be made through Configuration.py.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8055)
<!-- Reviewable:end -->
|
| |/
| |
| |
| |
| | |
All the tweaks we need can just be made through Configuration.py, and
[Abstract] is being submitted upstream by Ms2ger.
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
equivalent code upstream in Gecko.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.
Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.
No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.
Given the unforgeable holder object has the same prototype as actual instances
of the interface, the finalize hook needs to check its slot pointer for nullity
before dropping it.
The new failing test isn't related to Unforgeable attributes, but to the fact
that all Document instances currently have a Location, even if their window
isn't in a browsing context.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Opaque DOMString
This patch makes DOMString an opaque wrapper round String (currently it's a transparent wrapper).
The changes are:
* Replacing DOMString(foo) by DOMString::from(foo).
* Replacing foo.0 by String::from(foo).
* Adding functions clear, push_str and extend for in-place mutation of DOMStrings.
* Replacing DOMString by String in other threads (devtools, storage and filereader).
* Making DOMString implement !Send.
* Removing the pub attribute from the contents of DOMString.
This enables experimenting with other string representations in the DOM.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8477)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
DOMString("...".to_owned()).
|
|\ \
| |/
|/|
| |
| |
| |
| |
| | |
Implement weak-referenceable JS-managed objects
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8147)
<!-- Reviewable:end -->
|
| |
| |
| |
| | |
This allows to take weak references of JS-managed DOM objects.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Properly handle variadic arguments preceded by default values
I broke that in #8197.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8498)
<!-- Reviewable:end -->
|
| |/
| |
| |
| | |
I broke that in #8197.
|
| | |
|
|/ |
|
| |
|
|
|
|
|
| |
We use a RootedVec value in codegen, of which we use the `r()` method to
pass `&[&T]` to the interface methods.
|
| |
|
|
|
|
|
|
|
|
| |
Functions returning `Root<T>` are prefixed by "root_" and the ones returning
`*const T` by "native_".
Functions taking `*mut JSObject` are now suffixed by "_from_object" and the ones
taking `&T` by "_from_reflector".
|