Commit Graph

777067 Commits

Author SHA1 Message Date
Nicolas Chevobbe
149cd3677e Bug 1740453 - [devtools] Handle onTargetSelected in accessibility panel. r=ochameau.
A couple tests are added to check that the panel works fine when using the iframe picker.

Differential Revision: https://phabricator.services.mozilla.com/D130611
2021-11-18 13:22:34 +00:00
Julian Seward
0e3ed22e10 Bug 1713092 - Remove redundant bitwise {and/or/xor}{32,64} for wasm-via-Ion. r=lth.
This patch performs MIR-level folding of bitwise {and/or/xor}{32,64} arising
from wasm inputs.  JS handling of and/or/xor is unchanged -- this patch adds a
new path (MIR node) for the wasm/machine-level-semantics versions of these
operations, which then participates in constant folding (via GVN) in the
"normal" way.  Changes:

jit-test/tests/wasm/binop-x64-ion-folding.js:
* new file with test cases

jit/MIR.h:
* new node kind MWasmBinaryBitwise for wasm-only {and/or/xor}{32,64}

jit/MIR.cpp:
* new method MWasmBinaryBitwise::foldsTo to handle all folding cases
* added a few small helper functions for ::foldsTo

jit/Lowering.cpp:
* LIRGenerator::visitTest: also accept MWasmBinaryBitwise with subopcode And
  when creating LBitAndBranch instructions.
* LIRGenerator::lowerBitOp: change arg type from MBinaryBitwiseInstruction to
  MBinaryInstruction so as to also accept MWasmBinaryBitwise.
* LIRGenerator::visitWasmBinaryBitwise: new function.  Generate LIR using
  scheme identical to that of MBinaryBitwiseInstruction.

wasm/WasmIonCompile.cpp
* a new overload for MDefinition* binary(..), taking a
  MWasmBinaryBitwise::SubOpcode value
* generate MWasmBinaryBitwise as appropriate, via function
  EmitBitwiseAndOrXor
* remaining uses of EmitBitwise renamed to EmitShift

Differential Revision: https://phabricator.services.mozilla.com/D130038
2021-11-18 13:00:14 +00:00
Raphael Ferrand
702f0ad086 Bug 1498224 - [devtools] Apply new classnames as you type in the .cls section of the rule-view r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D129515
2021-11-18 12:52:22 +00:00
Andrew Creskey
cdd275e25c Bug 1741163 - Add the option to collect overlapping snapshots r=mossop
Added api to collect overlapping snapshots (i.e. those from urls that the user interacted with within an hour of the context url).
This will allow for more relevant snapshot selection.

Differential Revision: https://phabricator.services.mozilla.com/D131132
2021-11-18 12:35:17 +00:00
Frederik Braun
ff85ee61be Bug 1738418 - set sandboxflags for object/embed loads correctly r=ckerschb,smaug,necko-reviewers
Depends on D130958

Differential Revision: https://phabricator.services.mozilla.com/D130959
2021-11-18 12:21:07 +00:00
Marian-Vasile Laza
475ae37175 Backed out 6 changesets (bug 1741411, bug 1740737) for causing build bustages on CacheIR.cpp. CLOSED TREE
Backed out changeset 7f550858162e (bug 1741411)
Backed out changeset f87b1d574cbc (bug 1741411)
Backed out changeset 6ee89e252b76 (bug 1740737)
Backed out changeset 51f6dd19dc14 (bug 1740737)
Backed out changeset b89529d42aad (bug 1740737)
Backed out changeset 1b951bd25193 (bug 1740737)
2021-11-18 14:19:37 +02:00
André Bargull
57dbf05fa9 Bug 1741411 - Part 2: Emit JSOp::OptimizeSpreadCall for all calls with a single spread argument. r=iain
After part 1 we can lift the single name operand restriction and emit
`JSOp::OptimizeSpreadCall` for all calls with a single spread argument.

Differential Revision: https://phabricator.services.mozilla.com/D131243
2021-11-18 11:37:30 +00:00
André Bargull
7090317ef2 Bug 1741411 - Part 1: Only emit argument operand once for optimised spread calls. r=iain
This commit changes the byte code for optimised spread calls to emit the spread
operand only once.

