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

6230 Коммитов

Автор SHA1 Сообщение Дата
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Kershaw Chang 13c4c8d567 Bug 1648996 - Keep the source stream open after serializing, r=baku
The main reason of this patch is that the source stream will be closed when `InputStreamHelper::SerializeInputStreamAsPipe` is called, but when `InputStreamHelper::SerializeInputStreamAsPipe` is not called, the stream is stayed opened. I think we should make the behavior of serialization stream consistent, which is keeping the source stream opened.

Differential Revision: https://phabricator.services.mozilla.com/D81978
2020-08-03 10:39:48 +00:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Butkovits Atila 64a8612aa9 Backed out changeset 562a834a3692 (bug 1656349) for build bustages at BackgroundParentImpl. CLOSED TREE 2020-08-01 01:02:44 +03:00
Chris Martin 583e1cc437 Bug 1656349 - Refactor the IPC lifetimes for the PGamepadEventChannel object r=daoshengmu
Change the GamepadEventChannel so it is fully-initialized by the IPC
constuctor and needs no separate "init" message, and so its completely
destroyed by the ActorDestroy() message so it needs no "cleanup" message.

This simplifies the object lifetime, as well as unifies the IPC error vs
clean shutdown paths.

Differential Revision: https://phabricator.services.mozilla.com/D85481
2020-07-31 19:40:55 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
James Teh de10571c3c Bug 1654969: Always disable COM pings for mscom::FastMarshaler (and thus mscom::Interceptor). r=aklotz
Previously, we only did this when IsCallerExternalProcess() returned false.
There are three reasons for changing this:

1. There seem to be cases where IsCallerExternalProcess() returns true even when marshaling for a COM query in the MTA.
2. After bug 1627084, we pre-build a11y handler payloads on the main thread for bulk fetch calls. That will marshal interceptors. However, IsCallerExternalProcess() can't work in that case because it's not running on the thread on which the COM call is being handled.
3. If MSHLFLAGS_NOPING is used, Release calls from remote clients are never sent to the server. So, as soon as we use NOPING for our parent process, we're already going to leak references, even if we don't use NOPING for external callers. Put another way, as soon as we use NOPING for one caller, we may as well use it for all callers because COM pinging will never release the object anyway.

Differential Revision: https://phabricator.services.mozilla.com/D84778
2020-07-29 21:11:14 +00:00
Jed Davis 8c61fa8fde Bug 1656101 - Delete some IPC dead code (BrowserProcessSubThread types and an unused header). r=mccr8
An actual use of the `BACKGROUND_X11` thread may have briefly existed in
2009 but probably never shipped; it's been unused since then, and even
the comments mentioning it have been pruned (bug 909028, bug 624422).
The other thread types besides IO have been commented out ever since
they were first committed.

This patch also removes `x11_util.h`, which has been unused since 2017
(bug 1426284); earlier in history, it had one of those comments
mentioning the nonexistent X11 thread.

Differential Revision: https://phabricator.services.mozilla.com/D85346
2020-07-29 23:31:38 +00:00
Ricky Stewart 11e536dbb2 Bug 1655993 - Remove Punion_Comparable::test from sync-messages.ini r=mccr8
This shouldn't have been added in the first place.

Differential Revision: https://phabricator.services.mozilla.com/D85292
2020-07-29 15:02:11 +00:00
Sebastian Streich fb1d1dc1df Bug 1558394 - Pass the TriggeringSandboxFlags to nsILoadinfo r=ckerschb,smaug,necko-reviewers,valentin
Add triggering Sandbox flags to loadinfo
***
Pass triggering Flags into Loadinfo

***
Fix triggeringSandboxflags passing

