Commit Graph

5762 Commits

Author SHA1 Message Date
Perry Jiang
07c822e09b Bug 1231213 - Implement PRemoteWorkerController IPDL protocol and RemoteWorkerController{Parent,Child}. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26168

--HG--
extra : moz-landing-system : lando
2019-08-15 17:26:49 +00:00
Perry Jiang
1cbbc0178e Bug 1231213 - IPCStreamSource should not attempt to read from its stream if already closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26161

--HG--
extra : moz-landing-system : lando
2019-08-15 17:26:05 +00:00
Perry Jiang
4b70b87327 Bug 1231213 - Support IPCStreamSource on the Worker Launcher thread. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26160

--HG--
extra : moz-landing-system : lando
2019-08-15 17:25:58 +00:00
Jed Davis
d9661aa556 Bug 1479960 - Add unit tests for shared memory freezing. r=froydnj
Also refactor SharedMemoryBasic::SystemProtect to allow testing cases
that are expected to fail.

Depends on D26748

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

--HG--
rename : ipc/moz.build => ipc/gtest/moz.build
extra : moz-landing-system : lando
2019-08-14 22:48:52 +00:00
Jed Davis
bc66e27e8c Bug 1536697 - Fix error handling in base::SharedMemory::Map. r=froydnj
If mmap failed, we'd leave the memory_ member variable set to MAP_FAILED,
but everything else in this file checks for nullptr (and only nullptr) to
test if the pointer is valid.

Also, this removes the debug assertion that the mmap succeeded, to allow
writing unit tests where we expect it to fail (e.g., for insufficient
permissions).

Depends on D26747

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:51 +00:00
Jed Davis
150e57c3cc Bug 1426526 - Delete file_util from ex-Chromium IPC source. r=froydnj
Depends on D26746

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:42 +00:00
Jed Davis
0c5b23b47d Bug 1479960 - Add freezing of IPC shared memory. r=froydnj,kmag
This allows writing to shared memory and then making it read-only before
sharing it to other processes, such that a malicious sandboxed process
cannot regain write access.  This is currently available only in the
low-level base::SharedMemory interface.

The freeze operation exposes the common subset of read-only shared
memory that we can implement on all supported OSes: with some APIs
(POSIX shm_open) we can't revoke writeability from existing capabilies,
while for others (Android ashmem) we *must* revoke it.  Thus, we require
that the writeable capability not have been duplicated or shared to
another process, and consume it as part of freezing.  Also, because in
some backends need special handling at creation time, freezeability must
be explicitly requested.

In particular, this doesn't allow giving an untrusted process read-only
access to memory that the original process can write.

Note that on MacOS before 10.12 this will use temporary files in order to
avoid an OS security bug that allows regaining write access; those OS
versions are no longer supported by Apple (but are supported by Firefox).

Depends on D26742

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:34 +00:00
Jed Davis
e3f21b94e9 Bug 1479960 - Clean up shared_memory_posix error handling. r=froydnj
This uses RAII to handle error-case cleanup in the POSIX backend for
SharedMemory::Create, to simplify the complexity that will be added to
support freezing.

Depends on D26741

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:31 +00:00
Jed Davis
8b00fa3bea Bug 1479960 - Fix max_size in shared_memory_posix. r=froydnj
The Unix backend for shared memory needs to keep the mapped size to pass
to munmap, while the Windows backend doesn't.  Currently it's reusing the
max_size field, and then zeroing it when it's unmapped, which breaks the
freezing use case.  This patch uses a dedicated field for that.

Depends on D26740

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:29 +00:00
Jed Davis
9a41450b28 Bug 1479960 - Get rid of base::SharedMemory::handle. r=froydnj
Despite the comment saying not to use the "handle" except as an opaque
identifier, it is being used to pass the handle to other OS APIs.  Direct
access to the handle needs to be controlled to make sure freezing is
safe, so this patch replaces that with interfaces that are more explicit
about ownership and lifetime.

Depends on D26739

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:22 +00:00
Jed Davis
4eb2c49d03 Bug 1479960 - Remove SHM_ANON support. r=froydnj
FreeBSD's SHM_ANON is useful for the usual case of shared memory, but it
doesn't support freezing.  It could be re-added later, but for now it's
simplest to remove it (and use named shm instead) while refactoring.

Depends on D26738

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

--HG--
extra : moz-landing-system : lando
2019-08-14 22:48:20 +00:00
Bogdan Tara
f326b67e0e Backed out changeset c60ee628dd0e (bug 1571711) for RemoteSandboxBroker related bustages CLOSED TREE 2019-08-15 01:50:01 +03:00
Gabriele Svelto
d888c0a6b5 Bug 1571711 - Factorize crash handling out of the various process IPC classes r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D41657

--HG--
extra : moz-landing-system : lando
2019-08-13 21:43:00 +00:00
Dorel Luca
73975f1d28 Backed out 22 changesets (bug 1231213) for Browser-chrome failures on /workers/remoteworkers/RemoteWorkerChild.cpp
Backed out changeset 7e09ad9ceea6 (bug 1231213)
Backed out changeset a275eb0b1a19 (bug 1231213)
Backed out changeset 906b80778539 (bug 1231213)
Backed out changeset 6a40ab6852cb (bug 1231213)
Backed out changeset 216591953f97 (bug 1231213)
Backed out changeset 1de357bc1921 (bug 1231213)
Backed out changeset 8e3fedf6502a (bug 1231213)
Backed out changeset 1b9a8b022fce (bug 1231213)
Backed out changeset 85df1959eb98 (bug 1231213)
Backed out changeset 666bf4260046 (bug 1231213)
Backed out changeset 0b03a19a6dc1 (bug 1231213)
Backed out changeset 11f010e6d6e7 (bug 1231213)
Backed out changeset 6ed55807374f (bug 1231213)
Backed out changeset 395062aef2ec (bug 1231213)
Backed out changeset bacf8499ba7b (bug 1231213)
Backed out changeset bf5d60c7a85a (bug 1231213)
Backed out changeset cd434b787ce6 (bug 1231213)
Backed out changeset ee4565104217 (bug 1231213)
Backed out changeset 581653ef33dd (bug 1231213)
Backed out changeset 2d5628a0e52d (bug 1231213)
Backed out changeset 3449c2eba4c6 (bug 1231213)
Backed out changeset ae221b628899 (bug 1231213)
2019-08-15 01:04:46 +03:00
Perry Jiang
71485c3b89 Bug 1231213 - Refactor RemoteWorkerChild to handle Service Workers' and Shared Workers' operations and to make its state data/transitions safer. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26170

--HG--
extra : moz-landing-system : lando
2019-08-14 16:20:06 +00:00
Perry Jiang
aa4bed38b8 Bug 1231213 - Implement PRemoteWorkerController IPDL protocol and RemoteWorkerController{Parent,Child}. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26168

--HG--
extra : moz-landing-system : lando
2019-08-14 16:19:57 +00:00
Perry Jiang
f4a9086902 Bug 1231213 - IPCStreamSource should not attempt to read from its stream if already closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26161

--HG--
extra : moz-landing-system : lando
2019-08-14 16:19:36 +00:00
Perry Jiang
d9c5bda5c4 Bug 1231213 - Support IPCStreamSource on the Worker Launcher thread. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26160

--HG--
extra : moz-landing-system : lando
2019-08-14 16:19:34 +00:00
Cosmin Sabou
85a8083871 Backed out 22 changesets (bug 1231213) for build bustages on /mozilla/Attributes.h CLOSED TREE
Backed out changeset 4a45f2c447fd (bug 1231213)
Backed out changeset bcb4d348a847 (bug 1231213)
Backed out changeset ae78ac86cc86 (bug 1231213)
Backed out changeset d681c92a7f05 (bug 1231213)
Backed out changeset 1ac9661e7fb4 (bug 1231213)
Backed out changeset 796c617b989f (bug 1231213)
Backed out changeset c46b31113adb (bug 1231213)
Backed out changeset ea7334da65d9 (bug 1231213)
Backed out changeset 6e9273940bf5 (bug 1231213)
Backed out changeset 7df0e0ff9a82 (bug 1231213)
Backed out changeset 12aba06d169c (bug 1231213)
Backed out changeset e7d6d8d64e8a (bug 1231213)
Backed out changeset 097a29f3ff9a (bug 1231213)
Backed out changeset 1b7169b75760 (bug 1231213)
Backed out changeset 0fd1fd7c3f06 (bug 1231213)
Backed out changeset 3d539eb7faff (bug 1231213)
Backed out changeset 419f9bb7be3c (bug 1231213)
Backed out changeset caede0e4e888 (bug 1231213)
Backed out changeset 778eade5085d (bug 1231213)
Backed out changeset a84b262ff6f8 (bug 1231213)
Backed out changeset 97328368da02 (bug 1231213)
Backed out changeset 9c845d7e3b29 (bug 1231213)
2019-08-14 00:10:48 +03:00
Perry Jiang
f3b01231e1 Bug 1231213 - Refactor RemoteWorkerChild to handle Service Workers' and Shared Workers' operations and to make its state data/transitions safer. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26170

