Commit Graph

19905 Commits

Author SHA1 Message Date
Narcis Beleuzu
fffdcb0203 Backed out 7 changesets (bug 1580565) for bustages on nsDocShell.cpp . CLOSED TREE
Backed out changeset 8237f9a307f8 (bug 1580565)
Backed out changeset 47f5698d6c72 (bug 1580565)
Backed out changeset e1802670dcc4 (bug 1580565)
Backed out changeset 0a44c410b59b (bug 1580565)
Backed out changeset 20dbcfc9eacc (bug 1580565)
Backed out changeset cdf2b600e779 (bug 1580565)
Backed out changeset a421d33d03ce (bug 1580565)
2020-04-24 05:31:55 +03:00
Nika Layzell
88293ee406 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-23 21:52:51 +00:00
Erik Nordin
232bc61244 Bug 1620289 - Part 1 Clone Selection Ranges For Printing r=jwatt
- Clones selection ranges to the static document for printing
- Static docs can remove selections without referring to original doc

Differential Revision: https://phabricator.services.mozilla.com/D71110
2020-04-23 16:41:49 +00:00
Andreea Pavel
b74d860d87 Backed out 7 changesets (bug 1580565) for bc failures on a CLOSED TREE
Backed out changeset e44e0a6366f8 (bug 1580565)
Backed out changeset c0849928f934 (bug 1580565)
Backed out changeset 3d4f155096be (bug 1580565)
Backed out changeset 108d5fb4418e (bug 1580565)
Backed out changeset d8dea951a032 (bug 1580565)
Backed out changeset f9ab41f29552 (bug 1580565)
Backed out changeset fd5d76304c09 (bug 1580565)
2020-04-22 21:51:17 +03:00
Nika Layzell
34024af634 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 16:25:18 +00:00
Dorel Luca
7daa9a6695 Backed out 7 changesets (bug 1580565) for Gecko-view failures in Test.crashParent. CLOSED TREE
Backed out changeset 7da9785ebb06 (bug 1580565)
Backed out changeset a80e177a91b2 (bug 1580565)
Backed out changeset 2cf821f2a6ea (bug 1580565)
Backed out changeset a30f158eba45 (bug 1580565)
Backed out changeset 276b131190a8 (bug 1580565)
Backed out changeset 3c15e4c600c4 (bug 1580565)
Backed out changeset bf8877cdb10f (bug 1580565)
2020-04-22 18:42:24 +03:00
Alexander Surkov
57f209298d Bug 1628418 - ARIA reflection: implement AriaAttributes interface r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71771
2020-04-22 11:32:18 +00:00
Nika Layzell
38bdb3ed64 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 03:22:07 +00:00
Bogdan Tara
4bd759fa8e Backed out 7 changesets (bug 1580565) for browser_entry_point_telemetry.js failures CLOSED TREE
Backed out changeset 12a4f3de76a8 (bug 1580565)
Backed out changeset 81d537df2dc1 (bug 1580565)
Backed out changeset b182e872c9d4 (bug 1580565)
Backed out changeset 0b4595b2c153 (bug 1580565)
Backed out changeset 4363e3a3d799 (bug 1580565)
Backed out changeset cbb14b2c7b33 (bug 1580565)
Backed out changeset 46b251848297 (bug 1580565)
2020-04-22 06:15:43 +03:00
Nika Layzell
5708211961 Bug 1580565 - Part 6: Add a unique ID to each BrowsingContextGroup, r=kmag
This allows us to explicitly specify BrowsingContextGroups when synchronizing
them. A major advantage of this is that it means we can handle an attempt to
create a BrowsingContext with a parent which the content process is unaware of,
which is possible due to changes to the EnsureSubscribed logic in earlier
patches in this stack.

This is OK, because in the case where the content process cannot see its parent,
the parent must be imminently discarding.

Differential Revision: https://phabricator.services.mozilla.com/D71668
2020-04-22 01:38:05 +00:00
Lina Cambridge
3b84c96063 Bug 1631952 - Ensure that all XPCOM interface methods have unique names when implementing them in Rust. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D71833
2020-04-21 23:01:36 +00:00
Emma Malysz
044488a3af Bug 1610134: Part 1: add timeout pref that turns on late write checking to see if it's possible to crash browser earlier. r=dthayer,chutten
Differential Revision: https://phabricator.services.mozilla.com/D67884
2020-04-21 06:09:28 +00:00
Jean-Yves Avenard
6fa1bb5971 Bug 1630802 - P9. EventTargetWrapper runners don't need to be cancellable. r=bholley
It was required once upon a time to be able to use MozPromise on Workers.
Today a MozPromise work with nsISerialEventTarget and no longer rely on this. It can go.

Differential Revision: https://phabricator.services.mozilla.com/D71442
2020-04-20 02:08:23 +00:00
Jean-Yves Avenard
d882415a98 Bug 1630802 - P8. Remove unnecessary AutoEnter. r=bholley
AutoEnter was an attempt around a race between AbstractThread and MessageLoopAbstractThreadWrap that would cause AbstractThread::GetCurrent() to return an incorrect value. MessageLoopAbstractThreadWrapper is no more and as such AutoEnter is no longer required.