Differential Revision: https://phabricator.services.mozilla.com/D69588
2020-07-29 11:43:23 +00:00
Ricky Stewart e8ac99b085 Bug 1655371 - Fix ipdl test breaking Windows ccov builds r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D85067
2020-07-27 22:21:48 +00:00
Ricky Stewart 3419d4de1d Bug 1654589 - Move `libpref` Python unit test to `mozbuild` suite r=froydnj,mccr8
It could go into its own test suite, but it 1) depends on `mozbuild` code, so the `mozbuild` suite as well as this new suite would be running on any push that touches `mozbuild` code anyway, and 2) this is code that runs during the build, so it's not out of place.

Differential Revision: https://phabricator.services.mozilla.com/D84547
2020-07-23 22:00:46 +00:00
Jon Bauman e893f80bba Bug 1654379 - Allow filtering the IPC log by multiple toplevel protocol names. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84587
2020-07-23 17:47:39 +00:00
Simon Giesecke b0cf19fc3b Bug 1654469 - Fix test protocol names. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D84656
2020-07-23 14:07:02 +00:00
Emilio Cobos Álvarez ff61891772 Bug 1653011 - Simplify and make WeakPtr<Derived> usable and compact. r=froydnj,sg,geckoview-reviewers,jgilbert,kvark,snorp
Having two classes in the inheritance chain inherit from SupportsWeakPtr
now won't compile, but you can use WeakPtr<Derived> when any base class
inherits from SupportsWeakPtr.

Differential Revision: https://phabricator.services.mozilla.com/D83674
2020-07-23 14:51:46 +00:00
Jed Davis 0e88912e37 Bug 1632687 - Part 3: Introduce an OS-dependent ChannelId type to reflect that Unix doesn't use channel IDs. r=mccr8
The Chromium-derived IPC code was, as far as I can tell, originally
designed for Windows and assumed that channels would be named pipes,
managed and connected to via `std::wstring` paths.  The port to Unix,
however, used unnamed `socketpair()` and passed them directly from
process to process, so it has no use for these channel IDs...  but it
still computes and propagates them, even though they're not used, using
deprecated wide-string APIs.

This patch introduces a typedef for an abstract channel ID, which is a
`wstring` on Windows and an empty struct on Unix, to allow removing the
string code where it's not needed without needing to completely redesign
the channel abstraction.

Differential Revision: https://phabricator.services.mozilla.com/D72260
2020-07-22 19:04:48 +00:00
Jed Davis d3f86fcc5c Bug 1632687 - Part 2: Remove the channel ID prefixes, which we've never used. r=mccr8
Chromium's fix for CVE-2011-3079 added an optional prefix parameter for
channel IDs, but we've never used it and have no plans to.  (Chromium
itself doesn't appear to have used it except with the prefixes "gpu"
and "nacl", and the code has since been removed completely in favor of
Mojo.)  So let's simplify things and remove it.

Differential Revision: https://phabricator.services.mozilla.com/D84276
2020-07-22 19:04:46 +00:00
Jed Davis 053045fdbe Bug 1632687 - Part 1.5: Protect the hard-coded IPC child fd from accidental multiple use. r=mccr8
This "create a pipe" operation has a mode where, on Unix, it doesn't
create a new transport but rather uses a hard-coded fd for the initial
IPC channel in a child process.  (It was originally written for Windows
and the assumption of using named pipes and pathnames for everything.)

That seems like a footgun, so this patch checks for trying to "create"
that pipe twice.  However, it doesn't check for accidentally calling it
in the parent process.

Differential Revision: https://phabricator.services.mozilla.com/D72259
2020-07-22 19:04:44 +00:00
Jed Davis c24433b717 Bug 1632687 - Part 1: Remove IPC PipeMap. r=mccr8
The PipeMap class tries to simulate the Windows channel model (named
pipes that the client opens by a pathname) on Unix.  However, it's
effectively dead code -- the map is empty except in some unit tests that
we never imported.

What we do is generate a "channel ID" with string formatting, then don't
pass it to the child or ever insert anything into the map, then the child
looks up an empty string and doesn't find it, so it uses the hard-coded
fixed fd for the initial channel.