--HG--
extra : moz-landing-system : lando
2019-08-13 19:57:49 +00:00
Perry Jiang
f133e5ec1a Bug 1231213 - Implement PRemoteWorkerController IPDL protocol and RemoteWorkerController{Parent,Child}. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26168

--HG--
extra : moz-landing-system : lando
2019-08-13 19:55:59 +00:00
Perry Jiang
08d1f8eb68 Bug 1231213 - IPCStreamSource should not attempt to read from its stream if already closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26161

--HG--
extra : moz-landing-system : lando
2019-08-13 19:55:19 +00:00
Perry Jiang
f4e4a5aedc Bug 1231213 - Support IPCStreamSource on the Worker Launcher thread. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26160

--HG--
extra : moz-landing-system : lando
2019-08-13 19:55:12 +00:00
Cosmin Sabou
f870af790d Backed out 22 changesets (bug 1231213) for build bustages on RemoteWorkerChild.cpp. CLOSED TREE
Backed out changeset 06dba269fcfe (bug 1231213)
Backed out changeset 20b1ec70a6d0 (bug 1231213)
Backed out changeset be99adfb84ab (bug 1231213)
Backed out changeset 8cb30e5ef8d7 (bug 1231213)
Backed out changeset bdeff3d76292 (bug 1231213)
Backed out changeset 783bd2856798 (bug 1231213)
Backed out changeset e52869704d4d (bug 1231213)
Backed out changeset df97ea0bbe79 (bug 1231213)
Backed out changeset 822ade495b97 (bug 1231213)
Backed out changeset 06281fe76994 (bug 1231213)
Backed out changeset c8c1d3aa27c6 (bug 1231213)
Backed out changeset b96a12cd2c73 (bug 1231213)
Backed out changeset a1dcf2ea83be (bug 1231213)
Backed out changeset 6e2934410f95 (bug 1231213)
Backed out changeset d4ffae32539b (bug 1231213)
Backed out changeset d99f2cbe0ed2 (bug 1231213)
Backed out changeset 3bbea49c6d03 (bug 1231213)
Backed out changeset dac29b0340ce (bug 1231213)
Backed out changeset 0591a2a0cc41 (bug 1231213)
Backed out changeset afc3b2b9d472 (bug 1231213)
Backed out changeset 89fffd7b8740 (bug 1231213)
Backed out changeset 30b9a65a6294 (bug 1231213)
2019-08-13 21:30:20 +03:00
Perry Jiang
c0a3f641c2 Bug 1231213 - Refactor RemoteWorkerChild to handle Service Workers' and Shared Workers' operations and to make its state data/transitions safer. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26170

--HG--
extra : moz-landing-system : lando
2019-08-13 05:16:40 +00:00
Perry Jiang
238d0d2393 Bug 1231213 - Implement PRemoteWorkerController IPDL protocol and RemoteWorkerController{Parent,Child}. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26168

--HG--
extra : moz-landing-system : lando
2019-08-13 04:57:17 +00:00
Perry Jiang
737b945fd0 Bug 1231213 - IPCStreamSource should not attempt to read from its stream if already closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26161

--HG--
extra : moz-landing-system : lando
2019-08-13 04:57:30 +00:00
Perry Jiang
d7e24f3ace Bug 1231213 - Support IPCStreamSource on the Worker Launcher thread. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26160

--HG--
extra : moz-landing-system : lando
2019-08-13 04:57:32 +00:00
Sylvestre Ledru
645f2d5773 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-08-13 07:15:25 +00:00
Narcis Beleuzu
f53affe1cb Backed out 22 changesets (bug 1231213) for build bustages on RemoteWorkerChild.cpp . CLOSED TREE
Backed out changeset 6f25a7e73fe2 (bug 1231213)
Backed out changeset 5e88c3855fb6 (bug 1231213)
Backed out changeset a78d7b3e44af (bug 1231213)
Backed out changeset eb7f3a9b0a42 (bug 1231213)
Backed out changeset 87575a180ad5 (bug 1231213)
Backed out changeset 4e8369314e87 (bug 1231213)
Backed out changeset 039c34bc043c (bug 1231213)
Backed out changeset 0528ab68d94e (bug 1231213)
Backed out changeset 670e7d61d95c (bug 1231213)
Backed out changeset d61b9d65bd0a (bug 1231213)
Backed out changeset 9042ea694d40 (bug 1231213)
Backed out changeset bc0607e0d50b (bug 1231213)
Backed out changeset 196ee18781cb (bug 1231213)
Backed out changeset 4b588dec466b (bug 1231213)
Backed out changeset be6031a6fca7 (bug 1231213)
Backed out changeset 12e04c22f52f (bug 1231213)
Backed out changeset fd146f327f2d (bug 1231213)
Backed out changeset f2af7b66f50d (bug 1231213)
Backed out changeset 71d93fc98d3f (bug 1231213)
Backed out changeset 280271806864 (bug 1231213)
Backed out changeset ca4e828345a2 (bug 1231213)
Backed out changeset e41b984510ad (bug 1231213)
2019-08-13 07:47:05 +03:00
Perry Jiang
0aef3f0bc4 Bug 1231213 - Refactor RemoteWorkerChild to handle Service Workers' and Shared Workers' operations and to make its state data/transitions safer. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26170

--HG--
extra : moz-landing-system : lando
2019-08-13 04:03:49 +00:00
Perry Jiang
54be8635e5 Bug 1231213 - Implement PRemoteWorkerController IPDL protocol and RemoteWorkerController{Parent,Child}. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26168

--HG--
extra : moz-landing-system : lando
2019-08-13 04:03:40 +00:00
Perry Jiang
2800c29537 Bug 1231213 - IPCStreamSource should not attempt to read from its stream if already closed. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26161

--HG--
extra : moz-landing-system : lando
2019-08-13 04:03:16 +00:00
Perry Jiang
e459bdeff1 Bug 1231213 - Support IPCStreamSource on the Worker Launcher thread. r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D26160

--HG--
extra : moz-landing-system : lando
2019-08-13 04:03:14 +00:00
Jed Davis
952ed3dac9 Bug 1568047. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D41466

--HG--
extra : moz-landing-system : lando
2019-08-12 18:50:09 +00:00
Gabriele Svelto
beb62c4c31 Bug 1282776 - Finalize crash reports for child process crashes happening too early r=froydnj
This changes the way crash reports for child processes happening too early
during the child process' startup. Before bug 1547698 we wrote a partial
.extra file with those crashes that lacked the process type. The user would
not be notified of those crashes until she restarted Firefox and even when
submitted those crashes would be erroneously labeled as browser crashes.

After bug 1547698 we stopped writing .extra files entirely for those crashes
which left orphaned .dmp files among the pending crash reports.

This patch does three things to improve the situation:

* It writes a partial .extra file so that the crashes are detected at the next
  startup. So the user is still not notified directly of these crashes but she
  can report them later.
* It adds the process type to the .extra file so that the crash reporters are
  labelled correctly.
* It fixes a leak in the `pidToMinidump` hash-map. Since the crashes were
  not finalized the `ChildProcessData` strucutre associated with them would
  never be fred.

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

--HG--
extra : moz-landing-system : lando
2019-08-09 14:23:19 +00:00
Jed Davis
7489270632 Bug 1572868 - Remove ChannelOpened and related dead code. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D41452

--HG--
extra : moz-landing-system : lando
2019-08-09 22:20:51 +00:00
Nika Layzell
021bb13602 Bug 1570369 - Part 11: Use IPDL refcounted for PIPCBlobInputStream, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D40266

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:46 +00:00
Nika Layzell
1b7d7ce8f0 Bug 1570369 - Part 10: Use IPDL refcounted for PInProcess, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D40265

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:44 +00:00
Nika Layzell
c58a226270 Bug 1570369 - Part 7: Use IPDL refcounted for PFileSystemRequest, r=baku
Differential Revision: https://phabricator.services.mozilla.com/D40260

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:37 +00:00
Nika Layzell
57067bd337 Bug 1570369 - Part 1: Use IPDL refcounted for PWindowGlobal, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D40252

--HG--
extra : moz-landing-system : lando
2019-08-08 16:46:20 +00:00
Junior Hsu
15adda2765 Bug 1543068 - P3 Take COEP into account for COOP mismatch r=nika
Step 9 in obtain a cross-origin opener-policy
https://gist.github.com/annevk/6f2dd8c79c77123f39797f6bdac43f3e

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

--HG--
extra : moz-landing-system : lando
2019-08-08 19:00:00 +00:00
Junior Hsu
2247427ef2 Bug 1543068 - P1 Substitute Cross-Origin header with COEP r=nika
(a) Substitute Cross-Origin header with COEP
(b) Forcing cors in FetchDriver is removed since COEP doesn't need to IIUC

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

