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

20773 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 4234a7dca4 Bug 1689394 - Make updating tracing context information unconditional on the tracer kind r=sfink
One thing we have to do when tracaing is udpate context information (e.g. edge name) if the tracer is a kind that requires it. It's simpler and more efficient to give all tracers this context and perform an unconditional write to the stack.

Mostly we can get away without saving/restoring context information too. This adds AutoClearTracingContext for the one place we need to do this because of nested use of the same tracer while tracing something else.

Differential Revision: https://phabricator.services.mozilla.com/D103500
2021-01-30 11:21:28 +00:00
Mike Hommey 504ef77af2 Bug 1686831 - Handle trailing zero removal in double-conversion. r=nika,jwalden,Gankra
Bug 608915 switched nsString::AppendFloat to double-conversion, while
handling trailing zero removal on its own. This can be made more
effectively when doing so in double-conversion itself, support for which
was merged upstream in https://github.com/google/double-conversion/pull/149.

This makes the used_exponential_notation outparam unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D102698
2021-01-29 04:25:53 +00:00
Jan Varga 6543a55a77 Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika
nsBaseHashtable now supports non-default-constructible DataType and
UserDataType, however not all methods can be instantiated.  All methods which
can't be instantiated with non-default-constructible DataType or UserDataType
are now described as such in method definitions.

The public API of PLDHashTable and nsBaseHashtable/nsDataHashtable was changed:
- A new method PLDHashTable::WithEntryHandle has been added. It allows to use a
  custom function for entry initialization (instead of the global hook).
- A new method nsBaseHashtable::MaybeGet has been added.
- A new overload nsBaseHashtable::Remove has been added.
- The nsDataHashtable::GetAndRemove method has been pulled up to
  nsBaseHashtable.

In addition, the following implementation details have changed:

PLDHashTable:
- The code from the Add method has been split into MakeEntryHandle and a helper
  object called EntryHandle. The Add method is now implemented on top of that.

nsTHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- The InitEntry hook is no longer used. Instead of using the hook, PutEntry
  methods now use nsTHashtable::WithEntryHandle instead of PLDHashTable::Add.
  This change allows to do custom initialization in derived classes.

nsBaseHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- Put methods no longer use nsTHashtable::PutEntry, they now use the new method
  nsBaseHashtable::WithEntryHandle.

Differential Revision: https://phabricator.services.mozilla.com/D99428
2021-01-29 08:39:40 +00:00
Brindusan Cristian 3819b1c1cc Backed out changeset 6ecaa139c502 (bug 1681469) for gtest AddressSanitizer failures. CLOSED TREE 2021-01-29 06:53:39 +02:00
Masayuki Nakano 5d24a92232 Bug 1689034 - part 3: Get rid of keyboard events on plugins r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103140
2021-01-28 07:48:15 +00:00
Masayuki Nakano 796bb2f86e Bug 1689034 - part 1: Get rid of communication part between plugin process and widget in the main process r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D103138
2021-01-28 08:23:33 +00:00
Jan Varga 4ab8759533 Bug 1681469 - Allow nsBaseHashtable to work with a non-default-constructible/non-movable DataType; r=nika
nsBaseHashtable now supports non-default-constructible DataType and
UserDataType, however not all methods can be instantiated.  All methods which
can't be instantiated with non-default-constructible DataType or UserDataType
are now described as such in method definitions.

The public API of PLDHashTable and nsBaseHashtable/nsDataHashtable was changed:
- A new method PLDHashTable::WithEntryHandle has been added. It allows to use a
  custom function for entry initialization (instead of the global hook).
- A new method nsBaseHashtable::MaybeGet has been added.
- A new overload nsBaseHashtable::Remove has been added.
- The nsDataHashtable::GetAndRemove method has been pulled up to
  nsBaseHashtable.

In addition, the following implementation details have changed:

PLDHashTable:
- The code from the Add method has been split into MakeEntryHandle and a helper
  object called EntryHandle. The Add method is now implemented on top of that.

nsTHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- The InitEntry hook is no longer used. Instead of using the hook, PutEntry
  methods now use nsTHashtable::WithEntryHandle instead of PLDHashTable::Add.
  This change allows to do custom initialization in derived classes.

nsBaseHashtable:
- A new (non-public) API for WithEntryHandle has been added.
- Put methods no longer use nsTHashtable::PutEntry, they now use the new method
  nsBaseHashtable::WithEntryHandle.

Differential Revision: https://phabricator.services.mozilla.com/D99428
2021-01-28 20:58:58 +00:00
Nika Layzell 0ee45e6357 Bug 1689182 - Collect content memory telemetry from the parent process, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D103239
2021-01-28 19:48:03 +00:00
Jon Coppeard 681a1c23e1 Bug 1689140 - Refactor SliceBudget API r=sfink
This patch does several things:
 - make the counter type int64_t like the work budget parameter (the original purpose of this bug)
 - simplify implementation by using a Variant to discriminate between different kinds of budget
 - remove the global initialization
 - remove makeUnlimited() (and replace uses with assignment from SliceBudget::unlimited())
 - add convenience methods to get the original budget parameters
 - add basic API tests

The use of Variant had the consequence that we now have to pass SliceBudget by reference now to make the linter happy.

Differential Revision: https://phabricator.services.mozilla.com/D103318
2021-01-28 19:11:42 +00:00
Caroline Cullen 0290536aaa Bug 1688768 - Enable full shutdown when JS_STRUCTURED_SPEW is enabled. r=sfink
Differential Revision: https://phabricator.services.mozilla.com/D103221
2021-01-27 23:40:35 +00:00
Csoregi Natalia 8db3ebb5da Backed out 9 changesets (bug 1686831) for sanitizer failures on nsTSubstring.cpp. CLOSED TREE
Backed out changeset 0e03d508c8d4 (bug 1686831)
Backed out changeset cf6dd6eab427 (bug 1686831)
Backed out changeset 308000f1e14b (bug 1686831)
Backed out changeset c4d470be0184 (bug 1686831)
Backed out changeset 9751918b1ccb (bug 1686831)
Backed out changeset dd9b7e71dcfb (bug 1686831)
Backed out changeset 486a184530a7 (bug 1686831)
Backed out changeset b64d3e89bf68 (bug 1686831)
Backed out changeset dcc6396e455a (bug 1686831)
2021-01-28 09:55:28 +02:00
Mike Hommey 411ab98ac3 Bug 1686831 - Handle trailing zero removal in double-conversion. r=nika,jwalden,Gankra
Bug 608915 switched nsString::AppendFloat to double-conversion, while
handling trailing zero removal on its own. This can be made more
effectively when doing so in double-conversion itself, support for which
was merged upstream in https://github.com/google/double-conversion/pull/149.

This makes the used_exponential_notation outparam unnecessary.

Differential Revision: https://phabricator.services.mozilla.com/D102698
2021-01-27 01:06:34 +00:00
Andrew McCreight 1aac9cb98a Bug 1571186 - Disable TestExpirationTracker on debug OSX for frequent failures. r=KrisWright
Apparently this test has a history of failures, and it recently
started failing frequently for no apparent reason.

Differential Revision: https://phabricator.services.mozilla.com/D103116
2021-01-26 22:43:58 +00:00
Florian Quèze f447ef94de Bug 1688300 - Add 'Runnable' profiler markers showing when runnables are executed and a 'Task' label frame showing which tasks are started by TaskController, r=bas,gerald.
Differential Revision: https://phabricator.services.mozilla.com/D102803
2021-01-26 08:57:19 +00:00
Nick Alexander 3d0d39d82c Bug 1675848 - Part 2: Add "BackgroundTasksSelector" to static component category registration. r=mhentges,nika
For simplicity, this implements just on in `NO_TASKS` (the default) or
on in `ALL_TASKS` (opt-in).  This disables all category registrations
when in background task mode; we'll selectively re-enable things as
appropriate.

