This has a few benefits:
* Less toggling when we discard/reallocate the BaselineScript without discarding
the JitScript.
* Wasm's JIT exit optimization will work with the Baseline Interpreter in the
future.
* The next part will use this to eliminate a load.
Differential Revision: https://phabricator.services.mozilla.com/D32444
--HG--
extra : moz-landing-system : lando
The lazy link stub used to assume a JIT caller but this is no longer the case.
We can then fold clearDependentWasmImports into unlinkDependentWasmImports.
Differential Revision: https://phabricator.services.mozilla.com/D32442
--HG--
extra : moz-landing-system : lando
This removes a word from JSScript and corresponding Wasm data structures.
Furthermore, the skip-argument-type-checks optimization depends on JitScript's
lifetime so moving it to JitScript feels right and might help catch bugs.
Differential Revision: https://phabricator.services.mozilla.com/D32441
--HG--
extra : moz-landing-system : lando
This async/await-ifies the test to put checks in logical order.
It also, as a drive-by, adds `v.token = token` since this is a cue to the test
framework in manifest.js to mozDumpDebugInfo() on the right element after
timeout of a token.
Differential Revision: https://phabricator.services.mozilla.com/D32114
--HG--
extra : moz-landing-system : lando
This assert can be racy if the following sequence happens:
SetPlaying() -- watch manager schedules SendData()
Stop() -- unwatches mPlaying, resets mStartTime
SendData() -- fails the assert
SendData handles the case where mStartTime is unset at runtime already through the mData check, further making this assert unnecessary.
Depends on D32112
Differential Revision: https://phabricator.services.mozilla.com/D32113
--HG--
extra : moz-landing-system : lando
The following sequence in DecodedStream could lead to a stall for a captured
media element:
- MediaDecoder decodes some data, DecodedStream sends it out
- MediaDecoder pauses for buffering, DecodedStream sees SetPlaying(false)
- MediaDecoder decodes until the end, DecodedStream doesn't send since it's
not playing
- MediaDecoder starts playing again, DecodedStream sees SetPlaying(true)
At the last step above, SetPlaying(true) doesn't trigger SendData() so no data
is sent out. Since all data has already been decoded, nothing can trigger
SendData() anymore. This patch fixes this by calling SendData() on SetPlaying().
Depends on D32111
Differential Revision: https://phabricator.services.mozilla.com/D32112
--HG--
extra : moz-landing-system : lando
We used to do that for FragmentOrElement too, but it was removed in D3533. The
explanation is a bit hidden in the revision, but quoting:
> Needed to remove the IN_SHADOW_TREE flag removal from unlinking since it may
> make a ShadowRoot claim not to be a ShadowRoot (nsINode::IsShadowRoot() would
> return false).
>
> In practice it was there because there was code that assumed that
> IsInShadowTree() -> GetContainingShadow() != nullptr
>
> But that stopped holding a while ago, and callers have been adjusted in the
> meantime to not assume that, so it should be fine to not remove the flag now.
We also unbind the Shadow tree on unlink now, which didn't use to happen.
This makes CharacterData consistent with FragmentOrElement.
Differential Revision: https://phabricator.services.mozilla.com/D32627
--HG--
extra : moz-landing-system : lando
`WSRunObject` scans previous and next node of given point/range **without**
checking editing host boundary. Therefore, its methods may return non-editable
nodes or editable nodes in another editing host. In such cases, `HTMLEditRules`
is confused.
This patch makes it store editing host at initialization and it check the
boundary. However, the former cost may appear in score of some benchmark
tests, but we shouldn't allow attackers to use this entrance.
Differential Revision: https://phabricator.services.mozilla.com/D32467
--HG--
extra : moz-landing-system : lando
This doesn't clean up as much as a whole, but it's a step in the right
direction. In particular, it allows us to start using simple bindings for:
* Filters
* Shapes and images, almost. Need to:
* Get rid of the complex -moz- gradient parsing (let
layout.css.simple-moz-gradient.enabled get to release).
* Counters, almost. Need to:
* Share the Attr representation with Gecko, by not using Option<>.
* Just another variant should be enough (ContentItem::{Attr,Prefixedattr},
maybe).
Which in turn allows us to remove a whole lot of bindings in followups to this.
The setup changes a bit. This also removes the double pointer I complained about
while reviewing the shared UA sheet patches. The old setup is:
```
SpecifiedUrl
* CssUrl
* Arc<CssUrlData>
* String
* UrlExtraData
* UrlValueSource
* Arc<CssUrlData>
* load id
* resolved uri
* CORS mode.
* ...
```
The new one removes the double reference to the url data via URLValue, and looks
like:
```
SpecifiedUrl
* CssUrl
* Arc<CssUrlData>
* String
* UrlExtraData
* CorsMode
* LoadData
* load id
* resolved URI
```
The LoadData is the only mutable bit that C++ can change, and is not used from
Rust. Ideally, in the future, we could just use rust-url to resolve the URL
after parsing or something, and make it all immutable. Maybe.
I've verified that this approach still works with the UA sheet patches (via the
LoadDataSource::Lazy).
The reordering of mWillChange is to avoid nsStyleDisplay from going over the
size limit. We want to split it up anyway in bug 1552587, but mBinding gains a
tag member, which means that we were having a bit of extra padding.
One thing I want to explore is to see if we can abuse rustc's non-zero
optimizations to predict the layout from C++, but that's something to explore at
some other point in time and with a lot of care and help from Michael (who sits
next to me and works on rustc ;)).
Differential Revision: https://phabricator.services.mozilla.com/D31742
--HG--
extra : moz-landing-system : lando
We return with this rather omnious message when we are missing the
implementation of a CDP method:
Error: Protocol error (Target.createBrowserContext): TypeError: inst[command] is not a function:
This patch improves the error message so that debugging is not
necessary to find out which domain or command is missing.
Ideally Session.jsm and ContentProcessSession.jsm would share the
same execute() function (there's really not reason they don't),
but that involves more work.
Differential Revision: https://phabricator.services.mozilla.com/D32069
--HG--
extra : moz-landing-system : lando
According to the spec, we should ignore the response body for the HEAD and CONNECT requests.
Differential Revision: https://phabricator.services.mozilla.com/D28678
--HG--
extra : moz-landing-system : lando
These usecases are almost the same as the geometry property stuff. It'd
be better to use `GetPrimaryFrame()->Style()` consistently rather than
using `GetComputedStyleNoFlush()` here.
Differential Revision: https://phabricator.services.mozilla.com/D32613
--HG--
extra : moz-landing-system : lando
Resolving length for inner <svg> is exactly the same as other ordinary
element. We should not pass the context to `GetAnimValue()`, otherwise
font-size will be obtained from the enclosing viewport of the inner
<svg> rather than the inner <svg> itself.
Differential Revision: https://phabricator.services.mozilla.com/D32657
--HG--
extra : moz-landing-system : lando
Depends on D32538.
Not mandatory, but we have some duplicated code shared by several mochitests, maybe we could have a shared helper?
Differential Revision: https://phabricator.services.mozilla.com/D32539
--HG--
extra : moz-landing-system : lando