Basically, it does nothing except maybe confuse unfamiliar readers, so
let's get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D72258
2020-07-22 19:04:37 +00:00
Simon Giesecke 548e423dad Bug 1654469 - Stop generating operator==/operator != for IPDL structs/unions by default. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84485
2020-07-22 17:24:33 +00:00
Simon Giesecke d824054ce7 Bug 1654181 - Add uncomparable keyword for structs and unions. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D84298
2020-07-22 09:11:52 +00:00
Jeff Gilbert 35f892e782 Bug 1607940 - Stand up webgl.out-of-process:true path. r=handyman,nika,froydnj
* Use clearer pref names.
* Default (and only support) IPDL dispatching.
* Make DispatchCommands async-only.
* Sync ipdl command per sync webgl entrypoint.
  * Eat the boilerplate cost, since there's not too many.
* Run SerializedSize off same path as Serialize.
* All shmem uploads go through normal DispatchCommands.
* Defer pruning of dead code for now so we can iterate quickly.
* Use Read/Write(begin,end) instead of (begin,size).
  * This would have prevented a bug where we read/wrote N*sizeof(T)*sizeof(T).

Differential Revision: https://phabricator.services.mozilla.com/D81495
2020-07-21 22:56:52 +00:00
Andrew Osmond d933968108 Bug 1582954 - Use posix_fallocate if available to avoid lazy allocation for shared memory. r=jld
WebRender makes extensive use of shared memory buffers, particularly for
images decoded in the content process. These images can be arbitrarily
large, and there being insufficient memory for an allocation must be
handled gracefully.

On Linux, we will currently crash with a SIGBUS signal during image
decoding instead of just displaying the broken image tag. This is
because the pages backing the shared memory are only allocated when we
write to them. This blocks shipping WebRender on Linux.

This patch uses posix_fallocate to force the reservation of the pages,
and allows failing gracefully if they are unavailable.

