Commit Graph

5588 Commits

Author SHA1 Message Date
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