The new `BytecodeEmitter::emitSpreadIntoArray()` method was added to spread an
on-stack value into an array. This method is needed to avoid emitting the spread
operand another time in 'BytecodeEmitter::emitArray()`.

Differential Revision: https://phabricator.services.mozilla.com/D131242
2021-11-18 11:37:30 +00:00
André Bargull
5a34a4a95c Bug 1740737 - Part 4: Scalar replace MArrayFromArgumentsObject. r=iain
`...arguments` can be seen as if a rest array object had been created for a
function without additional formals:
```js
// |f| and |g| have identical semantics when all iteration related functions
// are still in their initial state.
function f() { h(...arguments); }
function g(...rest) { h(...rest); }
```

The idea when replacing `MArrayFromArgumentsObject` is now as follows:
We replace `MArrayFromArgumentsObject` with the identical instructions we use
when creating a rest array (cf. `WarpBuilder::build_Rest()`), except that we set
the number of formals to zero. So inlined arguments are replaced with either
`MNewArrayObject` or `MNewArray` and non-inlined arguments are replaced with
`MRest`.
We then rely on scalar replacement for these replacements, so that we eventually
end up with all instructions replaced. This works because scalar replacement
processes the graph in reverse post-order and because the new instructions are
placed after `MCreate{Inlined}ArgumentsObject`.

The `ArrayFromArgumentsObjectResult` CacheIR op is changed to hold the shape of
the default array shape. This change is needed so that scalar replacement can
replace `MArrayFromArgumentsObject` with `MNewArrayObject` for the case of
inlined arguments.

Differential Revision: https://phabricator.services.mozilla.com/D130989
2021-11-18 11:37:30 +00:00
André Bargull
4a701b65c8 Bug 1740737 - Part 3: Transpile ArrayFromArgumentsObjectResult. r=iain
The transpiled code simply calls a VM function and performs no further
optimisations.

Differential Revision: https://phabricator.services.mozilla.com/D130988
2021-11-18 11:37:29 +00:00
André Bargull
109673303b Bug 1740737 - Part 2: Handle arguments in optimised spread calls. r=iain
When the `arguments` object is still in its initial state (no overridden
elements, length, or iterator), `...arguments` can be optimised to directly
create the spread array from the arguments' content instead of going through
the iterator code.

The CacheIR code additionally disallows overridden or forwarded arguments in
order to further optimise this operation during scalar replacement. See part 4.

Differential Revision: https://phabricator.services.mozilla.com/D130987
2021-11-18 11:37:29 +00:00
André Bargull
1375b8c104 Bug 1740737 - Part 1: Change OptimizeSpreadCall to return the optimised array or undefined. r=iain
The current `JSOp::OptimizeSpreadCall` optimisation only works when the input
is already a packed array. So it won't help to optimise code like
`super(...arguments)`, which is emitted by the TypeScript compiler when
creating default derived class constructors.

For example:
```ts
class Example extends Object {
  public name = "field";
}
```

Is compiled to:
```js
class Example extends Object {
  constructor() {
    super(...arguments);
    this.name = "field";
  }
}
```

To support this pattern, `JSOp::OptimizeSpreadCall` is changed to return a
packed array instead of returning `true` when the optimisation can be applied.
When the optimisation can't be used, `undefined` is returned instead of `false`.

The emitted byte code looks roughly like:
```
array_or_undef = optimiseSpreadCall(value);
if (array_or_undef === undefined) {
  // Emit iterator protocol code.
}
spreadCall(array_or_undef);
```

The additional comparison `array_or_undef === undefined` needs to be handled
during scalar replacement, so we can still scalar replace arrays in optimised
spread calls.

Parts 2-4 will add `arguments` support to `JSOp::OptimizeSpreadCall`.