The flag constants were chosen to smoothly extend to a (16-)bit set in
the future, should we want to add a `JUST_TASKS("task", "other-task")`
option in the future.

This also adds ython tests for gen_static_components.py exercising
categories, simply 'cuz it's easiest to see what this adds in such
tests.  Functional tests will follow in patches that actually
implement the new background tasks functionality.

Differential Revision: https://phabricator.services.mozilla.com/D96654
2021-01-25 23:44:49 +00:00
Nick Alexander dc4f42262e Bug 1675848 - Part 1: Add "backgroundtask" filter to chrome manifest parsing. r=mossop,kmag
This allows to filter chrome manifest registration by the current
background task(s, in the future).  Filtration behaves just like
filtering by "application":

* filter with `backgroundtask=` means disable for all background
  tasks, since no background task will match ""

* filter with `backgroundtask!=` means enable for all background task,
  since every background task will not match ""

Differential Revision: https://phabricator.services.mozilla.com/D96482
2021-01-25 23:44:46 +00:00
Doug Thayer 8c0dd1bca6 Bug 1510226 - Do not block main thread in nsThread::Init r=froydnj,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D41248
2021-01-25 21:44:15 +00:00
Csoregi Natalia d97e4efd8e Backed out 9 changesets (bug 1681529) for causing bustage on TestSeekableStreamWrapper.cpp. CLOSED TREE
Backed out changeset 99d1c9682dc2 (bug 1681529)
Backed out changeset b562b6038855 (bug 1681529)
Backed out changeset 5a5f514a6cfe (bug 1681529)
Backed out changeset ceb55436928a (bug 1681529)
Backed out changeset 9852de883959 (bug 1681529)
Backed out changeset 1a33ea8b533d (bug 1681529)
Backed out changeset 3385635e9521 (bug 1681529)
Backed out changeset 49c28bfc4da4 (bug 1681529)
Backed out changeset 43cc14af229d (bug 1681529)
2021-01-25 23:40:44 +02:00
Nika Layzell 16dcb71f07 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-01-20 16:17:39 +00:00
Nika Layzell 85511dac91 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-01-20 16:18:17 +00:00
Nika Layzell aced9c0ee0 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-01-20 16:19:50 +00:00
Butkovits Atila f6b5550998 Merge mozilla-central to autoland. CLOSED TREE 2021-01-25 19:37:13 +02:00
Mozilla Releng Treescript bf417b8399 Update configs. IGNORE BROKEN CHANGESETS CLOSED TREE NO BUG a=release ba=release 2021-01-25 15:42:01 +00:00
Tom Schuster 25bf0bbc2a Bug 1619947 - Make MozPromise::All work correctly with const r=bwc
Depends on D97854

Differential Revision: https://phabricator.services.mozilla.com/D102824
2021-01-25 15:34:29 +00:00
Markus Stange c07fa1f602 Bug 1688308 - Add a marker for "Perform microtasks". r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102804
2021-01-22 21:43:16 +00:00
Masatoshi Kimura 15f341b1ca Bug 1686863 - Evaluate xpidl constant values more eagerly. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D101927
2021-01-22 03:40:53 +00:00
Emilio Cobos Álvarez 505c441303 Bug 1572798 - Make content browsing contexts for tabs start as inactive. r=nika
Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.

Differential Revision: https://phabricator.services.mozilla.com/D42329
2021-01-21 20:20:57 +00:00
Connor Sheehan b298e2e1a1 Bug 1687947: keep `Atom` declarations on a single line and exclude from `black` formatting r=hsivonen
These lines are parsed by the `htmlparser` and are expected to be on a single
line. The `black` reformat has moved some of these definitions to multiple lines
due to line length. This commit moves all declarations back to a single line and
adds `fmt: {off,on}` statements so they will be ignored in future reformats.

