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

5692 Коммитов

Автор SHA1 Сообщение Дата
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