Differential Revision: https://phabricator.services.mozilla.com/D80650
2020-07-20 17:47:52 +00:00
Andrew McCreight 6fce3d2191 Bug 1653587 - Fix "Genreate" typo. DONOTBUILD r=jld
Differential Revision: https://phabricator.services.mozilla.com/D83956
2020-07-20 16:52:29 +00:00
David Teller 94b50d3de1 Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-20 09:42:48 +00:00
Cosmin Sabou c562fee6cd Backed out 2 changesets (bug 1652000) for causing Bug 1653749.
Backed out changeset 69dbf38f4071 (bug 1652000)
Backed out changeset 0a6cb920a247 (bug 1652000)
2020-07-19 05:54:07 +03:00
David Teller 15c3a336eb Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-17 19:48:21 +00:00
Anny Gakhokidze deced955d5 Bug 1642468 - Part 1: Remove all outer windowId fields from LoadInfo, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D83562
2020-07-17 17:13:26 +00:00
Narcis Beleuzu a475e11422 Backed out 2 changesets (bug 1652000) for bustages on ChromeUtils.cpp . CLOSED TREE
Backed out changeset 5f02a357671c (bug 1652000)
Backed out changeset 22bb2a5032b7 (bug 1652000)
2020-07-17 20:16:32 +03:00
Agi Sferro 489dd44cdd Bug 1651838 - Remove unused --appomni on Android. r=glandium,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83195
2020-07-17 16:58:29 +00:00
David Teller 37dd44228b Bug 1652000 - A little lifetime documentation;r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83337
2020-07-17 16:21:26 +00:00
Jed Davis 75573b020f Bug 1325918 - Ignore MsgDropped errors in BackgroundChildImpl. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D83558
2020-07-14 20:23:49 +00:00
Sylvestre Ledru 1dbb63db2b Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D83258
2020-07-14 09:34:19 +00:00
Jed Davis 127b9aecbb Bug 1635572 - Remove workaround for shared memory security bug in old macOS versions. r=spohl
CVE-2018-4435 (https://crbug.com/project-zero/1671) was fixed in macOS
10.12 and up, but when we added uses of shm_open that would be affected
by it we still supported 10.9, so we added a workaround that tests for
the bug (by trying to exploit it) and falls back to the slower
alternative of temporary files if necessary.

The minimum supported version is now 10.12, and we've already
committed changes (e.g., to sandboxing) that would break the browser
on older versions, so we can remove this code.  Note that we also have
cross-platform gtests that check for this type of bug, so we'll have some
warning if it's ever reintroduced.

Differential Revision: https://phabricator.services.mozilla.com/D83197
2020-07-13 21:35:22 +00:00
Cosmin Sabou 3576443b99 Backed out changeset 3229e30f7721 (bug 1649573) as requested by froydnj. CLOSED TREE 2020-07-13 17:18:41 +03:00
Jed Davis ba9cf29223 Bug 1652081 - Verify that newly allocated shared memory is zeroed. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D83144
2020-07-10 22:08:07 +00:00
Tom Prince 204d796929 Bug 1651731: [lint] Python and shell files without `#!` should not be executable; r=linter-reviewers,perftest-reviewers,geckoview-reviewers,agi,sylvestre,sparky
Differential Revision: https://phabricator.services.mozilla.com/D82954
2020-07-09 20:29:18 +00:00
Nika Layzell 22a65a237e Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 20:15:59 +00:00
Mihai Alexandru Michis 1ba2a3f6f6 Backed out 3 changesets (bug 1650163) for causing bustages in nsContentSecurityManager.cpp
CLOSED TREE

Backed out changeset 51d7c644a1e6 (bug 1650163)
Backed out changeset 3d2b6908447a (bug 1650163)
Backed out changeset 79141707d47b (bug 1650163)
2020-07-08 21:18:44 +03:00
Nika Layzell c850a94434 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-08 14:54:48 +00:00
Kris Maglione 5837ad4bdd Bug 1580764: Part 3 - Remove unused AncestorOuterWindowIDs from LoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D82465
2020-07-07 21:14:34 +00:00
Kris Maglione 01ca404c30 Bug 1580764: Part 1 - Add ancestor BrowsingContext IDs to LoadInfo. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D82463
2020-07-07 21:14:42 +00:00
Narcis Beleuzu 8359f16846 Backed out 7 changesets (bug 1650163, bug 1649477) for bustages on JSActor.cpp . CLOSED TREE
Backed out changeset 4a21afb65254 (bug 1650163)
Backed out changeset c41753a56f5a (bug 1650163)
Backed out changeset 5fb444c35764 (bug 1650163)
Backed out changeset 830aa93d2b0c (bug 1649477)
Backed out changeset eca6e9dce450 (bug 1649477)
Backed out changeset 5b217aa88289 (bug 1649477)
Backed out changeset 8959d02b840f (bug 1649477)
2020-07-08 04:09:27 +03:00
Nika Layzell df351180c3 Bug 1650163 - Part 1: Switch native remoteType values to nsCString, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D82104
2020-07-06 20:30:58 +00:00
ssengupta a9e4714041 Bug 1633880 - P2 - RemoteLazyInputStreamStorage::Get() now returns mozilla::Result<RefPtr<RemoteLazyInputStreamStorage>, nsresult> r=baku
Differential Revision: https://phabricator.services.mozilla.com/D80541
2020-07-03 12:59:19 +00:00
Kashav Madan 4fb30e0688 Bug 1643862 - Move channel buffers into separate heap allocations, r=jld
Moving these out-of-line reduces some IPC::Channel::ChannelImpl slop.

Differential Revision: https://phabricator.services.mozilla.com/D79183
2020-07-03 14:01:41 +00:00
Kashav Madan cfc4c0e2cf Bug 1643732 - Choose a more conservative size for input_cmsg_buf_, r=jld
We'll never read more than MAX_DESCRIPTORS_PER_MESSAGE file descriptors in a
single message, so size the buffer based on that value.

Differential Revision: https://phabricator.services.mozilla.com/D79162
2020-07-03 14:01:28 +00:00
Simon Giesecke b13b4d3deb Bug 1650076 - Clean up ThreadLocal. r=dom-workers-and-storage-reviewers,asuth
Move ThreadLocal to a separate header file.
Reuse LoggingIdString in ThreadLocal (and make use of nsAutoCStringN).

Differential Revision: https://phabricator.services.mozilla.com/D82018
2020-07-03 09:40:12 +00:00
Cosmin Sabou a40ede8ab7 Backed out 4 changesets (bug 1650076) for build bustages on indexedDB/ProfilerHelpers.h. CLOSED TREE
Backed out changeset 42951b61e9dc (bug 1650076)
Backed out changeset 18b34fb0ddbd (bug 1650076)
Backed out changeset 1d378f2af866 (bug 1650076)
Backed out changeset 42df520d1cff (bug 1650076)
2020-07-03 11:49:58 +03:00
Simon Giesecke 4c5ca225c9 Bug 1650076 - Clean up ThreadLocal. r=dom-workers-and-storage-reviewers,asuth
Move ThreadLocal to a separate header file.
Reuse LoggingIdString in ThreadLocal (and make use of nsAutoCStringN).

Differential Revision: https://phabricator.services.mozilla.com/D82018
2020-07-03 08:08:27 +00:00
Jean-Yves Avenard afea3c617d Bug 1634846 - P3. Get around NS_INLINE_DECL_REFCOUNTING not working with TaskQueue. r=nika,froydnj
NS_INLINE_DECL_REFCOUNTING macro doesn't properly work when the object is used on a thread that isn't backed by a single PRThread (such as TaskQueue). See bug 1648031.

The resolution of this issue is rather complex, and outside the scope of this series of change.

So for now, we create a new macro NS_INLINE_DECL_REFCOUNTING_ONEVENTTHREAD which will use a different mechanism to ensure the thread-safe usage of a class.

Differential Revision: https://phabricator.services.mozilla.com/D81269
2020-07-02 00:26:43 +00:00
Jean-Yves Avenard b2cf09ec3e Bug 1634846 - P2. Make ipc's MessageChannel works with TaskQueue, r=nika
We no longer rely of having a message loop for the worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D80655
2020-07-02 00:26:41 +00:00
Jean-Yves Avenard 8ad7f1ba8e Bug 1634846 - P1. Remove unused method. r=nika,jld
And the less use of MessageLoop, the better.

Differential Revision: https://phabricator.services.mozilla.com/D80654
2020-07-02 00:25:35 +00:00
Ricky Stewart 8fe43501ec Bug 1648129 - Use faster hash for ipdl generator r=froydnj
`adler32` is about 3x as fast overall as `md5` on my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81892
2020-07-01 18:31:01 +00:00
Nathan Froyd 3f6228a465 Bug 1649573 - run IPDL ipdl tests in parallel; r=firefox-build-system-reviewers,rstewart
The speedup here is not great because the Python/IPDL parser overhead is
very high, but this cuts ~10 seconds off a `-j12` build (~15s -> 4s) on
my machine.

Differential Revision: https://phabricator.services.mozilla.com/D81751
2020-07-01 15:49:32 +00:00
Simon Giesecke 9364b353d4 Bug 1648010 - Remove NS_NAMED_LITERAL_CSTRING and NS_NAMED_LITERAL_STRING macros. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80631
2020-07-01 08:42:31 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Jim Porter 632c7aa9aa Bug 1613496 - Add IPC profiler markers to track when messages are processed by the IO thread queues r=gerald,froydnj
This adds 3 new profiler markers for each IPC message:

 * One just before the first byte is sent over the IPC channel
 * One just after the last byte is sent over the IPC channel
 * One just after the last byte is received from the IPC channel

With the already-existing IPC markers (for when SendXXX and RecvXXX are
called), this allows us to calculate the following statistics:

 * Send thread latency
 * IPC send duration
 * IPC recv latency
 * Recv thread latency

For more information on how this is presented in the UI, see:
<https://github.com/firefox-devtools/profiler/pull/2535>.

Differential Revision: https://phabricator.services.mozilla.com/D70790
2020-06-30 18:39:42 +00:00
Jean-Yves Avenard 4a24fe3c8e Bug 1647958 - P3. Have GetCurrentSerialEventTarget returns the currently running MessageLoop. r=nika
We want it to returning the actual nsThread if that's where the MessageLoop would dispatch its tasks; otherwise return the MessageLoop's EventTarget

Depends on D80357

Differential Revision: https://phabricator.services.mozilla.com/D80811
2020-06-30 08:04:10 +00:00
Jean-Yves Avenard 29e935bf80 Bug 1647958 - P1. Protects MessageLoop::EventTarget's mLoop member. r=nika
EventTarget::Dispatch can be called on any threads ; there's a potential of a race when accessing the mLoop member.

Differential Revision: https://phabricator.services.mozilla.com/D80810
2020-06-30 08:04:13 +00:00
Brindusan Cristian 6f757f82da Backed out 2 changesets (bug 1647958) for conflicting with the backout of Bug 1648898. CLOSED TREE
Backed out changeset 55ecb48a0504 (bug 1647958)
Backed out changeset af210e0df79f (bug 1647958)
2020-06-30 10:59:29 +03:00
Narcis Beleuzu 3700aab557 Backed out 7 changesets (bug 1634846, bug 1647628, bug 1649294, bug 1647112) for webgl-conf crashes. CLOSED TREE
Backed out changeset 4441d06e96c3 (bug 1647628)
Backed out changeset 4efaf32bc8f7 (bug 1647112)
Backed out changeset 2d24ad813039 (bug 1647112)
Backed out changeset fda262d73a13 (bug 1649294)
Backed out changeset 5863f9c5229f (bug 1634846)
Backed out changeset bca79526745d (bug 1634846)
Backed out changeset d539408a0048 (bug 1634846)
2020-06-30 09:50:00 +03:00
Jean-Yves Avenard 9f996ba331 Bug 1634846 - P3. Get around NS_INLINE_DECL_REFCOUNTING not working with TaskQueue. r=nika,froydnj
NS_INLINE_DECL_REFCOUNTING macro doesn't properly work when the object is used on a thread that isn't backed by a single PRThread (such as TaskQueue). See bug 1648031.

The resolution of this issue is rather complex, and outside the scope of this series of change.

So for now, we create a new macro NS_INLINE_DECL_REFCOUNTING_ONEVENTTHREAD which will use a different mechanism to ensure the thread-safe usage of a class.

Differential Revision: https://phabricator.services.mozilla.com/D81269
2020-06-30 02:50:07 +00:00
Jean-Yves Avenard 35101e741b Bug 1634846 - P2. Make ipc's MessageChannel works with TaskQueue, r=nika
We no longer rely of having a message loop for the worker thread.

Differential Revision: https://phabricator.services.mozilla.com/D80655
2020-06-26 09:34:47 +00:00
Jean-Yves Avenard b28f4edba4 Bug 1634846 - P1. Remove unused method. r=nika,jld
And the less use of MessageLoop, the better.

Differential Revision: https://phabricator.services.mozilla.com/D80654
2020-06-25 18:28:04 +00:00
Jean-Yves Avenard 35e8e946e1 Bug 1647958 - P3. Have GetCurrentSerialEventTarget returns the currently running MessageLoop. r=nika
We want it to returning the actual nsThread if that's where the MessageLoop would dispatch its tasks; otherwise return the MessageLoop's EventTarget

Depends on D80357

Differential Revision: https://phabricator.services.mozilla.com/D80811
2020-06-30 02:49:05 +00:00
Jean-Yves Avenard 1035389faf Bug 1647958 - P1. Protects MessageLoop::EventTarget's mLoop member. r=nika
EventTarget::Dispatch can be called on any threads ; there's a potential of a race when accessing the mLoop member.

Differential Revision: https://phabricator.services.mozilla.com/D80810
2020-06-30 02:49:06 +00:00
Junior Hsu 780b817a08 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-30 00:33:01 +00:00
Sylvestre Ledru 68e6f06c65 Bug 1649071 - Replace the DISALLOW_COPY_AND_ASSIGN & DISALLOW_EVIL_CONSTRUCTORS macros with = delete; r=froydnj
Generated with:
./mach static-analysis check --checks="-*, modernize-replace-disallow-copy-and-assign-macro" --fix -j 10 <file>
and
./mach clang-format -p <file>
(as clang-apply-replacement doesn't reformat the change)

(with ~/.mozbuild/clang-tools/clang-tidy/bin/clang-tidy pointing to clang-tidy 11)

Differential Revision: https://phabricator.services.mozilla.com/D81489
2020-06-29 14:37:56 +00:00
Andrea Marchesini 4c6f89824d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 13:40:27 +00:00
Andrea Marchesini 34cbc7e2ed Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 11:02:59 +00:00
Andrea Marchesini 2c405fb804 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 11:02:55 +00:00
Andrea Marchesini 5fc1253731 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 11:03:02 +00:00
Andrea Marchesini 8f12e90e00 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 11:03:04 +00:00
Andrea Marchesini 07f5abb16d Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 2 - RemoteLazyInputStreamStorage, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80925
2020-06-29 11:02:50 +00:00
Razvan Maries f7cb24cc7e Backed out 8 changesets (bug 1648141) for build bustages on RemoteLazyInputStreamThread.cpp. CLOSED TREE
Backed out changeset e9b4ca0ee700 (bug 1648141)
Backed out changeset b9bb847cee47 (bug 1648141)
Backed out changeset 11dfce46ec14 (bug 1648141)
Backed out changeset d824d2f67f27 (bug 1648141)
Backed out changeset e5b8292e7095 (bug 1648141)
Backed out changeset c1a3d5fa0c61 (bug 1648141)
Backed out changeset 24fdb83db3cd (bug 1648141)
Backed out changeset 749d894dde52 (bug 1648141)
2020-06-29 13:59:16 +03:00
Andrea Marchesini c71431ab1b Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 8 - mozilla namespace, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80931
2020-06-29 10:30:00 +00:00
Andrea Marchesini 16339b8334 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 7 - RemoteLazyInputStreamUtils, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80930
2020-06-29 10:29:05 +00:00
Andrea Marchesini d50c65af76 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 6 - remoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80929
2020-06-29 10:28:21 +00:00
Andrea Marchesini 87e1daec9f Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 4 - IPDL actors, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80927
2020-06-29 10:27:20 +00:00
Andrea Marchesini d7cec00cfb Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 3 - PRemoteLazyInputStream, r=smaug,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80926
2020-06-29 10:26:33 +00:00
Andrea Marchesini 54b73ea513 Bug 1648141 - IPCBlobInputStream to RemoteLazyInputStream - part 2 - RemoteLazyInputStreamStorage, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D80925
2020-06-29 10:25:24 +00:00
Daisuke Akatsuka 14e2eb6c29 Bug 1646974: Introduce and use isInDevToolsContext flag. r=Honza,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D80623
2020-06-29 09:34:54 +00:00
Aaron Klotz f1974f10ad Bug 1648086: Fix namespace issue that was breaking builds when a11y is disabled in build config; r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D81169
2020-06-28 23:28:23 +00:00
Nika Layzell 9c12bdf9af Bug 1633379 - Part 1: Move PInProcess into dom/ipc, r=kmag,Yoric
This moves it near the cross-process `PContent` actor, and makes it more clear
that this actor is only intended to be used for DOM things.

Differential Revision: https://phabricator.services.mozilla.com/D80581
2020-06-25 17:50:51 +00:00
Cosmin Sabou 4d79f57fed Backed out 2 changesets (bug 1633379) for windows build bustages on ContentChild.obj. CLOSED TREE
Backed out changeset a26037f3225b (bug 1633379)
Backed out changeset efef0b59bcd8 (bug 1633379)
2020-06-25 20:47:03 +03:00
Butkovits Atila 6d4dc7f680 Backed out 13 changesets (bug 1633935) as requested by Junior. CLOSED TREE
Backed out changeset 398fc19f5f6a (bug 1633935)
Backed out changeset 25822279ba5b (bug 1633935)
Backed out changeset e87b11c172b9 (bug 1633935)
Backed out changeset 709f8d50aa33 (bug 1633935)
Backed out changeset 3b268ac50692 (bug 1633935)
Backed out changeset ac9c5c1e5162 (bug 1633935)
Backed out changeset 292a5b34e9f7 (bug 1633935)
Backed out changeset 6251c22cc8f1 (bug 1633935)
Backed out changeset 73b51a139c91 (bug 1633935)
Backed out changeset 2a9873ad6856 (bug 1633935)
Backed out changeset be03e0e7b645 (bug 1633935)
Backed out changeset df5abc2c0734 (bug 1633935)
Backed out changeset 19dcca77a1cf (bug 1633935)
2020-06-25 20:25:36 +03:00
Nika Layzell 508260e158 Bug 1633379 - Part 1: Move PInProcess into dom/ipc, r=kmag,Yoric
This moves it near the cross-process `PContent` actor, and makes it more clear
that this actor is only intended to be used for DOM things.

Differential Revision: https://phabricator.services.mozilla.com/D80581
2020-06-25 15:49:15 +00:00
Simon Giesecke 43fe271d3f Bug 1634436 - Make DecryptingInputStream implement nsIIPCSerializableInputStream. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D75913
2020-06-25 13:23:06 +00:00
Honza Bambas 5c088661ed Bug 1638925 - Log IPC messages, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79621
2020-06-25 12:27:51 +00:00
Honza Bambas a212b8a5f4 Bug 1638925 - Log runnables in message_loop, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D79619
2020-06-24 13:49:27 +00:00
Andrea Marchesini 5270b37037 Bug 1645786 - IPCBlobInputStream for socket process, r=smaug,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D80680
2020-06-25 12:21:14 +00:00
Kartikaya Gupta eb0984f55a Bug 1642052 - Delete dead code. r=froydnj
This Android-only ifdef block is nested inside a Windows-only ifdef block.

Differential Revision: https://phabricator.services.mozilla.com/D80962
2020-06-24 21:24:56 +00:00
Junior Hsu 347250b5c8 Bug 1633935 - P4 Remove On[Start|Stop]Request/OnTransportAndData in PHttpChannel, r=mayhemer,nika,necko-reviewers
We move OnStartRequest from PHttpChannel to PHttpBackgroundChannel, thus adjusting
message-metadata.ini

Depends on D76970

Differential Revision: https://phabricator.services.mozilla.com/D76971
2020-06-23 16:56:53 +00:00
Nika Layzell 328a79feca Bug 1647761 - Part 1: Remove outdated terminology from ipc/, r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D80683
2020-06-23 17:03:04 +00:00
Andrea Marchesini 6aa5b38d30 Bug 1641905 - ThirdPartyUtil::IsThirdPartyWindow for fission, r=dimi,necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D79307
2020-06-17 20:18:23 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00