--HG--
extra : moz-landing-system : lando
2019-08-08 18:38:03 +00:00
Nika Layzell
5f47039328 Bug 1523638 - Part 3: Construct WindowGlobal actors using ManagedEndpoint, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37650

--HG--
extra : moz-landing-system : lando
2019-08-08 16:06:56 +00:00
Aaron Klotz
fb977a3526 Bug 1571875: Part 2 - Change over all existing static local uses of DynamicallyLinkedFunctionPtr to use StaticDynamicallyLinkedFunctionPtr instead; r=mhowell
Depends on D40885

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

--HG--
extra : moz-landing-system : lando
2019-08-07 15:58:09 +00:00
Kershaw Chang
18d3f24206 Bug 1570950 - Make sure the IPC channel is closed before destroying r=jld
The stack from crash report suggests that ChildImpl was deleted at the end of function GetOrCreateSocketActorForCurrentThread(). This only happens when SendInitBackground failed, so we have to close the IPC channel before ChildImpl getting destroyed.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 21:17:40 +00:00
Aaron Klotz
1fc3efff69 Bug 1568361: Use StaticLocalAutoPtr for BackgroundMTAData; r=Jamie
The new StaticLocalAutoPtr smart pointer has a trivial destructor, so we will
either properly clean up this data or leak it on process shutdown. Either way,
we will not destroy it in a way that the underlying type does not support.

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

--HG--
extra : moz-landing-system : lando
2019-08-07 01:48:31 +00:00
Andreea Pavel
5c7466c411 Backed out changeset 3b0f04771005 (bug 1568361) Windows MinGW build bustages on a CLOSED TREE 2019-08-07 03:21:19 +03:00
Aaron Klotz
559af4dfce Bug 1568361: Use StaticLocalAutoPtr for BackgrundMTAData; r=Jamie
The new StaticLocalAutoPtr smart pointer has a trivial destructor, so we will
either properly clean up this data or leak it on process shutdown. Either way,
we will not destroy it in a way that the underlying type does not support.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 23:56:21 +00:00
Bobby Holley
44eb662657 Bug 1571092 - Add missing return statement. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D40527

--HG--
extra : moz-landing-system : lando
2019-08-05 20:08:59 +00:00
Barret Rennie
736ae2cbed Bug 1510569 - Prevent missing symbol errors during builds when adding new IPDL headers r=Ehsan
ipc_message_utils.h defines IPDLParamTraits on windows for some things like
HWND and HANDLE. However, it doesn't directly include windows.h on Windows to
include them. All other usages seem to rely on including base/process.h, which
does include windows.h and adds the appropriate typedefs.

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

--HG--
extra : moz-landing-system : lando
2019-08-02 02:12:47 +00:00
Nika Layzell
0a2e2e5949 Bug 1570367 - Don't generate pure virtual unused AllocPFoo, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D40066

--HG--
extra : moz-landing-system : lando
2019-07-31 21:59:52 +00:00
Sebastian Streich
6917b697b8 Bug 1428473 Support X-Content-Type-Options: nosniff when navigating r=ckerschb,dragana,alchen
***
Apply Requested Revision

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

--HG--
extra : moz-landing-system : lando
2019-07-31 16:59:53 +00:00
Jed Davis
ce9d3c2b5d Bug 1568291 - Be more defensive in base::KillProcess. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39783

--HG--
extra : moz-landing-system : lando
2019-07-30 14:04:26 +00:00
Nika Layzell
efac1124a9 Bug 1550560 - Part 4: Don't generate helper ctors for refcounted actors, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D39535

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:20 +00:00
Nika Layzell
5853ed26e9 Bug 1550560 - Part 2: Generate logic for refcounted IPDL actors, r=mccr8
This takes the approach of directly tying the `AddRef()` and `Release()` calls
on the underlying actor object to the lifecycle of the ActorLifecycleProxy
object, by adding another virtual `ActorAlloc()` method as the counterpart to
`ActorDealloc()`.

The changes to the methods called from C++ are relatively minimal:

1. The `SendPFooConstructor(...)` methods have the same signature, but now will
   AddRef() internally (through `ActorAlloc()`), so an `do_AddRef(foo).take()`
   isn't needed. Same with the `{Bind,Open}PFooEndpoint` methods.

   This was done to reduce the number of invasive internal changes in the
   codegen which were required to pipe a passed-in `already_AddRefed` to the
   underlying `ActorLifecycleProxy` which is created by generic code.

2. The `AllocPFoo{Parent,Child}` methods have been modified to return an
   `already_AddRefed` by default, and the callsites will store the result in a
   `RefPtr<T>` if the type is refcounted.

3. No `DeallocPFoo...` method is called anymore. Unfortunately due to
   devirtualization, it won't be an error if an unused method is still present,
   though it won't be called.

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

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:16 +00:00
Nika Layzell
17ed6763d2 Bug 1550560 - Part 1: Parse refcounted protocols in IPDL, r=mccr8
The syntax for the new construct looks like the following, and re-uses the
refcounted keyword from refcounted using statements:

async refcounted protocol PFoo { ... }

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

--HG--
extra : moz-landing-system : lando
2019-07-29 19:54:14 +00:00
Nika Layzell
7d9769c5e3 Bug 1565405 - Fail async ctor call if !Manager()->CanSend(), r=froydnj
The previous behaviour of failing unconditionally was performed as, during
shutdown, the channel could become unable to send without worker threads having
a chance to react. This change keeps that behaviour, isolating async message
senders from impending IPC shutdown, while performing expected actor teardown if
the manager actor has already been destroyed, and should no longer send messages.

An alternate behaviour here could be to crash if !Manager()->CanSend(). That
behaviour may be preferable if a sufficient number of callsites don't check the
return value of the `SendPFooConstructor()` method.

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

--HG--
extra : moz-landing-system : lando
2019-07-29 16:37:40 +00:00
Kershaw Chang
0d30d95291 Bug 1566808 - Add STARTF_FORCEOFFFEEDBACK when launching process on windows r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D39682

--HG--
extra : moz-landing-system : lando
2019-07-29 14:59:27 +00:00
Andrea Marchesini
cef26c06c6 Bug 1567892 - PeerConnectionMedia should use nsIProtocolProxyService on the parent process - PProxyConfigLookup IPC protocol, r=bwc,kershaw,jld
Differential Revision: https://phabricator.services.mozilla.com/D39010

--HG--
extra : moz-landing-system : lando
2019-07-29 12:27:59 +00:00
Nicholas Nethercote
18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Bobby Holley
5d23efb2eb Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 21:10:14 +00:00
Coroiu Cristina
f3386dea34 Backed out 4 changesets (bug 1566583) for apilint and checkstyle failure at geckoview/src/main/java/org/mozilla/gecko/GeckoAppShell.java on a CLOSED TREE
Backed out changeset 3700ef585384 (bug 1566583)
Backed out changeset fbc829be6c4f (bug 1566583)
Backed out changeset 14ea9c84bb0e (bug 1566583)
Backed out changeset 92f3b1bb34a4 (bug 1566583)
2019-07-24 22:59:54 +03:00
Bobby Holley
53719788a1 Bug 1566583 - Bridge GeckoResult to MozPromise and return a GeckoResult from GeckoProcessManager::start. r=snorp
Differential Revision: https://phabricator.services.mozilla.com/D38436

--HG--
extra : moz-landing-system : lando
2019-07-24 19:19:40 +00:00
Christian Holler
cd7a74b452 Bug 1499041 - Remove libFuzzer flags from ipc/chromium/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D39165

--HG--
extra : moz-landing-system : lando
2019-07-24 14:13:30 +00:00
Ciure Andrei
c0756f3389 Backed out 10 changesets (bug 1523638) for causing high frequency Android 7.0 mochitests failures CLOSED TREE
Backed out changeset 644ceb2fe568 (bug 1523638)
Backed out changeset 27647ee7a927 (bug 1523638)
Backed out changeset 96f1ccb95570 (bug 1523638)
Backed out changeset b60a17ea716a (bug 1523638)
Backed out changeset 507e63186c5f (bug 1523638)
Backed out changeset 33255408ca61 (bug 1523638)
Backed out changeset d97b2d223616 (bug 1523638)
Backed out changeset eba2a0514cde (bug 1523638)
Backed out changeset d7065174c5c4 (bug 1523638)
Backed out changeset c21b361e175d (bug 1523638)
2019-07-23 05:13:32 +03:00
Nika Layzell
b1f124f20a Bug 1523638 - Part 3: Construct WindowGlobal actors using ManagedEndpoint, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37650

--HG--
extra : moz-landing-system : lando
2019-07-18 19:38:10 +00:00
Benjamin
6da0bbfd32 Bug 1566453: Added flag to detect if a load was initiated by a form submission r=ckerschb
The flag in loadinfo can be used to detect if a load was initiated by a form submission. This is crucial for implmenting the CSP directive navigate-to. https://www.w3.org/TR/CSP3/#navigate-to-pre-navigate

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

