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

4532 Коммитов

Автор SHA1 Сообщение Дата
Aaron Klotz b392ecef67 Bug 1637452: Part 3 - Fix JNI includes in xpcom; r=froydnj
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75366
2020-05-15 17:04:15 +00:00
Doug Thayer b9c06ee24f Bug 1638062 - Do StartupCache write before lateWriteChecksStage r=froydnj
We already ensure that we finish our write before doing a fast
shutdown, but right now there's just too much noise in the late
write checking telemetry because of this.

Differential Revision: https://phabricator.services.mozilla.com/D75389
2020-05-14 18:58:07 +00:00
Valentin Gosu d986351217 Bug 1624090 - Make it possible to forward rust logging into the Gecko logger r=froydnj
This makes it possible to enable rust logging at runtime using about:networking

Differential Revision: https://phabricator.services.mozilla.com/D73146
2020-05-09 11:24:33 +00:00
Chris Fronk af8a02cc9d Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D72560
2020-05-08 16:24:31 +00:00
Chris Peterson d0449145ba Bug 1635011 - Bump fallback Android version from 6.0.99 to 10.0.99. r=geckoview-reviewers,agi
Chromium's current fallback ("default") Android version is 10.0.99, which is the latest Android major version number with a bugfix patch version number higher than any expected actual release:

https://source.chromium.org/chromium/chromium/src/+/master:base/system/sys_info_android.cc;l=63-69;drc=6d9b68de0b0fb9a64a7bd2d2b6da49f1eaacec43

Depends on D73593

Differential Revision: https://phabricator.services.mozilla.com/D73594
2020-05-05 16:53:45 +00:00
Simon Giesecke 2a7a935311 Bug 1626570 - Improve handling of copying arrays in xpcom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D73624
2020-05-05 11:27:18 +00:00
Nicholas Nethercote 4f86d45835 Bug 1628033 - Add pid to the main process in about:memory. r=erahm
In the tests we now explicitly use "Main Process" (or similar) for the process
name in various places to avoid having to filter out a PID.

Also in `test_aboutmemory[34].xhtml`, the main process entries now appear
first, as they should, because the sorting code now looks for a "Main Process"
prefix, rather than an exact match.

Depends on D72995

Differential Revision: https://phabricator.services.mozilla.com/D73164
2020-04-30 21:20:23 +00:00
Eric Rahm 46564057be Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika'
`nsAutoPtr` has been deprecated for 6 years. All remaining references are gone and it can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D72930
2020-04-29 17:28:06 +00:00
Bogdan Tara 8779e89d94 Backed out changeset eeaa8ec71789 (bug 1610067) for bustages complaining about nsAutoPtr.h CLOSED TREE 2020-04-29 18:57:30 +03:00
Eric Rahm 0e773321c4 Bug 1610067 - Remove nsAutoPtr. r=xpcom-reviewers,nika'
`nsAutoPtr` has been deprecated for 6 years. All remaining references are gone and it can now be removed.

Differential Revision: https://phabricator.services.mozilla.com/D72930
2020-04-28 23:45:51 +00:00
Jon Coppeard 24c9e5618f Bug 1626322 - Add an API to get the zone of a possibly-nursery allocated GC thing and use it in CheckZoneTracer r=sfink,mccr8
Previously CheckZoneTracer didn't take account of the fact that BigInts can be nursery allocated.

Differential Revision: https://phabricator.services.mozilla.com/D72891
2020-04-28 22:26:59 +00:00
Jon Coppeard 4452987eb3 Bug 1633468 - Make dom/bindings/Codegen.py compare against JSID_VOID to detect uninitialized jsid members r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D72701
2020-04-28 18:12:12 +00:00
Peter Van der Beken 9a935f4bd4 Bug 1632802 - Remove nsAgg.h. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D72359
2020-04-27 07:56:04 +00:00
Tom Schuster f1e35cb3f7 Bug 1633145 - Add JS::PropertyKey::toGCCellPtr. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D72540
2020-04-26 17:02:30 +00:00
Tom Schuster f420e22143 Bug 1633145 - Replace JSID_IS_GCTHING. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D72538
2020-04-26 17:03:01 +00:00
Sylvestre Ledru 34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Ciure Andrei 54a37a9804 Backed out changeset adcfa8af679c (bug 1631533) for causing test_useractivation_transient.html failures CLOSED TREE 2020-04-20 23:09:32 +03:00
Emilio Cobos Álvarez 3481e78d3d Bug 1631533 - Make sync fields observe DidChange instead of DidSet. r=nika
And provide the old value to that callback.