Differential Revision: https://phabricator.services.mozilla.com/D130986
2021-11-18 11:37:28 +00:00
amy churchwell
ef30fc70a2 Bug 1738855 - restore light theme active tab styles. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D130401
2021-11-18 11:28:55 +00:00
Alexandre Poirot
8ed2c76f1f Bug 1740292 - [devtools] Remove target actor's _detach method. r=nchevobbe
Well, the RDP method "detach" still exists, but is now destroying the target actor.
There is no more intermediate state where the actor is "detached" but not destroyed,
which is confusing and no longer useful now that we can longer attach again.

Differential Revision: https://phabricator.services.mozilla.com/D130916
2021-11-18 10:57:02 +00:00
Alexandre Poirot
71f51e2a2f Bug 1740292 - [devtools] Remove all notion of "attached" in target actors. r=nchevobbe
This might make the leftover "detach" method a bit more special.
But ideally we would get rid of it and convert it to a call to target actor's destroy method.

Differential Revision: https://phabricator.services.mozilla.com/D130915
2021-11-18 10:57:02 +00:00
Alexandre Poirot
841b8e961c Bug 1740292 - [devtools] Remove target actor's attach method entirely. r=nchevobbe,devtools-backward-compat-reviewers
(except for the special edgecase of worker's hybrid descriptor/target)

Differential Revision: https://phabricator.services.mozilla.com/D130914
2021-11-18 10:57:01 +00:00
Alexandre Poirot
487d9677f3 Bug 1740292 - [devtools] Stop calling target front attach method. r=nchevobbe
Previous patches made attach method become a no-op, so all these callsites can be removed.

Differential Revision: https://phabricator.services.mozilla.com/D130913
2021-11-18 10:57:01 +00:00
Alexandre Poirot
5aea7b3306 Bug 1740292 - [devtools] Merge target actor's attach methods into their constructors. r=nchevobbe
By doing that, we no longer have to ensure calling attach here and there.
Some followups will be helpful to get rid of detach and all mentions of attach/detach/attached.
Some code, like descriptors and tests are still calling attach, which is now a no-op.
Gettind rid of detach might be slightly more complicated.

Differential Revision: https://phabricator.services.mozilla.com/D130843
2021-11-18 10:57:01 +00:00
Alexandre Poirot
95bb482288 Bug 1740292 - [devtools] Stop calling Target actor's attach method from the frontend. r=nchevobbe,devtools-backward-compat-reviewers
Calling attach was important to bootstrap the thread actor and retrieve its actorID.
But now with server target this is done early on and we already retrieve the actorID
via form(). Except for workers, but I fixed that.

The next patch will ensure that, on the server side we fully initialize the target actors
as soon as they are created.

Differential Revision: https://phabricator.services.mozilla.com/D130842
2021-11-18 10:57:00 +00:00
Alexandre Poirot
19f5a90b8b Bug 1740292 - [devtools] Avoid exception in DOCUMENT_EVENT listener when running xpcshell tests. r=nchevobbe
Note that these exception doesn't seem to make the test fail (for ex in test_nesting-03.js).

Differential Revision: https://phabricator.services.mozilla.com/D130841
2021-11-18 10:56:59 +00:00
Alexandre Poirot
572abaa684 Bug 1740292 - [devtools] Use a single method to create xpcshell target globals. r=nchevobbe
testGlobal and createTestGlobal were redundant.

Differential Revision: https://phabricator.services.mozilla.com/D130840
2021-11-18 10:56:59 +00:00
Henrik Skupin
d3c1ad40a8 Bug 1734354 - [puppeteer] Bump Puppeteer (Fission job) to Tier 1. r=webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D131479
2021-11-18 10:39:18 +00:00
Kershaw Chang
14db165b22 Bug 1734609 - Fix the test:testAllRecordsInHttp3ExcludedList, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130637
2021-11-18 10:22:15 +00:00
Kershaw Chang
743032056b Bug 1734609 - Make sure we don't dispatch a transaction more than once, r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D130250
2021-11-18 10:22:15 +00:00
Gecko
c622466e6d Bug 836789 - changed to using weak references to observers in the _init function and deleted unnessesary removeObserver calls in the _dispose function. r=emilio,mak Cobos Álvarez
Differential Revision: https://phabricator.services.mozilla.com/D131042
2021-11-18 09:55:06 +00:00
stransky
664251da5a Bug 1740897 [X11] Make parent container of D&D popup transparent to avoid flickering, r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D131252
2021-11-18 09:44:10 +00:00
Andreas Pehrson
a1427f1f0b Bug 1738931 - Make the TaskQueueWrapper's shutdown mutex recursive. r=bwc
Differential Revision: https://phabricator.services.mozilla.com/D131445
2021-11-18 09:32:34 +00:00
Andreas Pehrson
3068d523b2 Bug 1738931 - Unset remote SSRC in a direct task (stable state) to avoid re-entrancy. r=bwc
...rather than by unsetting the old remote ssrc on all other conduits that
already have it set.

With this patch we don't risk re-entrancy into UnsetRemoteSSRC (CallWrapper,
VideoConduit) or SetRemoteSSRCConfig (VideoConduit).