--HG--
extra : moz-landing-system : lando
2019-07-22 13:41:47 +00:00
Cosmin Sabou
76dc1b363b Merge mozilla-central to mozilla-inbound. 2019-07-18 12:57:56 +03:00
Aaron Klotz
8b94200412 Bug 1566955: Make EnsureMTA fully thread-safe; r=Jamie
Until now we asserted that EnsureMTA was being called from the main thread
unless the current thread was already in the MTA.

This patch makes MTA thread initialization thread-safe by using a C++11
"magic static," thus allowing EnsureMTA to be safely invoked from any thread.

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

--HG--
extra : moz-landing-system : lando
2019-07-18 00:48:41 +00:00
Brian Hackett
3725f222ae Bug 1566294 - Use distinct sequence numbers for messages sent from middleman processes, r=nika.
Differential Revision: https://phabricator.services.mozilla.com/D38359

--HG--
extra : rebase_source : a7c9072d996eabc94e453267448eb2a35c89d1a1
2019-07-17 05:47:35 -10:00
Bobby Holley
5b2d1df481 Bug 1566592 - Use a dedicated thread for launching on android. r=jld
At the moment, this shouldn't make any difference because we only ever
launch one child process on android.

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

--HG--
extra : moz-landing-system : lando
2019-07-16 22:52:48 +00:00
Bogdan Tara
ca45889546 Backed out 9 changesets (bug 1523638) for browser_contextmenu.js failures CLOSED TREE
Backed out changeset 0a584a07b696 (bug 1523638)
Backed out changeset 8c5af2289900 (bug 1523638)
Backed out changeset 40ed1bd64b09 (bug 1523638)
Backed out changeset 9a99a0391979 (bug 1523638)
Backed out changeset 07fb4748b91a (bug 1523638)
Backed out changeset 49047c3ebae9 (bug 1523638)
Backed out changeset d606d072126c (bug 1523638)
Backed out changeset 76dc1937fc77 (bug 1523638)
Backed out changeset c784c14b5d5d (bug 1523638)
2019-07-16 23:40:47 +03:00
Olli Pettay
5474e37783 Bug 1566459, add a way to check underlying IPC message type from runnable, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D38215

--HG--
extra : moz-landing-system : lando
2019-07-16 19:21:40 +00:00
Nika Layzell
a711231390 Bug 1523638 - Part 3: Construct WindowGlobal actors using ManagedEndpoint, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D37650

--HG--
extra : moz-landing-system : lando
2019-07-16 18:47:39 +00:00
Jed Davis
0ba66c379f Bug 1534780 - Add free interconversion between UniqueFileHandle and ipc::FileDescriptor and use it in a few places. r=froydnj
Now that UniqueFileHandle can be used more widely, and with
ipc::FileDescriptor being essentially a copyable UniqueFileHandle, it
makes sense to add a move constructor and a "forget"-like method to
convert between them when needed.

Depends on D26737

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

--HG--
extra : moz-landing-system : lando
2019-06-28 19:46:58 +00:00
Jed Davis
370bd5030f Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj
MozReview-Commit-ID: 7bbGVIjTTaJ

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

--HG--
extra : moz-landing-system : lando
2019-06-28 19:46:58 +00:00
Byron Campen [:bwc]
6480f0a928 Bug 1560636: Avoid using main thread with PMediaTransport. r=mjf,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D36818

--HG--
extra : moz-landing-system : lando
2019-07-15 15:49:30 +00:00
Andreea Pavel
6665820f48 Backed out 3 changesets (bug 1547351) for assertion failures on a CLOSED TREE
Backed out changeset 77ef8e8bc669 (bug 1547351)
Backed out changeset b594f8e47025 (bug 1547351)
Backed out changeset 6e5d426cd313 (bug 1547351)
2019-07-15 17:47:40 +03:00
Alexis Beingessner
340a9acb9f Bug 1547351 - Add support for mozilla::HashMap to ipdl. r=njn
Differential Revision: https://phabricator.services.mozilla.com/D37927

--HG--
extra : moz-landing-system : lando
2019-07-15 13:20:31 +00:00
Bobby Holley
1a1203d4f9 Bug 1562762 - Return a Promise from DoLaunch. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D37602

--HG--
extra : moz-landing-system : lando
2019-07-12 04:48:44 +00:00
Bogdan Tara
b3b754d03c Backed out changeset a82b17a644d7 (bug 1562762) for geckoview crashes on Android 4.3 CLOSED TREE 2019-07-12 02:40:19 +03:00
Bobby Holley
879947f772 Bug 1562762 - Return a Promise from DoLaunch. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D37602

--HG--
extra : moz-landing-system : lando
2019-07-11 15:28:00 +00:00
Bobby Holley
b950ce25f8 Bug 1563832 - Decompose PerformAsyncLaunch into the platform hierarchy. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D37306

--HG--
extra : moz-landing-system : lando
2019-07-11 15:27:58 +00:00
Bobby Holley
6be1da5376 Bug 1563832 - Move a few things into BaseProcessLauncher. r=jld
I'm not convinced the current comment about being race-free is accurate
in context of the launcher pool. It probably _is_ correct under this
patch, because ProcessLaunchers should only be constructed on a single
thread, but it's easy enough just to make it atomic.

Hopefully moving the timestamp doesn't perturb telemetry too much.

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

--HG--
extra : moz-landing-system : lando
2019-07-11 15:27:51 +00:00
Bobby Holley
9eac67a792 Bug 1563832 - Create an inheritance hierarchy for the platform-specific bits of process launching. r=jld
Differential Revision: https://phabricator.services.mozilla.com/D37304

--HG--
extra : moz-landing-system : lando
2019-07-11 15:27:47 +00:00
Bobby Holley
a2b5e1de1e Bug 1562763 - Factor process launching into a helper class, and use more promises. r=jld
This is intended to facilitate future work to break up
PerformAsyncLaunch into asynchronous pieces. It also aims to fix some
raciness around access to state in the GeckoChildProcessHost instance.
There appears to be at least one data race in the existing code, in which
OpenPrivilegedHandle are run on both the launcher thread and the IO
thread without synchronization.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 22:37:37 +00:00
Bobby Holley
3b7fbc734f Bug 1562763 - Move some types around. r=jld
Having to namespace these into GeckoChildProcessHost is annoying. The
|using| declarations help to some extent, but it's easier to just put
them in mozilla::ipc.

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

--HG--
extra : moz-landing-system : lando
2019-07-10 22:37:35 +00:00
Bobby Holley
e40b45dc28 Bug 1562763 - Don't crash child or parent on failed InitBackground. r=nika
This can happen if the parent starts shutting down before a child has
finished starting up.

The main thread case in the child has always just warned, and this MOZ_CRASH was
added recently to the dispatch case in [1]. This can happen if the
parent starts shutting down while the child is still initializing.

[1] https://hg.mozilla.org/mozilla-central/rev/bd8fd9a22dc08d63cec68de475182a1b8eeeca4b

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

--HG--
extra : moz-landing-system : lando
2019-07-10 22:37:32 +00:00
Barret Rennie
0b66a71420 Bug 1289211 - Rename InfallibleTArray to nsTArray in ipc/ r=nika
Differential Revision: https://phabricator.services.mozilla.com/D36961

--HG--
extra : moz-landing-system : lando
2019-07-10 03:31:24 +00:00
Jonathan Kingston
31441f82ea Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504

--HG--
extra : moz-landing-system : lando
2019-07-08 16:37:45 +00:00
Sylvestre Ledru
fc2eb5393c Bug 1562642 - Part 2 - Add missing MPL2 headers r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D37146

--HG--
extra : moz-landing-system : lando
2019-07-08 09:27:47 +00:00
Victor Porof
251f88082d Bug 1561435 - Format ipc/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 2fa9743b80561bb68a7b4bf76b1b636d97d82942
2019-07-05 10:48:16 +02:00
Narcis Beleuzu
a89b67e772 Backed out 15 changesets (bug 1479960, bug 1426526, bug 1534780, bug 1536697) for toolchain bustages on UniquePtrExtensions.h . CLOSED TREE
Backed out changeset a8518ea4b594 (bug 1479960)
Backed out changeset 7172762c4b87 (bug 1536697)
Backed out changeset 2ea5ccb8f3a1 (bug 1426526)
Backed out changeset d892a888fe9c (bug 1426526)
Backed out changeset 2c4d12bdfec3 (bug 1479960)
Backed out changeset 8a322064cf6d (bug 1479960)
Backed out changeset 47d387b6cd4a (bug 1479960)
Backed out changeset 8332565a6943 (bug 1479960)
Backed out changeset 9d7f1835f96f (bug 1479960)
Backed out changeset 0aa8af4965c5 (bug 1479960)
Backed out changeset 036809330a51 (bug 1479960)
Backed out changeset 39e18373e3d3 (bug 1479960)
Backed out changeset 6c2b995a9d30 (bug 1479960)
Backed out changeset 3c2b31744645 (bug 1534780)
Backed out changeset 26bb00a94d5d (bug 1534780)
2019-06-28 22:42:00 +03:00
shindli
c0ca77697c Merge inbound to mozilla-central. a=merge 2019-06-21 12:34:14 +03:00
Tarek Ziadé
a494b08766 Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

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

