Граф коммитов

743734 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 9270e2e340 Bug 1690990 - lint: add some requirements.txt to the line check linter + fix them r=linter-reviewers,marco DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104156
2021-02-05 17:19:40 +00:00
Doug Thayer 38b58e62b2 Bug 1690925 - Don't animate the skeleton UI if we're in a fast startup r=mconley,emalysz
This avoids paying a cost for animating the skeleton UI for faster startups.
Slow startups don't seem to be affected, given the data available. This is
likely due to slow startups being dominated by IO.

Differential Revision: https://phabricator.services.mozilla.com/D104118
2021-02-05 16:43:02 +00:00
Bogdan Tara 2b67cce4bf Bug 1690898 - correct expectation to fail on windows CLOSED TREE 2021-02-05 19:48:16 +02:00
André Bargull 16bcc81210 Bug 1689990 - Part 23: Assert MBasicBlock::NewPopN() is only used for Warp compilation. r=jandem
Empty bytecode sites are typically only used for Wasm compilation. Assert this
in `MBasicBlock::NewPopN()` and document this in `BytecodeSite`.

(*) The only exception are fake OSR blocks in GVN.

Differential Revision: https://phabricator.services.mozilla.com/D103660
2021-02-05 16:11:20 +00:00
André Bargull 4ae22e26d1 Bug 1689990 - Part 22: Ensure tracked bytecode sites are consistent. r=jandem
A `MDefinition`'s tracked bytecode site is always equal to the bytecode site
of its block. Assert this property so we can remove `MDefinition::trackedSite_`
in a follow-up bug.

Differential Revision: https://phabricator.services.mozilla.com/D103659
2021-02-05 16:11:20 +00:00
André Bargull 0d94d601f3 Bug 1689990 - Part 21: Tracked inline script trees are always present when Warp-compiling. r=jandem
Warp compilation always has a tracked bytecode site, so instead of testing if
the bytecode site's tree is non-null, test if we're currently Warp (= not Wasm)
compiling. This should make it easier to understand this code.

