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

20384 Коммитов

Автор SHA1 Сообщение Дата
David Teller b6b4a2fb84 Bug 1652813 - Provide an API to get the resident unique memory of a process without waking it up;r=njn
Differential Revision: https://phabricator.services.mozilla.com/D83623
2020-08-20 13:57:40 +00:00
Chris Fronk 3b7a1daba2 Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj
Adds a new specialization of nsDeque, nsRefPtrDeque for use with
reference counted pointers.

Differential Revision: https://phabricator.services.mozilla.com/D84766
2020-08-22 15:47:59 +00:00
Andrew McCreight 4e95b07530 Bug 1653671 - Add aMinimizeMemoryUsage argument to dumpMemoryReportsToNamedFile(). r=froydnj
This functionality already exists, so it is just a matter of threading
an extra bool around. This patch should not actually change the behavior
anywhere.

The goal of this is to consider using it for AWSY. Currently AWSY
asks every process to minimize memory usage at once, but with
this option the minimization will be batched along with the memory
reports, which should make it less likely to overwhelm the system
when there are a lot of content processes.

Differential Revision: https://phabricator.services.mozilla.com/D87475
2020-08-21 17:11:03 +00:00
Honza Bambas 2bc91fef35 Bug 1657974 - MOZ_LOG schedule and run of `FrameRequestCallback`, r=froydnj
Depends on D86740

Differential Revision: https://phabricator.services.mozilla.com/D86741
2020-08-13 14:41:16 +00:00
Honza Bambas 13026539fa Bug 1657960 - MOZ_LOG schedule and run of `mStyleFlushObservers` and `mLayoutFlushObservers`, r=froydnj
Depends on D86737

Differential Revision: https://phabricator.services.mozilla.com/D86738
2020-08-13 14:41:15 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
Doug Thayer 5f41a2f565 Bug 1658732 - Replace mStartupFinished with TryLock in StartupCache r=froydnj
To be honest, it's still a mystery why we observed a regression in
sessionrestore_no_auto_restore in bug 1658732. The regression won't reproduce
on profiled runs, and the bad recordings happen before the supposedly offending
code ever actually runs. It feels most likely that it is a more or less random
confluence of factors causing a regression; however, 33% is too large of a
number to ignore.

The changes in this patch do not seem to yield the same regression, and they
are arguably more correct anyway. Instead of simply turning off the cache after
startup is finished, we simply avoid blocking waiting for the write from inside
GetBuffer. This way, if the write is not getting in the way of GetBuffer, we
can still benefit from a cached version of whatever it is we're looking for.

Differential Revision: https://phabricator.services.mozilla.com/D87221
2020-08-20 18:37:21 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Mike Hommey bfb7f8610c Bug 1657135 - make arm64 xptcstubs handle both aapcs and apple stack conventions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87049
2020-08-19 13:45:30 +00:00
Nathan Froyd 771807a37c Bug 1657135 - make aarch64 assembly glue suitable for compiling with macOS r=glandium,xpcom-reviewers,nika
Depends on D87007

Differential Revision: https://phabricator.services.mozilla.com/D87008
2020-08-18 07:27:31 +00:00
Mike Hommey b63339255b Bug 1657135 - make arm64 xptcinvoke handle both aapcs and apple stack conventions r=xpcom-reviewers,nika,froydnj
ARM has a common calling standard for all operating systems running on
ARM64, and Apple platforms almost follow it, except for a few rules which
aren't relative to xptcall, plus one significant exception: arguments
spilled to the stack only occupy the space they need to.  So in the common
calling standard, a `uint16_t` would occupy eight bytes when it is passed on
the stack, whereas on Apple platforms, it only occupies two bytes.

Original patch by @froydnj.

Differential Revision: https://phabricator.services.mozilla.com/D87007
2020-08-19 00:01:22 +00:00
Nathan Froyd 968a2e4064 Bug 1657135 - unify integer and floating-point argument allocation r=xpcom-reviewers,nika
Through some sleight-of-hand, we can treat argument allocation in aarch64's
xptcinvoke exactly the same for integer and floating-point arguments.  This
change isn't so important now, but it centralizes the allocation of stack
slots, which is important for making this code handle Apple's calling
conventions.