--HG--
extra : moz-landing-system : lando
2019-06-21 01:33:47 +00:00
Jed Davis
d9d1bec632 Bug 1479960 - Add unit tests for shared memory freezing. r=froydnj
Also refactor SharedMemoryBasic::SystemProtect to allow testing cases
that are expected to fail.

Depends on D26748

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

--HG--
rename : ipc/moz.build => ipc/gtest/moz.build
extra : moz-landing-system : lando
2019-06-20 22:40:46 +00:00
Jed Davis
1388eadfff Bug 1536697 - Fix error handling in base::SharedMemory::Map. r=froydnj
If mmap failed, we'd leave the memory_ member variable set to MAP_FAILED,
but everything else in this file checks for nullptr (and only nullptr) to
test if the pointer is valid.

Also, this removes the debug assertion that the mmap succeeded, to allow
writing unit tests where we expect it to fail (e.g., for insufficient
permissions).

Depends on D26747

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:44 +00:00
Jed Davis
5c3a0a30d3 Bug 1426526 - Delete file_util from ex-Chromium IPC source. r=froydnj
Depends on D26746

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:40 +00:00
Jed Davis
b1c82b278b Bug 1479960 - Add freezing of IPC shared memory. r=froydnj,kmag
This allows writing to shared memory and then making it read-only before
sharing it to other processes, such that a malicious sandboxed process
cannot regain write access.  This is currently available only in the
low-level base::SharedMemory interface.

The freeze operation exposes the common subset of read-only shared
memory that we can implement on all supported OSes: with some APIs
(POSIX shm_open) we can't revoke writeability from existing capabilies,
while for others (Android ashmem) we *must* revoke it.  Thus, we require
that the writeable capability not have been duplicated or shared to
another process, and consume it as part of freezing.  Also, because in
some backends need special handling at creation time, freezeability must
be explicitly requested.

In particular, this doesn't allow giving an untrusted process read-only
access to memory that the original process can write.

Note that on MacOS before 10.12 this will use temporary files in order to
avoid an OS security bug that allows regaining write access; those OS
versions are no longer supported by Apple (but are supported by Firefox).

Depends on D26742

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:32 +00:00
Jed Davis
0a231ee919 Bug 1479960 - Clean up shared_memory_posix error handling. r=froydnj
This uses RAII to handle error-case cleanup in the POSIX backend for
SharedMemory::Create, to simplify the complexity that will be added to
support freezing.

Depends on D26741

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:28 +00:00
Jed Davis
6559e7ab1f Bug 1479960 - Fix max_size in shared_memory_posix. r=froydnj
The Unix backend for shared memory needs to keep the mapped size to pass
to munmap, while the Windows backend doesn't.  Currently it's reusing the
max_size field, and then zeroing it when it's unmapped, which breaks the
freezing use case.  This patch uses a dedicated field for that.

Depends on D26740

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:21 +00:00
Jed Davis
3c945a3e99 Bug 1479960 - Get rid of base::SharedMemory::handle. r=froydnj
Despite the comment saying not to use the "handle" except as an opaque
identifier, it is being used to pass the handle to other OS APIs.  Direct
access to the handle needs to be controlled to make sure freezing is
safe, so this patch replaces that with interfaces that are more explicit
about ownership and lifetime.

Depends on D26739

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:19 +00:00
Jed Davis
b916fc745c Bug 1479960 - Remove SHM_ANON support. r=froydnj
FreeBSD's SHM_ANON is useful for the usual case of shared memory, but it
doesn't support freezing.  It could be re-added later, but for now it's
simplest to remove it (and use named shm instead) while refactoring.

Depends on D26738

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:17 +00:00
Jed Davis
d32b9ba525 Bug 1534780 - Add free interconversion between UniqueFileHandle and ipc::FileDescriptor and use it in a few places. r=froydnj
Now that UniqueFileHandle can be used more widely, and with
ipc::FileDescriptor being essentially a copyable UniqueFileHandle, it
makes sense to add a move constructor and a "forget"-like method to
convert between them when needed.

Depends on D26737

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:15 +00:00
Jed Davis
35bc3bb540 Bug 1534780 - Move ipc::FileDescriptor's UniquePtr instance into MFBT as UniqueFileHandle. r=froydnj
MozReview-Commit-ID: 7bbGVIjTTaJ

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

--HG--
extra : moz-landing-system : lando
2019-06-20 22:40:13 +00:00
Boris Zbarsky
e0bd7114ae Bug 1559468 part 1. Move JS_DefineProfilingFunctions into InitClassesWithNewWrappedGlobal. r=mccr8
All callers of InitClassesWithNewWrappedGlobal already call it.

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

--HG--
extra : moz-landing-system : lando
2019-06-20 21:44:03 +00:00
myfreeweb
01916974b0 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
--HG--
extra : rebase_source : 69a374c26bcb8781e83aeb26058a2de349313bbc
extra : amend_source : 521bb6f2b5799bfca5f8b8b5bbe9e4fef1f2dd1e
2019-06-20 16:18:45 -04:00
Oana Pop Rus
288befd88a Backed out changeset f79736d79ee1 (bug 1529022) for build bustages in GeckoChildProcessHost.cpp a=backout 2019-06-20 01:57:00 +03:00
Tarek Ziadé
2b03934b7d Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

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

--HG--
extra : moz-landing-system : lando
2019-06-19 06:13:50 +00:00
Gurzau Raul
376affada3 Backed out changeset 11c118fa5f2b (bug 1529022) for build bustages at GeckoChildProcessHost.cpp a=backout 2019-06-19 09:07:19 +03:00
Tarek Ziadé
9f31044be3 Bug 1529022 - Add a GeckoChildProcessHosts iterator r=jld
Adds GeckoChildProcessHost::GetAll() and use it in ChromeUtils::GetProcInfo()

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

--HG--
extra : moz-landing-system : lando
2019-06-18 16:36:52 +00:00
Haik Aftandilian
d302444d67 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 22:55:27 +00:00
Dorel Luca
fb616d00a6 Backed out 2 changesets (bug 1498742) for OSX build bustages. CLOSED TREE
Backed out changeset f6da94d90350 (bug 1498742)
Backed out changeset 4f3e83d8de59 (bug 1498742)
2019-06-15 00:13:05 +03:00
Haik Aftandilian
c0874f2dba Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-14 20:12:01 +00:00
Bogdan Tara
d62176d3d7 Backed out 2 changesets (bug 1498742) for nsMacUtilsImpl.cpp related build bustage a=backout
Backed out changeset 6729dc168afd (bug 1498742)
Backed out changeset e5eed57a9111 (bug 1498742)
2019-06-14 12:50:04 +03:00
Jed Davis
ded11c124c Bug 1554244 - Tolerate multiple calls to MessageChannel::Close. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D34804

--HG--
extra : moz-landing-system : lando
2019-06-13 15:40:58 +00:00
Sebastian Streich
5462226932 Bug 1450965 Skip Cors Check for Early WebExtention Redirects r=mayhemer
Differential Revision: https://phabricator.services.mozilla.com/D30509

--HG--
extra : moz-landing-system : lando
2019-06-13 09:57:13 +00:00
Jonathan Kingston
a5ba216f93 Bug 1315460 - Removal of keygen element r=keeler,baku,jld,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D22810

--HG--
extra : moz-landing-system : lando
2019-06-13 08:58:07 +00:00
Haik Aftandilian
f87e72036e Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-13 06:32:37 +00:00
Andreea Pavel
307e3f181b Backed out 2 changesets (bug 1498742) for build bustages at GMPProcessParent.cpp on a CLOSED TREE
Backed out changeset 5f9d32e26c71 (bug 1498742)
Backed out changeset ffc8d151cf3a (bug 1498742)
2019-06-13 04:38:56 +03:00
Haik Aftandilian
0f858863b6 Bug 1498742 - Part 2 - Start the GMP sandbox earlier during process startup r=jya,cpearce
Change the Mac GMP process launch to include sandboxing params on the command line to allow the sandbox to be started earlier during GMP process launch. Content, extension, and RDD processes have already been changed to start the sandbox earlier.

Update GMPProcessParent to override GeckoChildProcessHost methods used to construct sandboxing parameters. Pass the plugin path as a sandbox parameter so that the sandbox rules can whitelist the plugin directory which is now read after the sandbox is enabled in the plugin process. On development builds, pass "testingReadPath" params so directories needed during automated tests can be whitelisted.