Differential Revision: https://phabricator.services.mozilla.com/D130270
2021-11-18 09:32:33 +00:00
Christoph Kerschbaumer
d6e438a50f Bug 1741585: Update more tests within toolkit/components/antitracking/test/ to work with https-first enabled r=timhuang
Differential Revision: https://phabricator.services.mozilla.com/D131332
2021-11-18 09:20:02 +00:00
Henrik Skupin
a854264cda Bug 1740798 - [puppeteer] Remove multiple results from test "Page.click should click the button". r=webdriver-reviewers,jgraham
Differential Revision: https://phabricator.services.mozilla.com/D131472
2021-11-18 09:12:03 +00:00
Mike Hommey
434ed28445 Bug 1736502 - Work around clang trunk changes that break our clang-trunk build. r=andi
Short of solving this by fully embracing the monorepo build and removing
the projects/ workarounds (which will also require a compat more with
older clang versions we still build with the same script), we can solve
the bustage with a small hack.

Differential Revision: https://phabricator.services.mozilla.com/D131458
2021-11-18 06:43:03 +00:00
Randell Jesup
e7ed5349e9 Bug 1736120: Downgrade NS_ERROR to NS_WARNING when failing to launch a process r=nika
Differential Revision: https://phabricator.services.mozilla.com/D129899
2021-11-18 04:56:25 +00:00
Jeff Muizelaar
54b2933528 Bug 1741638 - Report error code from Freetype. r=gfx-reviewers,lsalzman
This should give us a better idea of why we're seeing crashes in
bug 1737810.

Differential Revision: https://phabricator.services.mozilla.com/D131379
2021-11-18 03:37:33 +00:00
Nika Layzell
2dad541514 Bug 1741734 - Fix rust xpcom_macros future-compat warning, r=xpcom-reviewers,glandium
Differential Revision: https://phabricator.services.mozilla.com/D131444
2021-11-18 00:48:53 +00:00
Emilio Cobos Álvarez
ace16c06ab Bug 1741491 - Make sure we only record old style value once. r=smaug
The way CommitStyles called into servo caused it to call the closure
multiple times, and we were not dealing with that properly.

Handle the "was called" state internally.

Differential Revision: https://phabricator.services.mozilla.com/D131411
2021-11-17 23:39:32 +00:00
Zibi Braniecki
3881c4ca80 Bug 1687118 - Bail early from DocumentL10n::TriggerInitialTranslation if mReady is not available. r=emilio,nordzilla
Differential Revision: https://phabricator.services.mozilla.com/D131253
2021-11-17 23:31:45 +00:00
Katherine Patenio
cf8aa80ecf Bug 1736924 - create one-time migration for alwaysAsk mimetype prefs to saveToDisk if downloads improvements pref is enabled. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D130136
2021-11-17 23:31:24 +00:00
Tooru Fujisawa
0958039f60 Bug 1740063 - Collect telemetry for hidden browser.link.open_newwindow.restriction preference usage. r=chutten
Differential Revision: https://phabricator.services.mozilla.com/D130887
2021-11-17 23:29:56 +00:00
Shane Caraveo
4b5bda15cb Bug 1740634: Add install_domain failure panel text r=rpl,agi,geckoview-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D131028
2021-11-17 23:23:56 +00:00
Shane Caraveo
297d70924e Bug 1736902 implement distribution control for 3rd party addon installs r=rpl
Differential Revision: https://phabricator.services.mozilla.com/D129105
2021-11-17 23:23:55 +00:00
Mike Kaply
30f444a156 Bug 1741593 - Setting MOZ_APP_* values should not depend on launcher process. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D131394
2021-11-17 23:03:27 +00:00
Nika Layzell
ab32545d5a Bug 1741152 - Add diagnostic warnings to process launch codepaths, r=ipc-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D131419
2021-11-17 22:19:13 +00:00
sotaro
4f3833aa2f Bug 1741111 - Remove LayersBackend::LAYERS_BASIC r=gfx-reviewers,bradwerth
LayersBackend::LAYERS_BASIC is not used any more.