Depends on D87005

Differential Revision: https://phabricator.services.mozilla.com/D87006
2020-08-19 04:06:29 +00:00
Nathan Froyd 83607c3e88 Bug 1657135 - compile the correct files for xptcall on arm64 macOS r=glandium,xpcom-reviewers,nika
These files will all compile, but things will break at runtime because the
convention for stack arguments is slightly different on Darwin.  We'll fix
that in the next patch or two.

Depends on D87004

Differential Revision: https://phabricator.services.mozilla.com/D87005
2020-08-18 07:25:16 +00:00
Nathan Froyd 68e1fa98db Bug 1657135 - add appropriate Apple-specific syntax bits in aarch64 C stubs r=xpcom-reviewers,nika
These changes are consistent with what we do in other
files (xptcstubs_arm.cpp) and also make everything compile.

Differential Revision: https://phabricator.services.mozilla.com/D87004
2020-08-18 05:53:53 +00:00
Simon Giesecke cfd7d0ea9c Bug 1659923 - Avoid unnecessary copies around Base64Encode. r=xpcom-reviewers,necko-reviewers,froydnj,valentin
This also adds some more variants of Base64Encode and Base64EncodeAppend.

Differential Revision: https://phabricator.services.mozilla.com/D87559
2020-08-19 17:45:16 +00:00
Simon Giesecke 0541f523d9 Bug 1659679 - Unify overflow handling in Base64.cpp encoding functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87461
2020-08-19 10:52:25 +00:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Simon Giesecke 55a58f0a61 Bug 847347 - Ensure that FileReader::GetAsDataURL does not trigger a release-mode assertion failure on large files. r=jstutte,froydnj
We avoid going through Substring which imposes a limit on the string length of
INT32_MAX and failing a MOZ_RELEASE_ASSERT otherwise.

This adds a new `Base64EncodeAppend` function that takes 8-bit char input and
produces 16-bit char output, and appends to an existing string, which is what
we need here to avoid doing a large copy. Base64EncodeHelper is generalized
to accomodate for that.

So in addition to fixing the defect, this also optimizes performance and
memory usage.

Differential Revision: https://phabricator.services.mozilla.com/D87413
2020-08-19 08:11:42 +00:00
Simon Giesecke 6b1b0ed613 Bug 1659950 - Move instead of copy where possible in nsMultiplexInputStream::SerializeInternal. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87574
2020-08-19 12:46:26 +00:00
Mike Hommey edd5d6a9a2 Bug 1658385 - Exclude mach_override code on aarch64 builds for now. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87385
2020-08-19 04:22:15 +00:00
Erik Nordin 943f31b50b Bug 1659875 - Fix Incorrect Assertion In Mutex.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87527
2020-08-19 01:41:24 +00:00
Nika Layzell 4f3ae7b794 Bug 1659720 - Fix name in xpcom authors, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87445
2020-08-18 14:09:51 +00:00
alwu 2f509b85ff Bug 1656398 - part7 : add event handler 'onmetadatachange'. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86628
2020-08-18 06:55:47 +00:00
alwu 0b9d0ae82c Bug 1656398 - part5 : add event handler `onplaybackstatechange`. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D86626
2020-08-18 06:32:59 +00:00
Zeke Medley a591e69aa0 Bug 1591204 - Support forced colors media feature r=emilio
Enabled behind layout.css.forced-colors.enabled pending finalization
of the spec:

<https://drafts.csswg.org/mediaqueries-5/#forced-colors>

Differential Revision: https://phabricator.services.mozilla.com/D87147
2020-08-17 20:50:49 +00:00
Simon Giesecke de65a11548 Bug 1656924 - Simplify nsTArray::Assign copying from another array. r=xpcom-reviewers,nika
nsTArray_Impl::Assign/operator= copying from another array cause code bloat by
using ReplaceElementsAtInternal without exploiting the knowledge that the whole
array is being replaced. Since for many instances of the class template, this
is the only ReplaceElementsAtInternal call being done, this unnecessary bloats
the generated code. Apart from that, it is suboptimal at runtime due to
unnecessary checks.