Differential Revision: https://phabricator.services.mozilla.com/D102626
2021-01-21 18:00:16 +00:00
Cosmin Sabou c2cbf590a6 Backed out changeset 975f6057245a (bug 1572798) for turning bug 1511706 to perma. CLOSED TREE 2021-01-21 21:35:33 +02:00
Emilio Cobos Álvarez a713e37be6 Bug 1572798 - Make content browsing contexts for tabs start as inactive. r=nika
Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.

Differential Revision: https://phabricator.services.mozilla.com/D42329
2021-01-21 17:40:12 +00:00
Kris Wright e5aed0986a Bug 1607138 - gXPCOMThreadsShutdown should be atomic r=xpcom-reviewers,mccr8
This commit makes `gXPCOMThreadsShutdown` atomic. I've deliberated on this one for a while because I was mostly interested in how timer threads may be trying to init during shutdown, but these aren't the only places where we are making accesses into `gXPCOMThreadsShutdown` so it should be made atomic regardless.

Differential Revision: https://phabricator.services.mozilla.com/D102486
2021-01-21 01:01:26 +00:00
Emilio Cobos Álvarez e3b4492853 Bug 1686613 - Add a non-native-theme media query. r=heycam
Differential Revision: https://phabricator.services.mozilla.com/D102457
2021-01-21 06:14:16 +00:00
Mats Palmgren b41a2b9d21 Bug 1687239 part 2 - Remove plugin support from layout/. r=emilio
Note that there's still a little plugin related code in
widget/ and gfx/ etc after this.  That can be removed
once we remove plugin support from dom/ etc.
The removal from layout/ should be pretty complete though.

Differential Revision: https://phabricator.services.mozilla.com/D102140
2021-01-25 11:53:49 +00:00
Dorel Luca f3c332c453 Backed out 2 changesets (bug 1572798) for multiple failures. CLOSED TREE
Backed out changeset cfdebb863454 (bug 1572798)
Backed out changeset f2d3a6800638 (bug 1572798)
2021-01-20 00:15:48 +02:00
Bas Schouten c30efd3e32 Bug 1685727: Ensure all the thread pool task queue has been cleared before shutting down. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102327
2021-01-19 19:36:29 +00:00
Bas Schouten f346ba1851 Bug 1686222: Ensure proper thread is woken up when a new task is posted. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D102324
2021-01-19 17:15:57 +00:00
Emilio Cobos Álvarez 333b73de84 Bug 1572798 - Make content browsing contexts for tabs start as inactive. r=nika
Otherwise autoplay blocking until-in-foreground breaks with the other
patch in this bug, because it unblocks media playback once a browsing
context is active for the first time.

Differential Revision: https://phabricator.services.mozilla.com/D42329
2021-01-19 19:14:33 +00:00
Simon Giesecke c3f51da721 Bug 1686041 - Map unknown Win32 API error codes to a module of its own in nsLocalFileWin. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D102141
2021-01-19 14:35:03 +00:00
Masatoshi Kimura d15c3a2be1 Bug 1685899 - Fix an infinite loop when a constant identifier is not found. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D101269
2021-01-14 19:42:59 +00:00
Brindusan Cristian 07342ce091 Backed out changeset a4bf5887fc2a (bug 1680402) for being the most likely cause of bug 1686387. a=backout 2021-01-13 06:30:08 +02:00
Jeff Muizelaar b19b4aa8ba Bug 1680402. Use stderr in printf_stderr instead of reopening fd 2. r=glandium
Currently, printf_stderr doesn't show up when running with ./mach run.
This is because we run with -attach-console and that redirects stderr
to a different file descriptor using freopen in UseParentConsole.