Update Mac sandboxing code to detect GMP sandbox params on the command line and enable the sandbox with additional arguments needed for early sandbox start.

Allow reverting to the old implementation by setting security.sandbox.gmp.mac.earlyinit to false.

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

--HG--
extra : moz-landing-system : lando
2019-06-12 23:41:53 +00:00
Jean-Yves Avenard
638940d1fc Bug 1554559 - P1. Test for invalid arguments. r=kershaw
Will also silence static analysis in phabricator whenever a caller of this code is used.

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

--HG--
extra : moz-landing-system : lando
2019-06-11 06:29:23 +00:00
Matt Woodrow
15fec19828 Bug 1555891 - Merge PVideoDecoder into PRemoteDecoder. r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D33587

--HG--
extra : moz-landing-system : lando
2019-06-11 02:01:51 +00:00
Matt Woodrow
4908a84df2 Bug 1555891 - Merge PVideoDecoderManager into PRemoteDecoderManager. r=jya,jld
Differential Revision: https://phabricator.services.mozilla.com/D33586

--HG--
extra : moz-landing-system : lando
2019-06-11 02:01:34 +00:00
Tarek Ziadé
c10664f1c1 Bug 1533675 - Name all threads in Firefox r=Ehsan
This patch adds thread names where they are missing

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

--HG--
extra : moz-landing-system : lando
2019-06-06 21:07:29 +00:00
Christoph Kerschbaumer
242bf62249 Bug 1555050: Always (if non null) set any CSP as cspToInherit on the loadinfo of new document load. Update documentation for GetCSP, GetPreloadCSP() and GetCSPToInherit and update two callsites which called GetCSP instead of GetCSPToInherit. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33499

--HG--
extra : moz-landing-system : lando
2019-06-06 20:19:56 +00:00
Bogdan Tara
bde97b25f5 Backed out 2 changesets (bug 1555050) for test_reloadInFreshProcess.html failures CLOSED TREE
Backed out changeset f5e954d593f8 (bug 1555050)
Backed out changeset b5b99e78b753 (bug 1555050)
2019-06-06 23:13:52 +03:00
Christoph Kerschbaumer
a9912a9803 Bug 1555050: Always (if non null) set any CSP as cspToInherit on the loadinfo of new document load. Update documentation for GetCSP, GetPreloadCSP() and GetCSPToInherit and update two callsites which called GetCSP instead of GetCSPToInherit. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33499

--HG--
extra : moz-landing-system : lando
2019-06-06 18:09:03 +00:00
Nika Layzell
03a2f40528 Bug 1553272 - Eliminate the unnecessary ProtocolState object, r=froydnj
The vast majority of the virtual methods which were used on ProtocolState were
actually methods which only had meaningful implementations on the toplevel
protocol. This patch adds a new field to IProtocol holding a direct pointer to
the protocol's `IToplevelProtocol`, and the methods formerly implemented with
ProtocolState now directly call the corresponding method on IToplevelProtocol.
IToplevelProtocol then shadows these methods with the toplevel protocol
implementation, meaning that the right code is run in the right places.

In addition, some state was maintained for protocols inside of the separate
ProtocolState allocation, and this patch moves that state back into the actor
itself.

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

--HG--
extra : moz-landing-system : lando
2019-06-06 14:57:34 +00:00
sotaro
3d0c73c202 Bug 1537586 - Address build failure with --disable-printing r=bobowen,froydnj
Make nsIWebBrowserPrint included unconditionally for addressing nsIDocShell.rs build failure.

Remove direct_call of PPrinting and PRemotePrintJob. Their ipdl are built unconditionally, but their derived classes are not built with --disable-printing.

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

--HG--
extra : moz-landing-system : lando
2019-06-05 01:25:36 +00:00
Gabriele Svelto
76021a664b Bug 1555917 - Exception handler and crash reporter client cleanup r=froydnj
This patch includes multiple changes cleaning up various aspects of the crash
reporter client and exception handler:

* Some Unix-specific code was moved out from the base crashreporter client
  code and into the appropriate platform implementation
* Functions used to open files in the crashreporter client now accept C++
  `std::ios` flags instead of unreadable booleans
* Useless character conversion routines were removed from the
  minidump-analyzer
* Crash annotations are not serialized into a huge string anymore every time
  they change. They are all written out individually during an exception.
* `WriteEscapedMozCrashReason()` uses the exception-safe `my_strlen()` instead
  of plain `strlen()`
* The Windows-specific DLL-blocklist shutdown was removed from the Linux &
  macOS Breakpad callbacks
* The `CrashReporterHost`, `CrashReporterClient` and
  `CrashReporterMetadataShmem` classes now take `nsACString` references
  instead of `nsCString` ones since they never modify their contents

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

--HG--
extra : moz-landing-system : lando
2019-05-31 21:54:03 +00:00
shindli
b374b306cf Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-05-30 06:50:22 +03:00
Mike Hommey
2abcc3d7cb Bug 1553363 - Generalize the *_impl goop for allocation functions in mozglue. r=froydnj
The current situation is suboptimal, where we have the same goop
repeated in multiple files, and where things kinda sorta work out fine
thanks to the linker for files that would have been forbidden, except
when the linker doesn't do its job, which apparently happen on
mingwclang builds.

This change only really covers C++ code using operator new/delete, and
not things that would be using malloc/free, because it's easier.
malloc/free is left for a followup.

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

--HG--
extra : moz-landing-system : lando
2019-05-29 22:49:42 +00:00
PHO
08186e772d Bug 1553389 - Fix "pipe error: Message too long" on NetBSD 2019-05-22 15:13:33 +09:00
Christoph Kerschbaumer
046bb46c32 Bug 1553742: Null Check CSP before calling CSPToCSPInfo to avoid half initialized state of cspinfo. r=baku,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D32990

--HG--
extra : moz-landing-system : lando
2019-05-29 15:42:13 +00:00
Jed Davis
61b50c514e Bug 1548525 - Detect Android launch failure. r=snorp
Currently the Android implementation of process launch signals failure by
returning pid 0 through an out-parameter; we don't check for that, so we
report success and then the bad pid spreads through IPC until it sets off
an assertion somewhere else.  This patch adds the missing check and
strengthens an assertion that would have caught the problem more directly.

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

--HG--
extra : moz-landing-system : lando
2019-05-28 21:08:36 +00:00
Razvan Maries
6fbdaf61c3 Backed out changeset f9699ae30f4d (bug 1213601) on jrmuizel's request. 2019-05-26 18:12:56 +03:00
Sylvestre Ledru
d57d4905f1 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-05-25 17:46:15 +00:00
Nika Layzell
77532c1fa6 Bug 1553270 - Part 2: Allow getting a protocol's name from its ProtocolID, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D32043

--HG--
extra : moz-landing-system : lando
2019-05-24 22:36:49 +00:00
Nika Layzell
406f5cc2d8 Bug 1553270 - Part 1: Store the protocol ID on IProtocol directly, r=froydnj
This allows for the getter to be used in IProtocol's destructor, and generally
brings IProtocol more in line with IToplevelProtocol.

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

--HG--
extra : moz-landing-system : lando
2019-05-24 20:21:35 +00:00
myfreeweb
e6dc1a7382 Bug 1213601 - Implement kinetic/inertial scrolling (fling) for Gtk touchpads. r=botond,karlt
--HG--
extra : rebase_source : c89a97e40aa59e1038530becdb53c2d7b992db7b
2019-05-24 13:31:34 -04:00
Haik Aftandilian
42b2325351 Bug 1550771 - Deadlock in SharedMemoryBasic_mach triggered by AV1 playback r=jld
Don't hold gMutex when calling HandleSharePortsMessage() from PortServerThread to avoid deadlock.

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

--HG--
extra : moz-landing-system : lando
2019-05-22 01:33:46 +00:00
Christoph Kerschbaumer
b633427366 Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Nika Layzell
259a8f1974 Bug 1511161 - Part 2: Use Code throughout IPDL codegen, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D30234

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:43 +00:00
Nika Layzell
c2a887bfba Bug 1511161 - Part 1: Add new Code object to IPDL codegen, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D13467

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:41 +00:00
Nika Layzell
e71da28e87 Bug 1547218 - Part 2: Stop special casing pointer types in ParamTraits specialization, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D29779

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:39 +00:00
Nika Layzell
57a29bfd71 Bug 1547218 - Part 1: Handle container IPDLParamTraits types more consistently, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D29778

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:37 +00:00
Nika Layzell
45a2a8e839 Bug 1548717 - Part 2: Check CanSend before trying to send, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D30236

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:35 +00:00
Nika Layzell
833e7d5780 Bug 1548717 - Part 1: Remove the unnecessary internal liveness state value, r=froydnj
These values were only being used for assertions within IPDL send
methods. They had no positive impact beyond causing crashes when sending
a message over a dead actor.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:27 +00:00
Nika Layzell
1bd8912413 Bug 1547085 - Discard messages sent to dead actors, r=jld
Historically we've failed very loudly when receiving a message which was
destined for an actor which had already been destroyed. This had the
effect of requiring manual teardown for most actors, as work would need
to be done to ensure messages weren't sent when the target actor might
be about to tear itself down.