Furthermore, the implementation of ReplaceElementsAtInternal may unnecessarily
relocate the existing elements before destroying them if the storage needs to
be reallocated. While this could be optimized in ReplaceElementsAtInternal as
well, it is simpler to do so in the specialized AssignInternal that is now
introduced.

Differential Revision: https://phabricator.services.mozilla.com/D86723
2020-08-17 07:02:50 +00:00
Mihai Alexandru Michis fb644eda26 Backed out changeset 5838f8b581ed (bug 1647536) for causing failures in browser_active_mediasession_among_tabs.js
CLOSED TREE
2020-08-14 19:42:51 +03:00
Chris Fronk 8770c8a332 Bug 1647536 - Support ref counted pointers in nsDeque r=froydnj
Adds a new specialization of nsDeque, nsRefPtrDeque for use with
reference counted pointers.

Differential Revision: https://phabricator.services.mozilla.com/D84766
2020-08-14 15:19:48 +00:00
Gerald Squelart 6635ca3144 Bug 1659034 - Only call PROFILER_UNREGISTER_THREAD in nsThread::ThreadFunc if PROFILER_REGISTER_THREAD was called before - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D87050
2020-08-14 10:53:39 +00:00
Nathan Froyd e41e80780c Bug 1658944 - remove cargo-culted .previous comments in xptcall asm; r=xpcom-reviewers,nika
These have been cargo-culted all over the place and they are totally
unnecessary, not to mention potentially confusing.  Let's delete them.

Differential Revision: https://phabricator.services.mozilla.com/D86978
2020-08-13 19:35:28 +00:00
Doug Thayer 66f210cc61 Bug 1656261 - Disable StartupCaching of Omnijar zip central r=froydnj
This is a speculative fix for a crash we're seeing due to xul.css ostensibly
not existing. The theory is that xul.css does in fact exist and the cached
zip central for the omnijar is simply corrupt in some way. If it is corrupt in
this way, then there is a bigger issue, and we need to investigate deeper.

However, the benefit of this approach is that it is a very small and contained
patch which should be simple to uplift.

Differential Revision: https://phabricator.services.mozilla.com/D86829
2020-08-13 17:34:05 +00:00
Emilio Cobos Álvarez 68dd457e8b Bug 1658903 - Remove nsPrintJob::TurnScriptingOn. r=jwatt
This code was there to prevent stuff like bug 424377, but nowadays clone
documents are data documents to begin with, so they can't load scripts.

Differential Revision: https://phabricator.services.mozilla.com/D86948
2020-08-13 12:22:56 +00:00
Nathan Froyd 54e1b28bc8 Bug 1658809 - add non-executable stack markers to aarch64 asm; r=glandium
Noticed this while preparing some other patches, might as well address it.

Differential Revision: https://phabricator.services.mozilla.com/D86850
2020-08-13 11:36:01 +00:00
Simon Giesecke 785473cf85 Bug 1658701 - Stop writing to empty header in MoveConstructNonAutoArray. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D86804
2020-08-12 14:52:18 +00:00
Nathan Froyd eca436fc65 Bug 1658376 - correctly identify arm64 macOS in FileUtils.cpp; r=mccr8
One more architecture that macOS runs on.

Differential Revision: https://phabricator.services.mozilla.com/D86596
2020-08-11 14:09:28 +00:00
Joshua Cranmer 45bfd75f59 Bug 1652354, part 𝋡: Support categories with generic values in static component registration. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85656
2020-08-10 21:16:31 +00:00
Joshua Cranmer 46c84af88a Bug 1652354, part 𝋠: Throw an error if a duplicate CID is seen. r=kmag
The perfecthash module will instead try to sit in an infinite loop, so catching
this early is essential for giving better error messages.