Differential Revision: https://phabricator.services.mozilla.com/D103658
2021-02-05 16:11:20 +00:00
André Bargull ae1f04e4bf Bug 1689990 - Part 20: Assert MDefinition::trackedSite() returns a non-nullptr. r=jandem
Part 18 ensured each definition which is attached to a block has a non-nullptr
tracked bytecode site. (This is ensured through `setTrackedSite()` which asserts
the tracked bytecode site isn't a nullptr.)

Drive-by change:
- Change `CodeGeneratorShared::encode()` to store `ins->mirRaw()` in a variable.

Differential Revision: https://phabricator.services.mozilla.com/D103657
2021-02-05 16:11:20 +00:00
André Bargull 2eaf571239 Bug 1689990 - Part 19: Remove MDefinition::tracked{Tree, Pc}() in favour of keeping just MDefinition::trackedSite(). r=jandem
Remove `MDefinition::tracked{Tree, Pc}()` in preparation for the next parts.

Differential Revision: https://phabricator.services.mozilla.com/D103656
2021-02-05 16:11:19 +00:00
André Bargull 22a34ba265 Bug 1689990 - Part 18: Split MDefinition::setBlock() into separate methods for instructions and phi nodes. r=jandem
Add a separate `MDefinition::setInstructionBlock()` method which also sets the
tracked bytecode site. `setTrackedSite()` is now only called from within
`MDefinition`, so its visibility can be changed to `private`.

With this change it's easier to see that all definitions attached to a block
also have a tracked bytecode site. We will use this property in the next parts.

Differential Revision: https://phabricator.services.mozilla.com/D103655
2021-02-05 16:11:19 +00:00
André Bargull d38315fdae Bug 1689990 - Part 17: Remove MResumePoint::setBlock(). r=jandem
This method is never called.

Differential Revision: https://phabricator.services.mozilla.com/D103654
2021-02-05 16:11:19 +00:00
André Bargull ca732b5e9b Bug 1689990 - Part 16: Move assertions to the top of addNativeToBytecodeEntry(). r=jandem
These assertions should hold even when profiling isn't enabled.

Differential Revision: https://phabricator.services.mozilla.com/D103653
2021-02-05 16:11:19 +00:00
André Bargull 9ed6097021 Bug 1689990 - Part 15: Assert "MBasicBlock::trackedSite_" is non-nullptr. r=jandem
After part 13, `MBasicBlock::trackedSite_` is never modified outside of the
constructor. And because all call-sites pass a non-nullptr, we can assert this
and remove the nullptr check in `trackedTree()`.

Differential Revision: https://phabricator.services.mozilla.com/D103652
2021-02-05 16:11:18 +00:00
André Bargull da2a0fa8b4 Bug 1689990 - Part 14: Remove MBasicBlock::pc_. r=jandem
`MBasicBlock::pc_` is initialised with `MBasicBlock::trackedSite_`'s `pc` and
after the last part `MBasicBlock::trackedSite_` is never changed after the
constructor, so we can replace `pc_` with `trackedSite_->pc()`.

Differential Revision: https://phabricator.services.mozilla.com/D103651
2021-02-05 16:11:18 +00:00
André Bargull 50d510c4e1 Bug 1689990 - Part 13: Remove MBasicBlock::{updateTrackedSite,trackedPc}(). r=jandem
Both methods are no longer used. Also move the comment from `updateTrackedSite()`
to `trackedSite_`.

Differential Revision: https://phabricator.services.mozilla.com/D103650
2021-02-05 16:11:18 +00:00
André Bargull 18bbcb73ff Bug 1689990 - Part 12: Update a comment for MDefinition/MInstruction copy constructors. r=jandem
The copy constructors call `MNode(const MNode&)` which copies over the
`blockAndKind_` member, so the `block` information is actually copied, too.

Differential Revision: https://phabricator.services.mozilla.com/D103648
2021-02-05 16:11:18 +00:00
André Bargull 08df43ca83 Bug 1689990 - Part 11: Align type checks in MToInt64 with MToBigInt. r=jandem
`MToInt64` seems to allow `Int64` inputs based on the comments in
`LIRGenerator::visitToInt64()`.

Also remove `MIRType::String` from the list of non-throwing types, because
`ToBigInt(string)` can actually throw a SyntaxError. This change can't be
tested, because we currently create neither `MToBigInt` nor `MToInt64` in a
context where the input is a string and the result isn't observed.

Differential Revision: https://phabricator.services.mozilla.com/D103647
2021-02-05 16:11:17 +00:00
André Bargull 115fd4537e Bug 1689990 - Part 10: Remove no longer necessary limitation around Int64 in MDefinition::definitelyType(). r=jandem
`Int64` wasn't allowed because typesets couldn't represent this type.

Differential Revision: https://phabricator.services.mozilla.com/D103646
2021-02-05 16:11:17 +00:00
André Bargull 595a2a31d0 Bug 1689990 - Part 9: Remove unused enums BarrierKind and ReprotectCode. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D103645
2021-02-05 16:11:17 +00:00
André Bargull 896cad69c0 Bug 1689990 - Part 8: Remove unused CompileInfo methods. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D103644
2021-02-05 16:11:17 +00:00
André Bargull 4d0716ec51 Bug 1689990 - Part 7: Remove unused AbortReason enum constants. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D103643
2021-02-05 16:11:16 +00:00
André Bargull 7d889eca5b Bug 1689990 - Part 6: Remove MDefinition::neverHoist(). r=jandem
Currently never overridden in any sub-classes, so we can it remove again.

Differential Revision: https://phabricator.services.mozilla.com/D103642
2021-02-05 16:11:16 +00:00
André Bargull 13b243b753 Bug 1689990 - Part 5: Remove InlineScriptTree::outermostCaller(). r=jandem
Another unused method.

Differential Revision: https://phabricator.services.mozilla.com/D103641
2021-02-05 16:11:16 +00:00
André Bargull a2798e1021 Bug 1689990 - Part 4: Remove OutOfLineCode::{pc,script}(). r=jandem
Both methods are only used within a single assertion in `CodeGeneratorShared::addOutOfLineCode()`.

Differential Revision: https://phabricator.services.mozilla.com/D103640
2021-02-05 16:11:15 +00:00
André Bargull fb4c8ec3cd Bug 1689990 - Part 3: Remove MDefinition::profilerLeavePc(). r=jandem
This method isn't used anymore after part 1.

Differential Revision: https://phabricator.services.mozilla.com/D103639
2021-02-05 16:11:15 +00:00
André Bargull b061cf93f3 Bug 1689990 - Part 2: Use LInstruction* for LElementVisitor::ins_. r=jandem
Use `LInstruction*` instead of `LNode*` for clarity and to match the method
name of `LElementVisitor::instruction()`.

Differential Revision: https://phabricator.services.mozilla.com/D103638
2021-02-05 16:11:15 +00:00
André Bargull 9428e95c5e Bug 1689990 - Part 1: Remove jsbytecode tracking from LElementVisitor. r=jandem
Also move `LNode` tracking under `TRACK_SNAPSHOTS`, so the compiler can more
easily optimise this code away when `TRACK_SNAPSHOTS` isn't set.

Differential Revision: https://phabricator.services.mozilla.com/D103637
2021-02-05 16:11:14 +00:00
harry 094ac488ae Bug 1655403 - Add a test for Bug 1653436. r=mak
This test fails on https://hg.mozilla.org/mozilla-central/rev/138e7b575614cbfc1e45576a15825f51cb6e6614, which still suffered from bug 1653436.

Differential Revision: https://phabricator.services.mozilla.com/D104108
2021-02-05 16:50:28 +00:00
André Bargull 6770cac118 Bug 1669181 - Part 73: Replace an include with a forward declaration in jit/InlinableNatives.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D103671
2021-02-05 15:44:16 +00:00
André Bargull 479ef2d7d3 Bug 1669181 - Part 72: Remove unused includes and forward declarations from jit/ExecutableAllocator.h. r=jandem
Also add the missing include for "mozilla/XorShift128PlusRNG.h" to "vm/Runtime.h".

Differential Revision: https://phabricator.services.mozilla.com/D103670
2021-02-05 15:37:46 +00:00
André Bargull ed5107722d Bug 1669181 - Part 71: Remove no longer needed includes to mozilla/Attributes.h. r=jandem
"mozilla/Attributes.h" was previously only included for `MOZ_MUST_USE`, so we no
longer need the include after switching to use `[[nodiscard]]`.

Differential Revision: https://phabricator.services.mozilla.com/D103669
2021-02-05 15:36:56 +00:00
Andrew Osmond 216f28ace5 Bug 1691065 - Discard invalid resource update transactions due to namespace changes. r=jrmuizel
When we change the namespace, we discard all cached resources and their
associated keys from the WebRender cache. As such if any transaction
comes in with the old namespace ID, we can safefully discard the entire
update, since we will need to recreate any that we are using anyways.

This patch also adds new asserts to ensure we never get old namespace
IDs for individual keys in a valid resource update. This should never
happen in practice.

Differential Revision: https://phabricator.services.mozilla.com/D104236
2021-02-05 16:32:53 +00:00
Mitchell Hentges 95beb2c204 Bug 1688606: Improve moz-phab finding to avoid "moz-phab-script.py" r=firefox-build-system-reviewers,sheehan,glandium
On Windows, when `moz-phab` is installed, two "executable" files are
created:

* moz-phab.exe
* moz-phab-script.py

Our `moz-phab.exe` detection was choking on `moz-phab-script.py` and was
unsure which of the two to use.

Differential Revision: https://phabricator.services.mozilla.com/D103834
2021-02-05 16:39:59 +00:00
Brad Werth b49d5e5635 Bug 1669840 Part 3: Update test expectations. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D103938
2021-02-04 22:50:43 +00:00
Brad Werth 78d0e5055a Bug 1669840 Part 2: Make nsImageRenderer::BuildWebRenderDisplayItems premultiply alpha with provided opacity. r=miko,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D103130
2021-02-04 22:50:23 +00:00
Miko Mynttinen 26da39a7f7 Bug 1669840 - Allow applying opacity to nsDisplayBackgroundImage items r=jrmuizel,mstange
Differential Revision: https://phabricator.services.mozilla.com/D92941
2021-02-04 22:50:07 +00:00
Andrei Oprea cbdcbcc005 Bug 1689563 - Ensure ExperimentAPI can be used without try/catch r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D103931
2021-02-05 16:21:12 +00:00
Simon Giesecke 68963cb062 Bug 1685677 - Extract functions from EnsureStorageIsInitialized. r=dom-workers-and-storage-reviewers,janv
Differential Revision: https://phabricator.services.mozilla.com/D101183
2021-02-05 16:17:47 +00:00
Ryan Hunt 481e12d80f Bug 1689273 - Remove expiring JS and wasm probes. r=lth
This commit removes the expiring probes:
 * wasm.compile_time_baseline_us
 * wasm.compile_time_cranelift_us
 * wasm.compile_time_ion_us
 * js.run_time_us

Execution runtime is still measured in the JS interpreter for still
active probes.

Differential Revision: https://phabricator.services.mozilla.com/D104143
2021-02-05 15:04:14 +00:00
Bogdan Tara bbc8af695c Backed out 3 changesets (bug 1690472, bug 1690469, bug 1690468) for browser_Troubleshoot.js failures CLOSED TREE
Backed out changeset a8552dfa3009 (bug 1690469)
Backed out changeset dccc9af2fd2d (bug 1690468)
Backed out changeset 3f2817c73dff (bug 1690472)
2021-02-05 18:15:26 +02:00
yulia ec9af4d409 Bug 1665330 - If a script is a module, increment the IgnoreDestructiveWrites counter r=hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D99898
2021-02-05 11:00:23 +00:00
Nika Layzell 646fdbd459 Bug 1681529 - Part 12: Use rootURI for talos-powers frame script instead of baseURI, r=kmag,perftest-reviewers
The baseURI is a moz-extension: URI, which does not support being loaded
synchronously from a content process, as framescripts are.

This patch does not attempt to prohibit future synchronous uses of
moz-extension: URIs, as that is outside of the scope of this issue, but we
should likely do so in a follow-up.

Differential Revision: https://phabricator.services.mozilla.com/D104081
2021-02-05 16:06:23 +00:00
Nika Layzell 6720e65c4e Bug 1681529 - Part 11: Avoid using DelayedStart when serialzing the reply from SendOpenStream, r=asuth
Streams serialized with the default nsIInputStream serializer will be serialized
with delayedStart, meaning that when sent from the parent process to the content
process it will be serialized as a RemoteLazyInputStream.

In the specific case of SendOpenStream this causes issues, as the content
process code depends on the synchronous nature of nsIFileInputStream to allow it
to be wrapped in a SnappyUncompressInputStream, which requires a sync stream.

Relying on this property is not generally correct and only works because we know
only nsFileInputStream will be sent by the parent process. Other types of sync
streams may be received as async if they are sufficiently large, such as
nsStringInputStream.

Differential Revision: https://phabricator.services.mozilla.com/D103227
2021-02-04 18:13:22 +00:00
Nika Layzell daf01f9769 Bug 1681529 - Part 10: Set StartedReading after calling SetData, r=baku,necko-reviewers,valentin
SetData will check that `mStartedReading` has not been set yet to ensure the
stream is in a non-partially-read state. This can lead to assertion failures
when sending a stream not seeked to the beginning over IPC.

Differential Revision: https://phabricator.services.mozilla.com/D103226
2021-02-04 18:13:19 +00:00
Nika Layzell 9467aebdbf Bug 1681529 - Part 9: Add a basic test for the seekable stream wrapper, r=baku
This basic GTest exercises some of the basic functionality of the
SeekableStreamWrapper when applied to a nsPipe.

Differential Revision: https://phabricator.services.mozilla.com/D101808
2021-02-04 18:13:17 +00:00
Nika Layzell 6adb3968d9 Bug 1681529 - Part 8: Handle clones of closed nsPipeInputStreams, r=baku
Previously if `Clone()` was called on a closed nsPipeInputStream, it could cause
crashes due to the already-closed nsPipeInputStream being added to mInputList,
violating internal nsPipe invariants. Skipping adding the stream to that list
should avoid this edge-case, as the pipe is already closed.

Differential Revision: https://phabricator.services.mozilla.com/D101807
2021-02-04 18:13:14 +00:00
Nika Layzell 9de178dfae Bug 1681529 - Part 7: Wrap the inner streams in a nsMIMEInputStream to make them seekable, r=baku,necko-reviewers,dragana
nsMIMEInputStream has a requirement that the inner nsIInputStream object
implement nsISeekableStream, which is usually enforced by the SetData method.
This check was bypassed by the Deserialize method, which unfortunately meant
that non-seekable IPC payloads could end up within a nsMIMEInputStream when sent
from another process (e.g. due to large nsStringStreams being serialized as
nsPipes over IPC).

This patch uses the SeekableStreamWrapper introduced in the previous patch to
wrap the inner stream when deserializing nsMIMEInputStream, avoiding the
previously mentioned issue.

Differential Revision: https://phabricator.services.mozilla.com/D101806
2021-02-04 18:13:12 +00:00
Nika Layzell 82b549eebb Bug 1681529 - Part 6: Introduce a SeekableStreamWrapper to make pipes seekable, r=baku
This patch introduces a new SeekableStreamWrapper class which handles adapting
nsIInputStreams which support being cheaply cloned using nsICloneableInputStream
into seekable input streams by operating on a clone of the original stream, and
re-cloning that stream when seeking backwards.

This wrapper is generally intended to be used with nsPipeInputStream as that
type supports both a fairly cheap clone operation, and keeping a large internal
buffer which is fairly cheap to seek using this method, but should also work
with other types such as RemoteLazyInputStream or nsStringStream.

An alternate strategy was considered where nsPipe was given internal support for
a mSeekable flag to be set on creation. This flag would then have a similar
effect, except with additional optimizations due to being visible within the
implementation of the nsPipe, rather than relying on an unadvanced
nsPipeInputStream to keep the buffer alive.

I ended up choosing this approach instead for a few reasons:

 * The seekable adapter can be applied to an already-created nsPipeInputStream,
   such as one received from IPC. With the nsPipe approach, making an IPC stream
   seekable either requires telling IPCStreamDestination to use a seekable pipe
   ahead of time, or performing a NS_AsyncCopy from the IPC-provided pipe into a
   different seekable pipe, which is likely wasted effort and would prevent
   optimizations such as RemoteLazyInputStream and DelayedStart streams.
 * The adapter can support other features of the underlying stream, such as
   nsIInputStreamLength, without resorting to adding additional adapter layers
   on top of the returned nsPipe.
 * The performance is unlikely to be substantially different in the most common
   case, which is using Seek(NS_SEEK_SET, 0) to return to the beginning of the
   stream.
 * Less additional complexity is added to the already-complicated internals of
   nsPipe, and instead it is kept in a separate wrapper stream, which is easier
   to review.

Using nsStorageStream, as is used by EnsureUploadStreamIsCloneable, was also
considered, but was rejected as it has similar problems to the seekable nsPipe
approach and also doesn't implement nsIAsyncStream, meaning that one must wait
for the NS_AsyncCopy to be completed before reading the stream.

It may actually be possible to replace the existing uses of nsStorageStream with
a wrapped nsPipe in the future, but that is left as follow-up material, and may
have memory overhead implications due to nsPipe not resizing the final segment,
unlike nsStorageStream.

Differential Revision: https://phabricator.services.mozilla.com/D101805
2021-02-04 18:13:09 +00:00
Nika Layzell c2f2f90cca Bug 1681529 - Part 5: Serialize `nsIInputStream` over IPC with aDelayedStart by default, r=baku
The current set of cases where a nsIInputStream is directly serialized over IPC
is fairly limited, and includes cases where the IPDL struct may be directly
stored within a content process, having the nsIInputStream left unused.

By switching this serialization to DelayedStart, we can avoid performing
unnecessary streaming copies of IPC data when sending postdata streams related
to session history and document navigation, while also avoiding issues like this
coming up again due to delayed start being the default.

Differential Revision: https://phabricator.services.mozilla.com/D101804
2021-02-04 18:13:07 +00:00
Nika Layzell 2f708ea97a Bug 1681529 - Part 4: Serialize aDelayedStart streams from parent to child as RemoteLazyInputStreams, r=baku
When aDelayedStart is specified, if the created IPCStream contains an internal
IPC stream actor, an actor is used under the hood to send raw data between
processes when needed. This is usually done to reduce overhead in cases where
the target process may not use the nsIInputStream immediately, if at all.

By switching to using RemoteLazyInputStream when sending DelayedStart actors
from parent to content, the amount of data sent in the initial payload is
reduced even further, and the stream is optimized to allow sending it back to
the parent process without streaming the data through the content process again.

Normal delayed start streams are still used when sending payloads from other
processes, as RemoteLazyInputStream is only supported for nsIInputStreams
originating in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D101803
2021-02-04 18:13:05 +00:00
Nika Layzell 93bfa66c31 Bug 1681529 - Part 3: Apply InputStreamLengthWrapper after DelayedStartInputStream, r=baku
Previously, we would apply the InputStreamLengthWrapper before
DelayedStartInputStream, which meant that a stream serialized with aDelayedStart
would not correctly implement nsIInputStreamLength. By inverting the order of
these wrappers, the nsIInputStreamLength implementation is visible, without
impacting the functionality of the DelayedStartInputStream wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D101802
2021-02-04 18:12:57 +00:00