Fix typo: `cannot not outlive` -> `cannot outlive`
A `Root` cannot outlive the `RootCollection` it is recorded in.
The docs were saying otherwise.
r? @jdm
<!-- 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/10546)
<!-- Reviewable:end -->
Add API base url method to global objects
This adds an `api_base_url` function to global objects, which fixes `open-url-base.htm` under XMLHttpRequest.
<!-- 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/10502)
<!-- Reviewable:end -->
This allows keeping the VertexAttrib* calls asynchronous.
Another option would be to do the validation in the apply() function,
but that'd require us passing an unnecessary channel around and add
extra synchronization.
The counterpart of this is that it has to be updated when the context
changes, but that's less problem.
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 -->
Stop returning an Option from Window::browsing_context.
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.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9729)
<!-- Reviewable:end -->
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.
Implement XHR::SetRequestHeader Step 3
Closes#9548.
Alternative implementation of #9595.
cc @timvandermeij
I'm not sure if a utility method on `ByteString` is the best place for this functionality, maybe a free function in XHR module would be more suitable.
Also where would be the correct place to add a test for this functionality (if required)?
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9598)
<!-- Reviewable:end -->
The code was split into the following two abstractions.
- OneshotTimers can be used to schedule arbitrary oneshot timers, such
as XHR-Timeouts.
- JsTimers (`setTimeout` and `setInterval`) which use OneshotTimers to
schedule individual callbacks.
With this change the implementation (of JsTimers in particular) is in
much closer alignment with the specification.