Differential Revision: https://phabricator.services.mozilla.com/D131104
2021-11-17 22:05:47 +00:00
Brendan Dahl
f0b08c0f2d Bug 1741700 - Block interactions for oauth pages. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D131424
2021-11-17 22:00:04 +00:00
Jesse Schwartzentruber
931314c5f1 Bug 1741684 - Initialize PSM prior to HTTP fuzzing iterations. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D131414
2021-11-17 21:51:43 +00:00
Nicolas Silva
b9f5b1b3a0 Bug 1741584 - Add a profile event marker for the number of bytes and items uploaded. r=gfx-reviewers,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D131395
2021-11-17 21:33:55 +00:00
Glenn Watson
6aa0e4bdc9 BUg 1741714 - Validate pipeline ids are not referenced multiple times during scene building r=gfx-reviewers,bradwerth
Add an earlier assert to try and validate the root cause of bug 1736069.

Differential Revision: https://phabricator.services.mozilla.com/D131435
2021-11-17 21:33:37 +00:00
Mitchell Hentges
84e16b0d9c Bug 1730712: Split site manager into command and mach managers r=ahal
The command site manager needs to be able to do ad-hoc pip
installations, while the Mach site manager needs to manage
the system `sys.path` and conditionally create an on-disk
virtualenv.

By splitting the class into two, we can now give each use case the
attention it deserves.

Differential Revision: https://phabricator.services.mozilla.com/D129529
2021-11-17 20:54:27 +00:00
Mitchell Hentges
876c31175a Bug 1730712: Remove pip package check in site.up_to_date() r=ahal
Sorry for the flip-flop on technique here :S

`validate_environment_packages()` was originally run when checking if a
site is up-to-date to ensure that ad-hoc pip installs didn't replace
needed packages with those of different versions.

However, since it was added, a few notes have come up:
1. The case where requirements change isn't caught by this - that is
  caught earlier by the cheap "a requirements file has changed on-disk"
  check.
2. This is really slow, and doing it for most Mach commands is not worth
  it (as evident by how the `skip_pip_package_check` was already added
  for the Mach site's use case).
3. Since the tree as-is doesn't have (common) cases where ad-hoc
  installations break an environment, then this check, though helpful,
  isn't adding a significant amount of value considering its performance
  cost.

However, these aren't to say that this won't be valuable in the future:
I'd like to reach a point where sites are considered "sealed" by
default: no ad-hoc pip installations are allowed.
However, add the ability to mark sites as unsealed/"allowing
ad-hoc pip installations". Then, re-add the pip package check, but only
for such flexible, unsealed virtualenvs.

Differential Revision: https://phabricator.services.mozilla.com/D129692
2021-11-17 20:54:26 +00:00
Mitchell Hentges
ea49f4cf67 Bug 1730712: Remove metadata_path parameter from MozSiteManager r=ahal
IIRC, this was added prematurely for an upcoming test due to a faulty
VCS commit split.

Let's temporarily remove this parameter, then re-add it when needed for
whatever test consumes it.

Differential Revision: https://phabricator.services.mozilla.com/D129691
2021-11-17 20:54:26 +00:00