In addition, due to this teardown work being done outside of IPDL, this
work would have to manually be checked in subactors, and involved the
addition of new flags, such as `mIPCOpen`, in order to track whether IPC
had begun to be shut down, and discard messages manually if it had.

It is an ongoing issue that we occasionally miss places where we need to
discard messages, and it is easy to not remember to perform async
destruction when building a new actor, meaning that extra work is
required to correctly discard messages when the actor is being torn
down. Due to the correct decision, almost all of the time, being to
discard the message, this patch takes the approach of transforming the
crash which was previously performed into a message discard.

The hope is that this will reduce the burden on actor implementors, by
allowing the use of `Send__delete__` without first synchronizing with
the remote actor, as well as reduce unintentional crashes.

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

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:25 +00:00
Nika Layzell
95e8f0306b Bug 1540731 - Part 2: Move toplevel actors to override ActorDestroy, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28573

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:21 +00:00
Nika Layzell
c293c9007f Bug 1540731 - Part 1: Manage actor object lifecycles within IPC, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D28572

--HG--
extra : moz-landing-system : lando
2019-05-21 17:04:14 +00:00
Gabriele Svelto
9f9c7c8211 Bug 1547698 - Refactor the code that writes the .extra file for a content process crash or hang r=froydnj
Upon a content process crash or hang crash annotations were incrementally
written into the .extra file starting with the exception handler callback and
then in a number of different places before the file was ready for submission.
This had a number of downsides: since the annotations were directly added to
the file it was impossible to tell which ones were already written at a
certain point in time, additionally some were written twice or even thrice.
The code doing the writing would also behave differently depending on the
contents of the file, the parameters passed to it and the contents of global
variables.

This change overhauls the whole process by keeping the annotations into a
temporary per-crash annotation table which is filled with all the required
annotations before being written out in a single pass when they are ready.

The annotations are gathered from the main process annotation table, the
per-process one (held by the CrashReporterHost) and exception-time specific
ones.

The resulting annotations are slightly different than before the patch: first
of all there are no more duplicate entries in the .extra file and secondly all
content/plugin process hangs annotations are properly filtered, before
annotations that were main process-only would leak into them.

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

--HG--
extra : moz-landing-system : lando
2019-05-18 16:19:55 +00:00
Gabriele Svelto
f7b311b4a9 Bug 1547698 - Remove unused IPC methods for taking minidumps r=froydnj
This removes the XRE_TakeMinidumpForChild() which does not need to be
exposed anymore in the XUL API as well as
IToplevelProtocol::TakeMinidump() which was simply unused.

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

--HG--
extra : moz-landing-system : lando
2019-05-14 14:06:19 +00:00
Jan Varga
2d3ff6b0f5 Bug 1534882 - Don't crash when synchronously constructing actor during content shutdown, r=nika
This patch changes the way how we handle sync ctor send errors. They are now
ignored and treated like messages which successfully were queued to send, but
got lost due to the other side hanging up.
For more details, see bug 1509362 which originally did it for async ctors.
The main differences here are that we destroy the actor and we return null when
the send fails.

Differential Revision: https://phabricator.services.mozilla.com/D31517
2019-05-16 21:09:18 +02:00
Ryan Hunt
c2729d0df1 Bug 1548939 - Remove direct_call overrides for PBrowser. r=nika
This isn't needed now that BrowserParent has the same name
as the protocol.

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

--HG--
extra : rebase_source : dbfc1722a43e1f8fbbe01f1766a397b570fa7d6a
extra : source : 792b49f269bb6308e152290ed0dfa03efbffa536
extra : histedit_source : e001669549af547f5387a3b010ad52ebee6eea3f
2019-04-25 15:28:44 -05:00
Ryan Hunt
1751a8ddbf Bug 1548939 - Devirtualize BrowserChild IPDL methods. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D30150

--HG--
extra : rebase_source : d657164153889209adfe4b946c56bcbb8f7c858b
extra : histedit_source : b5df9ab9ec8202f5c00c166baf7029e6290da728
2019-05-06 14:29:29 -05:00
Bas Schouten
cf839e9e77 Bug 1545787: Make EndRecording occur synchronously so it only returns once all files are written. r=mstange r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D28199

--HG--
extra : rebase_source : 6288d2e56a7deed64b29e052c7f179ac09392717
2019-04-19 16:59:43 +02:00
Mihai Alexandru Michis
e329bc4d67 Merge mozilla central to mozilla inbound on a CLOSED TREE 2019-05-04 01:00:29 +03:00
Andrea Marchesini
f8565bf748 Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-03 17:13:17 +00:00
Bogdan Tara
386d23bfe7 Backed out 4 changesets (bug 1320404) for test_permmanager_load_invalid_entries.js failures
Backed out changeset 7c2f4e64d38e (bug 1320404)
Backed out changeset a7e7c0251179 (bug 1320404)
Backed out changeset dd741b25a244 (bug 1320404)
Backed out changeset de9073c57d20 (bug 1320404)
2019-05-03 06:12:25 +03:00
Andrea Marchesini
138cee6dea Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-02 17:24:51 +00:00
Jan Varga
864dcf0703 Bug 1513915 - LSNG: LoadItem could return more items (up to the prefill limit); r=asuth,jld
Differential Revision: https://phabricator.services.mozilla.com/D26476
2019-04-08 10:56:19 +02:00
Cosmin Sabou
a884fb99d8 Backed out 4 changesets (bug 1320404) for xperf failures on permissions.sqlite-journal.
Backed out changeset fbacf18b6532 (bug 1320404)
Backed out changeset fed7c475d75c (bug 1320404)
Backed out changeset 557b586f774a (bug 1320404)
Backed out changeset 5a20b5f43280 (bug 1320404)
2019-05-02 04:51:18 +03:00
Andrea Marchesini
7e61125d8f Bug 1320404 - Remove appId from origin attributes - part 1 - OriginAttributes and nsIPrincipal, r=Ehsan,flod
Differential Revision: https://phabricator.services.mozilla.com/D29353

--HG--
extra : moz-landing-system : lando
2019-05-01 23:21:45 +00:00
Sylvestre Ledru
e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Aaron Klotz
d16102663e Bug 1535704: Part 4 - When sandboxed, mscom::ProcessRuntime must make the MTA thread impersonate using the main thread's token; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D27834

--HG--
extra : moz-landing-system : lando
2019-04-23 17:54:14 +00:00
Jonathan Kew
64c9983c83 Bug 1514869 - patch 8 - Make the SetCharacterMap message async, and use the unshared gfxCharacterMap in the content process until the shared one is in place. r=jwatt,jld
Differential Revision: https://phabricator.services.mozilla.com/D24137

--HG--
extra : moz-landing-system : lando
2019-04-29 14:39:05 +00:00
Jonathan Kew
9811ca8336 Bug 1514869 - patch 1 - Basic implementation of a cross-process sharable font list, using shared memory to store the list of families & faces, and per-font character maps. r=jwatt,jld
Differential Revision: https://phabricator.services.mozilla.com/D22937

--HG--
extra : moz-landing-system : lando
2019-04-27 15:37:29 +00:00
Dana Keeler
c90cfeaf74 bug 1441989 - remove ContentVerifier r=baku,mayhemer
ContentVerifier has been dead code since bug 1355166 (which, incidentally, means
it has no tests). Its presence is preventing improvements to
ContentSignatureVerifier (see e.g. bug 1534600), so this patch removes it.
As a result, the nsILoadInfo attributes verifySignedContent and enforceSRI are
also unused, so this patch removes those as well.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 22:21:36 +00:00
Andrea Marchesini
1739e25925 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - IPCBlobInputStream actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28191

--HG--
extra : moz-landing-system : lando
2019-04-26 18:04:02 +00:00
Andrea Marchesini
7d30a9996e Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - TemporaryIPCBlob actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28190

--HG--
extra : moz-landing-system : lando
2019-04-26 18:01:53 +00:00
Andrea Marchesini
69fd7c57d7 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - PendingIPCBlob actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28189

--HG--
extra : moz-landing-system : lando
2019-04-26 18:01:08 +00:00
Andrea Marchesini
de9252905e Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - FileCreator actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28188

--HG--
extra : moz-landing-system : lando
2019-04-26 18:00:33 +00:00
Andrea Marchesini
35bde55efd Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug
FileCreatorHelper creates a FileBlobImpl on the main-thread and, because of
this, we end up executing I/O operations on that thread, slowing down other
components.  With this patch, FileCreatorHelper logic is moved to PBackground.

