Commit Graph

4941 Commits

Author SHA1 Message Date
Jed Davis
18e4e4ce63 Bug 1480401 - Avoid heap-allocated closures in async signal safe part of LaunchApp. r=froydnj
MozReview-Commit-ID: 4LYtBGbqtVh

--HG--
extra : rebase_source : 4bf706d0b5bd61fdffc0f727cd72591c512ca20c
2018-08-02 14:18:01 -06:00
Jan de Mooij
3af36d3d86 Bug 1479363 part 10 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in other directories. r=mrbkap 2018-08-02 19:30:17 +02:00
Cosmin Sabou
de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura
feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Tom Schuster
2e69f796e1 Bug 1468774 - Remove getPropertyDescriptor from CPOWs. r=mrbkap r=mccr8
--HG--
extra : rebase_source : 39bba6564c89e50ef8faf0b9dca4c0c4a67df510
extra : histedit_source : f572166d28a784135429916b07a1ac398d7a99cb
2018-04-03 18:21:40 +02:00
Jon Coppeard
ec2af16383 Bug 1475228 - Make synchronous compile APIs take SourceBufferHolders exclusively r=jandem r=fitzgen 2018-07-17 14:30:22 +01:00
Andrea Marchesini
44ce53c72e Bug 1476592 - Remove the cache from nsCSPContext - part 2 - sendViolationReports parameter, r=ckerschb, r=aosmond 2018-08-01 06:35:24 +02:00
Hiroyuki Ikezoe
221a08d59e Bug 1479234 - Drop GetAnimationOpacity and GetAnimationTransform ipc calls. r=boris,froydnj
They are no longer used.

MozReview-Commit-ID: 1SaIkj4ryUF

--HG--
extra : rebase_source : 0666e3f297e9c12f8a024e96944d99c2c301820c
2018-07-31 06:13:15 +09:00
Hiroyuki Ikezoe
94f5f622eb Bug 1479234 - Introduce a generic function to get an animation value on the compositor. r=boris,froydnj
On the compositor we store animation values in a hash table and the hash is
the compositor animation id which is a unique id for each property respectively.
So we can get the corresponding animation value for the given property.

In this patch there are lots of duplicated code, but they will be removed in the
next patch.

MozReview-Commit-ID: 7EboVcculcg

--HG--
extra : rebase_source : 304ea80849af8af72a07437736041aeabbe47eeb
2018-07-31 06:13:15 +09:00
Coroiu Cristina
7634333ced Backed out 4 changesets (bug 1479234) for build bustage at build/src/gfx/vr/ipc/VRLayerChild.cpp on a CLOSED TREE
Backed out changeset 6ecc1666f571 (bug 1479234)
Backed out changeset c3bab1bc97cf (bug 1479234)
Backed out changeset c8c2625a33ba (bug 1479234)
Backed out changeset 2ffc8e9d5686 (bug 1479234)
2018-07-31 00:32:04 +03:00
Hiroyuki Ikezoe
697a9da7aa Bug 1479234 - Drop GetAnimationOpacity and GetAnimationTransform ipc calls. r=boris,froydnj
They are no longer used.

MozReview-Commit-ID: 1SaIkj4ryUF

--HG--
extra : rebase_source : 0666e3f297e9c12f8a024e96944d99c2c301820c
2018-07-31 06:13:15 +09:00
Hiroyuki Ikezoe
23a4443de4 Bug 1479234 - Introduce a generic function to get an animation value on the compositor. r=boris,froydnj
On the compositor we store animation values in a hash table and the hash is
the compositor animation id which is a unique id for each property respectively.
So we can get the corresponding animation value for the given property.

In this patch there are lots of duplicated code, but they will be removed in the
next patch.

MozReview-Commit-ID: 7EboVcculcg

