| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
| |
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`.".
|
| |
|
| |
|
|
|
|
|
| |
A Window always has a WindowProxy; the only reason it's wrapped in a nullable
field is the order in which those objects are created.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
GeckoLib builds.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
The attributes are unused.
Fixes #8699.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
|
|
|
| |
This should make it somewhat easier to experiment with alternative
representations in the future. To reduce churn, this commit leaves the String
field public, though.
Also, this will allow us to use the default String type to represent the IDL
USVString type, which explicitly forbids unpaired surrogates, ans as such is
a better match to the Rust String type.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update js.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8242)
<!-- Reviewable:end -->
|
| | |
|
|/
|
|
|
|
|
| |
Moving this slot setting prior to initializing standard classes and
other initialization tasks means that we can effectively use JS_GC_ZEAL.
Fixes #6057.
|
| |
|
| |
|
|
|
|
|
|
|
| |
This method is given a DOMClass value and returns whether it derives from Self.
Interfaces with no descendants directly check whether the given DOMClass is the
same as their own.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Clarify some code in do_create_interface_objects
rval.get() is believed to be always null upon entering this function.
This assumption is verified by the added assertion.
It makes more sense to move the block of code that was moved inside
the if statement which is the only place where it can be initialized.
Fixes #7941.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7943)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
rval.get() is believed to be always null upon entering this function.
This assumption is verified by the added assertion.
It makes more sense to move the block of code that was moved inside
the if statement which is the only place where it can be initialized.
Fixes #7941.
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Introduce DOMClass::heap_size_of
It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.
This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7972)
<!-- Reviewable:end -->
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It holds a function pointer to the HeapSizeOf::heap_size_of_children()
implementation corresponding to that IDL interface.
This removes the need for a clumsly TypeId-based match expression in the
former heap_size_of_eventtarget() function.
|
|/ / |
|
|/ |
|
| |
|
| |
|
|
|
|
| |
This merges import blocks that were reported by tidy as unmerged.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
and `for foo in bar.iter_mut(), and for foo in bar.into_iter()
(continuation of #7197)
|
|
|
|
| |
closes #7197
|
|
|
|
| |
frame treese in script tasks.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)
This builds and passes unit tests.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6850)
<!-- Reviewable:end -->
|