That the 'type' getter is still called on the main-thread because FileBlobImpl
uses nsIMIMEService which is a non thread-safe component.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 17:53:07 +00:00
Honza Bambas
5f945421d4 Bug 1493599 - Expose reason of security blocking on nsILoadInfo and add new http observer notification for failed asyncOpens, r=Honza,dragana
Differential Revision: https://phabricator.services.mozilla.com/D23150

--HG--
extra : moz-landing-system : lando
2019-04-26 10:59:41 +00:00
Bogdan Tara
240b24fbe1 Backed out 5 changesets (bug 1534712, bug 1545758) for test_ext_webrequest_upload.html failures CLOSED TREE
Backed out changeset 447b0f5a5802 (bug 1545758)
Backed out changeset 0528f8f11814 (bug 1545758)
Backed out changeset d85c68071b54 (bug 1545758)
Backed out changeset 10b380bc5b0c (bug 1545758)
Backed out changeset 57136f4e7b54 (bug 1534712)
2019-04-25 12:36:51 +03:00
Andrea Marchesini
3512672cd3 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - IPCBlobInputStream actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28191

--HG--
extra : moz-landing-system : lando
2019-04-25 07:44:47 +00:00
Andrea Marchesini
6bbc401f45 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - TemporaryIPCBlob actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28190

--HG--
extra : moz-landing-system : lando
2019-04-25 07:44:29 +00:00
Andrea Marchesini
50fa1de562 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - PendingIPCBlob actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28189

--HG--
extra : moz-landing-system : lando
2019-04-25 07:44:03 +00:00
Andrea Marchesini
f39753b4b8 Bug 1545758 - Move dom/file IPC components into mozilla::dom namespace - FileCreator actors, r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D28188

--HG--
extra : moz-landing-system : lando
2019-04-25 07:43:38 +00:00
Andrea Marchesini
cbdda85d6e Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug
FileCreatorHelper creates a FileBlobImpl on the main-thread and, because of
this, we end up executing I/O operations on that thread, slowing down other
components.  With this patch, FileCreatorHelper logic is moved to PBackground.

That the 'type' getter is still called on the main-thread because FileBlobImpl
uses nsIMIMEService which is a non thread-safe component.

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

--HG--
extra : moz-landing-system : lando
2019-04-25 07:41:10 +00:00
Brindusan Cristian
b3b1ca15aa Merge mozilla-central to autoland. a=merge CLOSED TREE
--HG--
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
2019-04-25 01:43:17 +03:00
Andrew McCreight
74534d3cbc Bug 1545299 - Make UniquePtr work more like the other types with a base type. r=nika
This consolidates array, maybe and unique ptrs in IPDL into a single
"has base type" qualifier, for types that wrap another type. I'm not
sure this patch fixes everything, but I think it is at least more
correct.

It also adds checking for the stuff inside the UniquePtr<>, because
the intent seems to be to allow things like protocol types in there.

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

--HG--
extra : moz-landing-system : lando
2019-04-24 20:19:49 +00:00
Andrew McCreight
87ae116d7f Bug 1545306 - Add some tests for using moveonly. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D28562

--HG--
extra : moz-landing-system : lando
2019-04-23 21:57:48 +00:00
Jed Davis
f045c4ef58 Bug 1544825 - Use IPDL type names instead of truncated C++ names in deserialization error messages. r=nika
Currently, when deserialization fails, the error message contains the base
name of the C++ type, without template parameters; this means we can get
unhelpfully vague errors about `RefPtr` or `Maybe` or `nsTArray`.  (The
identical error cases are then merged by the compiler, so the execution
path can't be recovered from the crash dump.)

This patch uses the IPDL type instead.  It would be possible to invoke
the code generator to use the full C++ type, but more complicated for no
real benefit.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 14:40:48 +00:00
Aaron Klotz
557ff156f6 Bug 1546158: Add option to mscom::EnsureMTA to forcibly dispatch events to its thread; r=Jamie
In sandboxed processes with Win32k lockdown, when we initialize COM using an MTA
on a background thread, the main thread is automatically initialized by the COM
runtime as having an implicit MTA.

This is fine, except for the fact that if we want to enqueue any work that needs
to operate specifically on the EnsureMTA thread, it won't happen.

This patch adds a flag to EnsureMTA's constructor that ensures that, even if the
current thread is in an MTA (implicit or otherwise), we still forcibly enqueue
the closure specifically to the EnsureMTA thread.

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

--HG--
extra : moz-landing-system : lando
2019-04-23 02:17:17 +00:00
Aaron Klotz
5a16846aa3 Bug 1535704: Part 1 - Move IsWin32kLockedDown into mozglue; r=bobowen
Differential Revision: https://phabricator.services.mozilla.com/D27832

--HG--
extra : moz-landing-system : lando
2019-04-22 19:13:23 +00:00
Ciure Andrei
d753cf6b80 Merge mozilla-central to mozilla-inbound. a=merge CLOSED TREE 2019-04-24 07:30:32 +03:00
Ryan Hunt
d6509bb237 Bug 1534395 - Rename TabChild to BrowserChild. r=nika
This commit renames TabChild to BrowserChild.

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

--HG--
rename : dom/base/InProcessTabChildMessageManager.cpp => dom/base/InProcessBrowserChildMessageManager.cpp
rename : dom/base/InProcessTabChildMessageManager.h => dom/base/InProcessBrowserChildMessageManager.h
rename : dom/ipc/TabChild.cpp => dom/ipc/BrowserChild.cpp
rename : dom/ipc/TabChild.h => dom/ipc/BrowserChild.h
extra : rebase_source : e7fcfb845a971a2760e73d517e24da18ce2551b5
extra : histedit_source : d1991334ccb107fe56e478865f22fd97b041a317
2019-04-09 17:39:01 -05:00
Ryan Hunt
0eeced87be Bug 1534395 - Rename TabParent to BrowserParent. r=nika
This commit renames TabParent to BrowserParent.

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

--HG--
rename : dom/ipc/TabParent.cpp => dom/ipc/BrowserParent.cpp
rename : dom/ipc/TabParent.h => dom/ipc/BrowserParent.h
extra : rebase_source : d2706b9f42177d8de16068b7b1d088a44b8720a4
extra : histedit_source : a617ddac45c58050ef799116a67d2d983f2a8f6d%2C1d1dabd8761a32d548a6fbf1027be960698f6a5e
2019-04-09 16:38:15 -05:00
Ciure Andrei
d13f7bbf24 Backed out changeset 22c00a19e267 (bug 1534712) for causing test_bug536567_perwindowpb.html, browser_jsonview_save_json.js, browser_bookmark_backup_export_import.js to perma fail CLOSED TREE 2019-04-19 05:57:19 +03:00
Andrea Marchesini
98dc92353c Bug 1534712 - Port FileCreatorHelper to PBackground, r=smaug
FileCreatorHelper creates a FileBlobImpl on the main-thread and, because of
this, we end up executing I/O operations on that thread, slowing down other
components.  With this patch, FileCreatorHelper logic is moved to PBackground.

That the 'type' getter is still called on the main-thread because FileBlobImpl
uses nsIMIMEService which is a non thread-safe component.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 21:28:16 +00:00
Nika Layzell
c20d338fe9 Bug 1538353 - Part 1: Add a SetEventTargetForRoute helper to allow setting EventTargets for Endpoint-constructed actors, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D24566

--HG--
extra : moz-landing-system : lando
2019-04-17 00:51:32 +00:00
hafsa
0f9ddc3fdd Bug 1494469 - Removed duplicate IPC::MAX_MESSAGE_SIZE constant r=jld
The maximum size of an IPC message is defined twice; IPC::Channel::kMaximumMessageSize = 256 MiB and IPC::MAX_MESSAGE_SIZE = 65 KiB . The latter one is used for Windows printing and its small size could cause errors.

I removed the small constant, and made changes to the files using it :
  - The windows printing file now uses kMaximumMessageSize / 2
  - nsWebBrowserPersist uses its old constant

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:01:41 +00:00
Sylvestre Ledru
7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Jeff Walden
43acc4e9ce Bug 1543458 - Compile lines of UTF-8 interactive input to xpcshell and jsshell without inflating to UTF-16. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26956

--HG--
extra : rebase_source : b7c8192533c8b8a6b824441c9813d5b928bb9900
2019-04-10 09:42:58 -07:00
Jeff Walden
08efb53319 Bug 1543455 - Make JS::CompileUtf8{,ForNonSyntacticScope} omit Utf8 from their names and take SourceText<Utf8Unit>&. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26951

--HG--
extra : rebase_source : dc8b4fd9f60eb56e4e438b143aff45f2ac691c82
2019-04-09 17:03:32 -07:00
Valentin Gosu
06334e695a Bug 1530303 - Put CrossOriginOpenerPolicy in BrowsingContext r=nika
Differential Revision: https://phabricator.services.mozilla.com/D23935

--HG--
extra : moz-landing-system : lando
2019-04-09 20:10:13 +00:00