I'm going to need this for zoom.

Differential Revision: https://phabricator.services.mozilla.com/D71620
2020-04-20 18:28:03 +00:00
Jon Coppeard a7194d3716 Bug 1425450 - Only trace JS holders in collecting zones r=mccr8
Now that we have some per-zone vectors we can skip tracing those for zones that are not being collected.

Differential Revision: https://phabricator.services.mozilla.com/D68523
2020-04-20 17:08:54 +00:00
Jon Coppeard f09a0bc433 Bug 1425450 - Use a per-zone vector of JS holders where possible r=mccr8
Currently the JS holders table is represented as a map which contains pointers to entries in a SegmentedVector.  This patch keeps the single map but use a vector per zone and also has a catch-all vector for where we don't know the zone or the holder can have pointers to more than one zone.

Differential Revision: https://phabricator.services.mozilla.com/D68522
2020-04-20 17:08:26 +00:00
Jon Coppeard ec43abf814 Bug 1425450 - Supress rooting analysis warning when removing a JS holder r=mccr8
Currently we get a rooting hazard when nsWrapperCache::UpdateWrapperForNewGlobal calls ReleaseWrapper because the analysis can't see through the virtual method call.

Differential Revision: https://phabricator.services.mozilla.com/D71600
2020-04-20 17:08:00 +00:00
Andrew McCreight ca427d70af Bug 1425450 - Pass zone information through when preserving wrappers r=mccr8
This is bascially the same as your original patch.

Differential Revision: https://phabricator.services.mozilla.com/D68520
2020-04-20 17:07:58 +00:00
Jon Coppeard e0b4ed4d95 Bug 1425450 - Remove unused IsJsHolder methods r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D68519
2020-04-20 17:07:53 +00:00
Jon Coppeard 65918bc23d Bug 1425450 - Remove dead JSHolderMap entries lazily when the vector is next iterated r=mccr8
Currently, to remove a holder entry from a vector we swap the entry with the last one in the vector and then shrink the vector (and fix up the map).  With per-zone vectors we won't have a reference to the vector to get the last entry.  One solution would be to store the zone in the entry and look up the vector in a map but I'd like to avoid this if possible because of the space overhead and the extra lookup.

This patch defers clears the entry's pointers when it is removed and actually removes it when the vector is next iterated.

Differential Revision: https://phabricator.services.mozilla.com/D68518
2020-04-20 17:06:55 +00:00
Gijs Kruitbosch af2df0c8a7 Bug 1614795 - use the background task queue for startupcache writes, r=dthayer,decoder
Prior to this patch, the startupcache created its own mWriteThread off which it
wrote to disk. It's initialized by MaybeSpawnWriteThread, which got called
at shutdown, to do the shutdown write if there was any reason to do so, and
from a timer that is re-initialized after every addition to the startup cache,
to run 60s after the last change to the cache.

It then joined that write thread on the main thread (in other words, blocks
on that off-main-thread write completing from the main thread) when:
- xpcom-shutdown fired
- the startupcache itself gets destroyed
- someone calls any of:
  * HasEntry
  * GetBuffer
  * PutBuffer
  * InvalidateCache

This patch removes the separate write thread, and instead dispatches a task to
the background task queue, indicating it can block. The task is started in
the same circumstances where we previously used to write (timer from the last
PutBuffer call, and shutdown if necessary).

To ensure it cannot be trying to use the data it writes out (mTable) from
the other thread while that data changes on the main thread, we use a mutex.
The task locks the mutex before starting, and unlocks when finished.
Enumerating the cases that we used to block on joining the thread:

In terms of application shutdown, we expect the background task queue to
either finish the write task, or fail to run it if it hasn't started it yet.
In the FastStartup case, we check if a write was necessary; if so, we
attempt to gain the lock without waiting. If we're successful, the write has
not yet started, and we instead run the write on the main thread. Otherwise,
we retry gaining the lock, blocking this time, thus guaranteeing the
off-the-main-thread write completes.

The task keeps a reference to the startupcache object, so it cannot be
destroyed while the task is pending.

Because the write does not modify `mTable`, and neither does `HasEntry`,
we do not need to do anything there.

In the `GetBuffer` case, we do not modify the table unless we have to read
the entry off disk (memmapped into `mCacheData`). This can only happen if
`mCacheData.initialized()` returns true, and we specifically call
`mCacheData.reset()` before firing off the write task to avoid this.
`mCacheData` is only re-initialized if someone calls `LoadArchive()`,
which can only happen from `Init()` (which is guaranteed not to run
again because this is a singleton), or `InvalidateCache()`, where we lock
the mutex (see below). So this is safe - but we assert on the lock to try
and avoid people breaking this chain of assumptions in the future.

When `PutBuffer` is called, we try to lock the mutex - but if locking fails
(ie the background thread is writing), we simply fail to store the entry
in the startupcache. In practice, this should be rare - it'd happen if
new calls to PutBuffer happen while writing during shutdown (when really,
we don't care) or when it's been 60 seconds since the last PutBuffer so
we started writing the startupcache.

When InvalidateCache is called, we lock the mutex - we shouldn't try to
write while invalidating, or invalidate while writing. This may be slow,
but in practice nothing should call `InvalidateCache` except developer
restarts or the `-purgecaches` commandline flag, so it shouldn't
matter a great deal.

Differential Revision: https://phabricator.services.mozilla.com/D70413

--HG--
extra : moz-landing-system : lando
2020-04-15 20:43:44 +00:00
Andrew McCreight 42e0af89fb Bug 1630254, part 2 - Run tasks after every shutdown cycle collection. r=smaug
Unlinking, such as in UnbindFromTree, can add runnables that keep alive CCed
objects after they have been unlinked. In combination with some unknown
fields not being traversed and unlinked this could cause intermittent shutdown
leaks, if those unknown fields hold alive objects that need the CC to be
collected. Work around this by clearing out these runnables after every
shutdown CC.

Also, fix the order of these two steps, which was apparently wrong
before.

Differential Revision: https://phabricator.services.mozilla.com/D71049

--HG--
extra : moz-landing-system : lando
2020-04-15 19:03:03 +00:00
Andrew McCreight d3e9e9a83f Bug 1630254, part 1 - Make nsCycleCollector::Shutdown MOZ_CAN_RUN_SCRIPT. r=smaug
This is to prepare for the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D71048

--HG--
extra : moz-landing-system : lando
2020-04-15 19:02:43 +00:00
Kristen Wright dcb3da64d1 Bug 1621359 - Update .idl files to work with ply3 r=mccr8
This pattern:
```
native nsSize (nsSize);
             ^
```
Causes a parsing error in `ply` 3.10. This can be easily fixed by removing the space and reformatting to this:
```
native nsSize(nsSize);
```

Differential Revision: https://phabricator.services.mozilla.com/D70711

--HG--
extra : moz-landing-system : lando
2020-04-14 17:17:38 +00:00
Chris H-C 28098bb7a3 Bug 1627561 - Fix non-Android non-Intel L3 cache size Telemetry r=mconley
L3 cache being present in /proc/cpuinfo is an Intel-ism. Use the cross-platform
/sys/devices instead.

Differential Revision: https://phabricator.services.mozilla.com/D70892

--HG--
extra : moz-landing-system : lando
2020-04-14 20:55:21 +00:00
Jon Coppeard 78e6febe6d Bug 1629022 - Fix build bustage in beta builds r=mccr8
The patch makes sure the checkSingleZoneHolders variable is always present.  I expect it will get optimised away in builds where it's unused.

Differential Revision: https://phabricator.services.mozilla.com/D70818

--HG--
extra : moz-landing-system : lando
2020-04-14 15:20:45 +00:00
Bogdan Tara 2d4b72dc82 Backed out changeset 181a123cd227 (bug 1629022) by jonco's request CLOSED TREE 2020-04-14 16:36:47 +03:00
Jon Coppeard 93fa5f1ac1 Bug 1629022 - Fix build bustage in beta builds r=mccr8
The patch makes sure the checkSingleZoneHolders variable is always present.  I expect it will get optimised away in builds where it's unused.

Differential Revision: https://phabricator.services.mozilla.com/D70818

--HG--
extra : moz-landing-system : lando
2020-04-14 13:28:11 +00:00
Cameron McCormack 4887043b29 Bug 1265030 - Show symbolic nsresult name in NS_ENSURE_SUCCESS warning. r=mccr8
Through their use of Smprintf, the existing warning message formatting
is resistant to OOM errors.  So I figured that we should probably use
something that doesn't infallibly allocate like GetErrorName does.

Differential Revision: https://phabricator.services.mozilla.com/D70771

--HG--
extra : moz-landing-system : lando
2020-04-13 23:39:19 +00:00
Emma Malysz 92820f83c2 Bug 1625553, change cpuCount value to int to avoid incorrect telemetry r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D70116

--HG--
extra : moz-landing-system : lando
2020-04-09 19:33:13 +00:00
Jon Coppeard 11fc44d6aa Bug 1628371 - Check whether JS holders are single-zone in nightly builds too r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D70220

--HG--
extra : moz-landing-system : lando
2020-04-09 09:50:26 +00:00
Gerald Squelart baa5044bbb Bug 1627097 - Profiler synchronously collect processor information - r=emalysz
Differential Revision: https://phabricator.services.mozilla.com/D69922

--HG--
extra : moz-landing-system : lando
2020-04-08 22:35:54 +00:00
Eric Rahm 8e4a18ed64 Bug 1627392 - Add missing includes and namespaces to xpcom/base. r=xpcom-reviewers,sg
Differential Revision: https://phabricator.services.mozilla.com/D69658

--HG--
extra : moz-landing-system : lando
2020-04-08 10:12:33 +00:00
Andreas Farre 25ca8d7890 Bug 1620594 - Part 7: Remove TabGroup and SystemGroup. r=nika,bas
TabGroup never really made any difference in which thread something go
dispatched to. This was the intended use, but development of TabGroups
with abstract main threads never made it that far. The good thing is
that thish makes it safe to also remove to the SystemGroup and instead
switch all SystemGroup dispatches to dispatches to main thread.

Timers for setTimeout and workers were the sole users of wrapped and
throttled event targets, that those throttled queues have been moved
to the BrowsingContextGroup and are now accessed explicitly.

The SchedulerEventTarget has been removed, since there are no longer a
separate event target for every TaskCategory. Instead a
LabellingEventTarget has been added to DocGroup to handle the case
where an event is dispatched do DocGroup or when an AbstractThread is
created using a DocGroup. This means that we'll actually label more
events correctly with the DocGroup that they belong to.

DocGroups have also been moved to BrowsingContextGroup.

Depends on D67636

Differential Revision: https://phabricator.services.mozilla.com/D65936

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:47 +00:00
Andreas Farre f2fa2e633c Bug 1620594 - Part 5: Use GetMainThreadSerialEventTarget instead of SystemGroup::EventTargetFor. r=nika
This patch also tries to remove the event target entirely if it would
default to the main thread on a null event target.

Depends on D67634

Differential Revision: https://phabricator.services.mozilla.com/D67635

--HG--
extra : moz-landing-system : lando
2020-04-07 15:17:07 +00:00
Andreas Farre 36eaf82163 Bug 1620594 - Part 2: Use SchedulerGroup::Dispatch instead of SystemGroup::Dispatch. r=nika
Depends on D67631

Differential Revision: https://phabricator.services.mozilla.com/D67632

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:33 +00:00
Andreas Farre 63e21eec70 Bug 1620594 - Part 1: Rework NS_ReleaseOnMainThreadSystemGroup. r=nika
To be able to remove SystemGroup, NS_ReleaseOnMainThreadSystemGroup
needs to have its dependency on SystemGroup removed. Since all
releases using SystemGroup would've released on the main thread anyway
we can safely replace NS_ReleaseOnMainThreadSystemGroup with
NS_ReleaseOnMainThread.

Depends on D64390

Differential Revision: https://phabricator.services.mozilla.com/D67631

--HG--
extra : moz-landing-system : lando
2020-04-07 15:16:23 +00:00
Bogdan Tara eddea671e7 Backed out 6 changesets (bug 1425450) for hazard failure complaining about nsWrapperCacheInlines CLOSED TREE
Backed out changeset c57ac2e125e8 (bug 1425450)
Backed out changeset 4238c59af7bb (bug 1425450)
Backed out changeset 2a00272e72ba (bug 1425450)
Backed out changeset 3e4a52d596bb (bug 1425450)
Backed out changeset 5da68de67491 (bug 1425450)
Backed out changeset efac091a3ba4 (bug 1425450)
2020-04-06 21:22:51 +03:00
Jon Coppeard 2c04e31b6c Bug 1425450 - Only trace JS holders in collecting zones r=mccr8
Now that we have some per-zone vectors we can skip tracing those for zones that are not being collected.

Differential Revision: https://phabricator.services.mozilla.com/D68523

--HG--
extra : moz-landing-system : lando
2020-04-06 16:14:25 +00:00
Jon Coppeard 368614f774 Bug 1425450 - Use a per-zone vector of JS holders where possible r=mccr8
Currently the JS holders table is represented as a map which contains pointers to entries in a SegmentedVector.  This patch keeps the single map but use a vector per zone and also has a catch-all vector for where we don't know the zone or the holder can have pointers to more than one zone.

Differential Revision: https://phabricator.services.mozilla.com/D68522

--HG--
extra : moz-landing-system : lando
2020-04-06 16:14:03 +00:00
Andrew McCreight 081d4ec773 Bug 1425450 - Pass zone information through when preserving wrappers r=mccr8
This is bascially the same as your original patch.

Differential Revision: https://phabricator.services.mozilla.com/D68520

--HG--
extra : moz-landing-system : lando
2020-04-06 16:13:17 +00:00
Jon Coppeard 89e1fe3de4 Bug 1425450 - Remove unused IsJsHolder methods r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D68519

--HG--
extra : moz-landing-system : lando
2020-04-06 16:12:39 +00:00
Jon Coppeard af4d1860d1 Bug 1425450 - Remove dead JSHolderMap entries lazily when the vector is next iterated r=mccr8
Currently, to remove a holder entry from a vector we swap the entry with the last one in the vector and then shrink the vector (and fix up the map).  With per-zone vectors we won't have a reference to the vector to get the last entry.  One solution would be to store the zone in the entry and look up the vector in a map but I'd like to avoid this if possible because of the space overhead and the extra lookup.

This patch defers clears the entry's pointers when it is removed and actually removes it when the vector is next iterated.

Differential Revision: https://phabricator.services.mozilla.com/D68518

--HG--
extra : moz-landing-system : lando
2020-04-06 16:12:21 +00:00
Andrew McCreight 26736ce413 Bug 1627213 - Don't call HoldJSObjects in a superclass ctor. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D69586

--HG--
extra : moz-landing-system : lando
2020-04-03 16:57:10 +00:00
André Bargull 14ca007916 Bug 1625138 - Part 41: Remove no longer needed includes for mozilla/TypeTraits. r=froydnj
Also adds missing includes in some files, these were previously only transivitely
included through mozilla/TypeTraits.h.

Differential Revision: https://phabricator.services.mozilla.com/D68561

--HG--
extra : moz-landing-system : lando
2020-03-28 16:00:09 +00:00
André Bargull f70fd1c1bd Bug 1625138 - Part 37: Replace mozilla::IsSame with std::is_same in xpcom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68556

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00