Differential Revision: https://phabricator.services.mozilla.com/D71279
2020-04-20 02:13:31 +00:00
Jean-Yves Avenard
f739ba2873 Bug 1630802 - P7. Remove CreateEventTargetWrapper and ensure that only a single AbstractThread exists par nsIThread. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D71492
2020-04-21 03:02:39 +00:00
Jean-Yves Avenard
61ac17fa16 Bug 1630802 - P3. Make AbstractThread::GetCurrent() return MainThread on the main thread. r=bholley
prior bug 1364821, AbstractThread::GetCurrent() would always return AbstractThread::MainThread() when called from the main thread.
After this change, we had to run within an AutoEnter scope.

A hidden side effect of this change was that under most cases AbstractThread::MainThread::Dispatch() would no longer use the tail dispatcher to dispatch a task.

It can be safely assume that whenever you're on the main thread, the equivalent AbstractThread is usable.

In the next commit, we will be removing AutoEnter entirely.

Differential Revision: https://phabricator.services.mozilla.com/D71148
2020-04-20 02:07:10 +00:00
Jean-Yves Avenard
08cdd889a1 Bug 1630802 - P1. Cleanup AbstractThread TLS lookup. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D69994
2020-04-20 02:06:51 +00:00
Ciure Andrei
82b75f7098 Backed out 3 changesets (bug 1631304) for causing MediaStream-MediaElement-srcObject.https.html wpt failures CLOSED TREE
Backed out changeset 54e27b897b3a (bug 1631304)
Backed out changeset 9ffa1843a04b (bug 1631304)
Backed out changeset 700adf5d3779 (bug 1631304)
2020-04-21 04:25:48 +03:00
Noemi Erli
fbb1ea6c24 Backed out changeset d388b5f84158 (bug 1610134) for causing bustages in LateWriteChecks.cpp CLOSED TREE 2020-04-21 03:53:33 +03:00
Emma Malysz
592046ecf0 Bug 1610134: Part 1: add timeout pref that turns on late write checking to see if it's possible to crash browser earlier. r=dthayer,chutten
Differential Revision: https://phabricator.services.mozilla.com/D67884
2020-04-20 22:51:33 +00:00
Bobby Holley
db090baf2a Bug 1631304 - Run the TailDispatcher off the Microtask queue. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D71488
2020-04-20 19:12:43 +00:00
Bobby Holley
a15d363d2d Bug 1631304 - Add a mechanism to dispatch runnables as microtasks. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D71487
2020-04-20 20:39:46 +00:00
Bobby Holley
67208f946c Bug 1631304 - Drill a fast path to accessing the main thread. r=erahm
I'm surprised we don't have this already.

Differential Revision: https://phabricator.services.mozilla.com/D71486
2020-04-20 22:49:39 +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
Robert Longson
46d24ea87e Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 05:10:29 +00:00
Cosmin Sabou
52b7bc2fa6 Backed out changeset 136b9329a6f7 (bug 1581691) for failures on svg/styling/presentation-attributes-relevant.html. 2020-04-18 06:15:10 +03:00
Robert Longson
650b69563f Bug 1581691 - make transform-origin a mapped CSS attribute r=heycam,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D63016
2020-04-18 01:32:40 +00:00
Nika Layzell
9fdd774725 Bug 1630777 - Relax Span nsTArray methods, r=xpcom-reviewers,sg
Relaxes the type constraints for span overloads on `nsTArray`, such as
`AppendElements`. They previously took `Span<const Item>`, which could cause
build errors when attempting to pass a non const-qualified Item such as in
`Span<RefPtr<BrowsingContext>>`.

Differential Revision: https://phabricator.services.mozilla.com/D71232
2020-04-17 20:17:01 +00:00
Valentin Gosu
0b2e4bafd9 Bug 1625749 - Make sure SlicedInputStream initializes all its members. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D70919
2020-04-14 18:04:13 +00:00
Konstantin Morozov
ea1011eb87 Bug 1629432 - converting integer literal to bool. r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D71181
2020-04-16 14:14:08 +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
Ricky Stewart
cb6b22fac9 Bug 1628954 - Don't use 'is' and 'is not' to perform comparison against strings in Python r=nalexander
Differential Revision: https://phabricator.services.mozilla.com/D71059

--HG--
extra : moz-landing-system : lando
2020-04-15 17:03:05 +00:00
Valentin Gosu
b5c0442d4e Bug 1595886 - Use a temp string in readSegments r=dragana
Differential Revision: https://phabricator.services.mozilla.com/D68204

--HG--
extra : moz-landing-system : lando
2020-04-15 12:31:34 +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
Olli Pettay
ebe2702267 Bug 1627935 - PrioritizedEventQueue::GetEvent doesn't return the correct priority value, r=bas
One could possibly make larger changes to make the setup less error prone, but hopefully we'll
replace this code with the new scheduler relatively soon.
And the assertion there should still enforce correct behavior.

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

--HG--
extra : moz-landing-system : lando
2020-04-13 22:22:57 +00:00
Simon Giesecke
069ef2ef55 Bug 1628697 - nsTArray::AppendElements(mozilla::Span<const Item> aSpan) should use ActualAlloc. r=xpcom-reviewers,erahm
Differential Revision: https://phabricator.services.mozilla.com/D70381

--HG--
extra : moz-landing-system : lando
2020-04-09 17:31:08 +00:00
Tooru Fujisawa
8c0843c04c Bug 1432749 - Part 1: Add DefaultHasher for nsTString. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D67836

--HG--
extra : moz-landing-system : lando
2020-04-14 06:00:05 +00:00