Differential Revision: https://phabricator.services.mozilla.com/D85655
2020-08-07 23:13:53 +00:00
Razvan Maries abf299d7f6 Backed out changeset 60059f7d5c46 (bug 1657663) for perma failures on test_schema_change.js. CLOSED TREE 2020-08-10 22:55:35 +03:00
Keefer Rourke 148dabd639 Bug 1657663: Improve timestamp precision for nsLocalFileUnix r=froydnj,barret
This change updates the unix implementation of nsLocalFile
Set/GetLastModifiedTime methods to improve the precision of file modification
times from a 1 second resolution to a 1 millisecond resolution.

Differential Revision: https://phabricator.services.mozilla.com/D86238
2020-08-10 17:50:23 +00:00
Jorg K d69f318727 Bug 1658210 - Follow-up to bug 1657609: Revert PARAM_BUFFER_COUNT back to 18 for Thunderbird. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D86489
2020-08-09 18:14:50 +00:00
Doug Thayer 4e1e2e3037 Bug 1657205 - Fallibly allocate for StartupCache from Omnijar r=froydnj
This changes the StartupCache::PutBuffer call from Omnijar to use a
fallibly allocated buffer, to reduce OOM crashes. We can/should broaden the
scope of this, but this is a simple initial change to mitigate the OOM
crashed introduced with bug 1627075.

Differential Revision: https://phabricator.services.mozilla.com/D86067
2020-08-07 20:05:59 +00:00
Nathan Froyd 58b325b964 Bug 1657609 - decrease PARAM_BUFFER_COUNT and adjust comment accordingly; r=mccr8
We now use `PARAM_BUFFER_COUNT` for slightly more stuff, so update the
comment describing its two uses.  Experimentation has also shown that we can
decrease the count slightly, which is a tiny tiny win.

Differential Revision: https://phabricator.services.mozilla.com/D86214
2020-08-07 14:42:57 +00:00
Nathan Froyd 87ff812afd Bug 1657609 - delete dynamic allocation of parameter buffers; r=mccr8
Now that we've statically ensured everything fits into the stack-allocated
array(s), we can delete the case that handled dynamic allocation.

Differential Revision: https://phabricator.services.mozilla.com/D86213
2020-08-07 14:42:47 +00:00
Nathan Froyd c4c7337cad Bug 1657609 - statically bound the maximum number of parameters for xpidl methods; r=mccr8
We used to not be able to do something like this, and therefore our xpidl
calling code had to  be fully general.  But now that we know all possible
xpidl methods at build time, we can ensure that the number of parameters
does not exceed some bound.  And we choose that bound to be the maximum
number of stack-allocated parameters our calling code supports.

Differential Revision: https://phabricator.services.mozilla.com/D86212
2020-08-07 18:23:13 +00:00
Nathan Froyd fdd22deff5 Bug 1657609 - share PARAM_BUFFER_COUNT among xptcall implementations; r=mccr8
Everybody uses the same value; we might as well put it in a single place.

Differential Revision: https://phabricator.services.mozilla.com/D86211
2020-08-07 14:06:47 +00:00
Nathan Froyd 1514163283 Bug 1657609 - commonize PARAM_BUFFER_COUNT for PPC Linux; r=mccr8
There's no reason to have a different count depending on whether we have
floating-point registers or not; xpidl functions will have the same number
of parameters regardless.  This change also synchronizes soft-float PPC with
every other architecture.

Differential Revision: https://phabricator.services.mozilla.com/D86210
2020-08-07 14:06:34 +00:00
Emilio Cobos Álvarez be4a7bd00e Bug 1657706 - Forward-declare JSContext in nsrootidl.idl. r=nika
Right now we don't do that so stuff using implicit_jscontext compiles
just by chance.

Differential Revision: https://phabricator.services.mozilla.com/D86249
2020-08-07 16:45:16 +00:00
Simon Giesecke 1a9da56b94 Bug 1653335 - Get rid of MakeSpan functions. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83818
2020-08-07 07:50:04 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00