The change from just using stderr directly happened in bug 340443 and was done
to avoid some linking issues. That problem doesn't seem to apply anymore so you'd
expect we'd be able to go back to the straightforward implemention that works even
if stderr has been redirected. Unforunately, Windows takes not buffering
stderr very seriously and fprintf will write out the results character
by character. This can cause log output lines to be intermixed which
breaks log parsing in CI. We keep using fdopen to create a new FILE*
that's buffered but instead of hard coding fd 2, we get the actual fd
that corresponds to stderr using fileno.

The mozglue implementation was cargo culted from xpcom, so we update it
as well.

Differential Revision: https://phabricator.services.mozilla.com/D98550
2021-01-12 14:54:48 +00:00
Mitchell Hentges 34e20029c0 Bug 1683213: Don't warn on range-loop-analysis r=sheehan,sg,firefox-build-system-reviewers,andi,glandium
As described in
https://quuxplusone.github.io/blog/2020/08/26/wrange-loop-analysis/
range-loop-analysis warnings sometimes recommend inferior code.

Also removes pragmas that manually disable this warning.

Differential Revision: https://phabricator.services.mozilla.com/D100155
2021-01-11 15:30:45 +00:00
Emilio Cobos Álvarez 2b7ccb7ce1 Bug 1685917 - Remove the moz-focus-outer code. r=heycam
This pseudo does nothing and we successfully removed it in bug 1655859
(firefox 81).

Differential Revision: https://phabricator.services.mozilla.com/D101289
2021-01-11 01:57:17 +00:00
Alexis Beingessner 9a491a3519 Bug 1683730 - Enable full shutdown under tsan. r=decoder
This eliminates all of the thread leaks we had on record, while also increasing
our coverage on the code that's used for testing firefox.

Differential Revision: https://phabricator.services.mozilla.com/D100264
2021-01-08 20:07:04 +00:00
Olli Pettay 2371718010 Bug 1685577 - Disable dom.input_events.canSuspendInBCG.enabled for now, r=sefeng
Differential Revision: https://phabricator.services.mozilla.com/D101051
2021-01-08 12:58:24 +00:00
Simon Giesecke 8b19149c91 Bug 1685052 - Remove unused functions/macros from nsCRT.h. r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D100763
2021-01-05 13:11:28 +00:00
Kartik Gautam 7ae6aea145 Bug 1684173 - Add newline character at end of files when missing r=sylvestre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D100484
2021-01-07 08:53:08 +00:00
longsonr f518393a92 Bug 1518099 - Add support for lighter operator in feComposite r=jrmuizel,emilio
Spec: https://www.w3.org/TR/filter-effects-1/#attr-valuedef-operator-lighter

Lighter is defined in the compositing & blending spec as equivalent to porter-duff plus, https://www.w3.org/TR/compositing-1/#porterduffcompositingoperators_plus.

The 'lighter' composite mode already works in <canvas> (via globalCompositeOperation), and it's the same there.

Chrome implemented support in https://bugs.chromium.org/p/chromium/issues/detail?id=439037

Per https://github.com/w3c/svgwg/issues/424 we should expose the new value in webidl and Chrome uses 7 too (https://codereview.chromium.org/779963002/patch/120001/130009)

Differential Revision: https://phabricator.services.mozilla.com/D100605
2021-01-05 20:49:00 +00:00
Andi-Bogdan Postelnicu 8de41d8d26 Bug 1683561 - Make `accessibility` buildable outside of `unified-build` environment. r=sg
Differential Revision: https://phabricator.services.mozilla.com/D100212
2021-01-05 09:47:12 +00:00
Emilio Cobos Álvarez 5d6e4f2da2 Bug 1684673 - Use an AutoTArray for atom arrays in attributes (class / part). r=smaug
These are never empty, and storing 4 elements inline seems worth it
given we also heap-allocate the array itself.

Depends on D100592

Differential Revision: https://phabricator.services.mozilla.com/D100593
2021-01-04 17:56:33 +00:00