--HG--
extra : rebase_source : 304ea80849af8af72a07437736041aeabbe47eeb
2018-07-31 06:13:15 +09:00
Kris Maglione
6bde5d95f3 Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : rebase_source : 9d0c21427bc34115d5a07269c1ecc4f7acfaa3ae
extra : intermediate-source : 0b0c243a1827e193d045d6b3566c87ca87035c48
extra : source : 6c154f4d9dd93e3dac6045c3b8ead22702071fda
2018-07-20 13:20:42 -07:00
Kris Maglione
94acb9ea0e Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : rebase_source : aa7ce229cd37763a3af2061b38d41b675118773f
extra : intermediate-source : 236b366fdf3731ef95e0ba75b8f24f03181343ee
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
2018-07-18 22:31:30 -07:00
Jan de Mooij
80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
dvarga
d8ac8507c9 Merge mozilla-inbound to mozilla-central. a=merge
--HG--
extra : amend_source : 25781a5ccee21a19f5c6ccacc2c96ab7eb4ed6b5
2018-07-28 01:32:38 +03:00
Cosmin Sabou
778ca4f84f Backed out 8 changesets (bug 1476405) for causing frequent failures in bug 1479022. a=backout
Backed out changeset ad1674e9152d (bug 1476405)
Backed out changeset e0a021b27d2c (bug 1476405)
Backed out changeset 771288dbf852 (bug 1476405)
Backed out changeset aeebad4f2dc3 (bug 1476405)
Backed out changeset 4831cbfd03de (bug 1476405)
Backed out changeset 0b0c243a1827 (bug 1476405)
Backed out changeset 236b366fdf37 (bug 1476405)
Backed out changeset c767b1b618fb (bug 1476405)
2018-07-28 01:25:25 +03:00
Jed Davis
652dac8690 Bug 1447867 - Replace base::SharedMemory POSIX backend with shm_open and ashmem. r=froydnj
This replaces using file_util to open and unlink temporary files
(/dev/shm on Linux, $TMPDIR or /tmp otherwise) with the POSIX shm_open
API, or ashmem on Android (which doesn't implement shm_open).

glibc maps shm_open/shm_unlink to open and unlink in /dev/shm (as does
musl libc), so the Linux situation is mostly unchanged except we aren't
duplicating code from system libraries.  Other OSes may (and some do)
use more efficient implementations than temporary files.

FreeBSD's SHM_ANON extension is used if available.  Sadly, it's not
standard; it would make this patch much simpler if it were.

This patch changes the shm file names; they now start with "org.mozilla"
instead of "org.chromium" because the original Chromium code is mostly
gone at this point.  When running as a Snap package, the required
filename prefix is added; other container/sandbox environments using
AppArmor to restrict the allowed filenames may need to be adjusted.

The shm names now include the creating process's pid, to allow
using sandboxing to prevent interfering with shm belonging to other
applications or other processes within the same browser instance.

MozReview-Commit-ID: 7PirIlcblh4
2018-07-27 10:10:25 -06:00
Dorel Luca
704612cf44 Merge mozilla-inbound to mozilla-central. a=merge 2018-07-27 13:19:26 +03:00
Kris Maglione
6254e72cae Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : source : 6c154f4d9dd93e3dac6045c3b8ead22702071fda
extra : histedit_source : fc05365522a7bc8c3b6acd0281a537879d27fee9
2018-07-20 13:20:42 -07:00
Kris Maglione
ed4f3e5b05 Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : source : d0ebb3aa8e0f0946eafc2e7cac4d5cbcf1694e2f
extra : histedit_source : 4c5ef4a166af4c54244003fa5f66dc13da9024f6%2Ca0400aab477c90f08683773186b7a64e88b64b7e
2018-07-18 22:31:30 -07:00
Coroiu Cristina
6d037d0cba Backed out 9 changesets (bug 1476405) for causing leaks
Backed out changeset 4113d6fb3c1c (bug 1476405)
Backed out changeset cb7f7cc32687 (bug 1476405)
Backed out changeset 6d18a8bd5ee3 (bug 1476405)
Backed out changeset b2a99f50e642 (bug 1476405)
Backed out changeset b5b9d295545d (bug 1476405)
Backed out changeset f092a32a3639 (bug 1476405)
Backed out changeset 6c154f4d9dd9 (bug 1476405)
Backed out changeset d0ebb3aa8e0f (bug 1476405)
Backed out changeset 06b8093ddc6a (bug 1476405)
2018-07-27 08:56:36 +03:00
Kris Maglione
9b189d0e9f Bug 1476405: Part 2b - Use default thread size from nsIThreadManager in Linux PlatformThreads. r=jld
MozReview-Commit-ID: 4Mod1IdzJBw

--HG--
extra : rebase_source : 89d6559a27ea5681c1415f71eeb837bfadd8351d
2018-07-20 13:20:42 -07:00
Kris Maglione
8a9627cd5c Bug 1476405: Part 2a - Create nsThread wrappers/set names for chromium threads. r=erahm,jld
MozReview-Commit-ID: FvGhq6nhIde

--HG--
extra : rebase_source : 3d9ef99840da37bce0117515b03a165f6821e74d
2018-07-18 22:31:30 -07:00
Blake Kaplan
e4a0da7d25 Bug 1477343 - Remove PBrowser::IsParentWindowMainWidgetVisible. r=mccr8,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2347

--HG--
extra : moz-landing-system : lando
2018-07-26 19:26:02 +00:00
Sebastian Hengst
bd900ee36a Merge mozilla-inbound to mozilla-central. a=merge 2018-07-25 17:16:53 +03:00
Jed Davis
dc17388589 Bug 1462168 - Report number of IPC channels in about:memory. r=mccr8
This adds an about:memory branch, "ipc-channels", which counts
cross-process IPC channels (ProcessLink, IPC::Channel) broken down by
the top-level IPDL actor name; these use OS resources which may be
limited (file descriptors on Linux and Mac).  Intra-process use of IPC
(ThreadLink) is not counted.

The maximum channel count for each actor type is reported in another
branch, "ipc-channels-peak".  This might be useful if there are
conditions that cause transient fd exhaustion, for example.

This patch also works around a problem where MessageChannel was trying
to register reporters too early in child processes, and failing.

MozReview-Commit-ID: CGEwny2ipcu

--HG--
extra : rebase_source : ad526f03bbef891f4474225a8e36a7ed9e3acdab
2018-07-19 17:48:05 -06:00
Brian Hackett
b073b2dd5f Bug 1477563 - Deep copy file descriptor sets when copying IPDL messages, r=froydnj.
--HG--
extra : rebase_source : 6a002c9af0b12d1015159a3ce841376af13ee284
2018-07-24 15:47:26 +00:00
Andrea Marchesini
f6768a8ff6 Bug 1228139 - Remove nsIURIWithPrincipal - part 3 - main part, r=bz
nsIURIWithPrincipal is currently used to retrieve the nsIPrincipal from a
BlobURL object.  BlobURLProtocolHandler has a hashtable containing, for each
blobURL, a BlobImpl and its nsIPrincipal. This patch introduces
BlobURLProtocolHandler::GetBlobURLPrincipal() that retrieves the nsIPrincipal
from this hashtable.

This patch fixes also a bug in how the revocation of blobURLs is broadcasted to
other processes. This should be done immediately because each process creates
its own timer to revoke them after 5 seconds.

An important change is related to NS_SecurityCompareURIs() where, if 1 (or
both) of the 2 URIs to compare, is a revoked BlobURL, we will QI its URL to
nsIStandardURL and fail out at that point.
2018-07-24 22:15:57 +02:00
Nathan Froyd
99a3d308d0 Bug 1477048 - part 3 - remove ipc/chromium uses of OS_TEST; r=gps
These were less straightforward, so I separated them out into a separate
patch.
2018-07-24 16:08:56 -04:00
Nathan Froyd
5158597854 Bug 1477048 - part 1 - remove '86' in CONFIG['OS_TEST'] stanzas from moz.build files; r=gps
The current code is somewhat non-obvious to a first-time reader, and
OS_TEST is a bizarre thing anyway, since it's actually the name of the
CPU we're running on.  We'd do well to minimize the use of OS_TEST.

Note that the complete nuking of the xptcall/md/unix/moz.build lines are
because we don't support OS X/x86 anymore.
2018-07-24 16:08:56 -04:00
Gurzau Raul
19e302fb18 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-24 12:52:06 +03:00
Brian Hackett
de58a40fc1 Bug 1465294 Part 8 - Don't enable crash reporter in recording/replaying processes, r=aklotz.
--HG--
extra : rebase_source : c07f157b2a4d2244e9fa344cf24624ef962430f1
2018-07-23 14:53:16 +00:00
Brian Hackett
3f2c401055 Bug 1465287 Part 9 - Allow copying IPDL messages, r=froydnj.
--HG--
extra : rebase_source : 25d5c75b5a5b07b545646535bd8da7b9fd9562dc
2018-07-22 11:53:23 +00:00
Brian Hackett
3354a96d8d Bug 1465287 Part 8 - Allow spawning recording/replaying child processes and saving recordings, r=jld,mrbkap.
--HG--
extra : rebase_source : 1da4b1a7e485cfdafb38318860546ce3d0552815
2018-07-22 11:52:42 +00:00
Brian Hackett
5054a18818 Bug 1465287 Part 6 - Use correct channel and pids when communicating with a middleman process, r=mccr8.
--HG--
extra : rebase_source : 856fa92eba119d09f0b111e51126a9817b52bb24
2018-07-22 11:51:30 +00:00
Brian Hackett
4be736018d Bug 1207696 Part 4b - Make recording optional in mozilla mutexes and monitors, r=froydnj.
--HG--
extra : rebase_source : c00f199b38c6bdd47ed1793edf2ce90fbf2ff420
2018-07-21 14:22:54 +00:00
Haik Aftandilian
e2f970d134 Bug 1350642 - Remove the PBrowser::Msg_GetTabCount sync IPC; r=mccr8
Bug 1350642 - Keep the tabCountResizable property in sync; r?dao

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

--HG--
extra : moz-landing-system : lando
2018-07-17 19:41:16 +00:00
Margareta Eliza Balazs
b1e7992b82 Backed out 8 changesets (bug 1265824) for bustage in /builds/worker/workspace/build/src/gfx/layers/opengl/CompositorOGL.cpp on a CLOSED TREE
Backed out changeset 1099d6f15f9f (bug 1265824)
Backed out changeset b5ba15b1a70f (bug 1265824)
Backed out changeset 51795de4adaf (bug 1265824)
Backed out changeset be68741ff4ce (bug 1265824)
Backed out changeset 4731dc56702d (bug 1265824)
Backed out changeset 984133e9614b (bug 1265824)
Backed out changeset efce316a4425 (bug 1265824)
Backed out changeset 367abce30668 (bug 1265824)
2018-07-19 09:33:28 +03:00
Doug Thayer
cd54f8c184 Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 4f05832f51dae6db98773dcad03cb008a80eca6c
2018-05-05 15:46:26 -07:00
Doug Thayer
eeeab69c1c Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 3624ad04aa01dac1cd38efb47764dc3a8fbd5fbd
2018-05-05 15:46:26 -07:00
Cosmin Sabou
fea686b1f6 Backed out 10 changesets (bug 1265824) for causing reftests failures on global-composite-operation.html. CLOSED TREE
Backed out changeset 391c8e7897df (bug 1265824)
Backed out changeset 27c7daabd1a3 (bug 1265824)
Backed out changeset 7c90215a2eca (bug 1265824)
Backed out changeset c141fb67cf9a (bug 1265824)
Backed out changeset 239ab9f9ef52 (bug 1265824)
Backed out changeset 39ae151b3d8c (bug 1265824)
Backed out changeset 71b23fbe1fec (bug 1265824)
Backed out changeset 295dd1a6a09f (bug 1265824)
Backed out changeset 6aecd088e02c (bug 1265824)
Backed out changeset bf9d73b214fc (bug 1265824)
2018-07-23 19:36:37 +03:00
Doug Thayer
ac1648320e Bug 1265824 - Wait on texture handles with IPC r=jld,mattwoodrow
There's a lot going on here, but it all fits under the idea of
being able to communicate about texture locking statuses
without spinning on IsReadLocked. This is a bit of a trade -
we could just always allocate/grab a texture from the pool,
which would put a smaller cap on the amount of time we can
possibly spend when a texture is locked. However, this eats
up more CPU and memory than waiting on the textures to unlock,
and could take longer, especially if there were a large number
of textures which we just need to wait for for a short amount
of time. In any case, we very rarely hit the case where we
actually need to wait on the sync IPC to the compositor - most
of the time the textures are already unlocked.

There is also an async IPC call in here, which we make before
flushing async paints. This just causes the compositor to
check whether the GPU is done with its textures or not and
unlock them if it is. This helps us avoid the case where we
take a long time painting asynchronously, turn IPC back on at
the end of that, and then have to wait for the compositor
to to get into TiledLayerBufferComposite::UseTiles before
getting a response. Specifically this eliminates several talos
regressions which use ASAP mode.

Lastly, there seem to be no other cases of static Monitors
being used. This seems like it falls under similar use cases
as StaticMutexes, so I added it in. I can move it into its own
file if we think it might be generally useful in the future.

MozReview-Commit-ID: IYQLwUqMxg2

--HG--
extra : rebase_source : 67f6fee8b89933561a48e6f7f531b6969893a574
2018-05-05 15:46:26 -07:00
Jed Davis
3ffadbe5c7 Bug 1456919 - Shuffle fds correctly in process_util_mac. r=erahm
MozReview-Commit-ID: K17Bn44NU48

--HG--
extra : rebase_source : cc330d387c43f941d54c508f90639567c48e86c5
2018-07-13 15:16:48 -06:00
Jed Davis
a6cb3c4d18 Bug 1475382 - Turn off async content process launching, pending better error handling. r=spohl
At the moment this isn't actually async because we immediately require
the pid and block on launch anyway.  It also crashes the entire browser
on otherwise recoverable launch errors, because code that wants the pid
isn't set up to handle that operation failing.

MozReview-Commit-ID: 5favGu34QCv

--HG--
extra : rebase_source : 3c81c53e1eb8ead353ef3477ed3ceea0f5edcbbe
2018-07-13 15:20:25 -06:00
Jed Davis
bd5903e8fc Bug 1475382 - Remove debugging crashes added in bug 1461459. r=spohl
These are no longer providing useful information.  There are still a
noticeable number of failures on Windows, but we've narrowed them down to
within SandboxBroker::LaunchApp.

MozReview-Commit-ID: 9srWLNZq1Wo

--HG--
extra : rebase_source : db44114a7623e75f9efd629046d2118748352ed1
2018-07-13 15:18:03 -06:00
Andrea Marchesini
b177a1dbc0 Bug 1432010 - Failures in PBackground channel creation must result in a error event in Web Workers, r=mrbkap 2018-07-18 12:07:14 +02:00
Sylvestre Ledru
909b0caf78 Bug 1468273 - Fix flake8/pep8 issue by hand in ipc/ r=froydnj
MozReview-Commit-ID: JMX7ecYXzHn

--HG--
extra : rebase_source : ef283d9875973913cb24fc5f76e27068e293a762
2018-07-12 12:03:02 +02:00
Sylvestre Ledru
eb7d846340 Bug 1468273 - autopep8 on ipc/ r=froydnj
MozReview-Commit-ID: 63pBUqmDlkZ

--HG--
extra : rebase_source : 6570b1b12e56c2ae1009b00d1cf9a70fb3f651d8
2018-06-10 14:29:07 +02:00
Andrea Marchesini
4e97b69ebf Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 3 - ContentPrincipal, r=ckerschb 2018-07-17 21:38:48 +02:00