Commit Graph

4880 Commits

Author SHA1 Message Date
Jed Davis
95e6221bc6 Bug 1436242 - Avoid undefined behavior in IPC fd-passing code. r=froydnj
MozReview-Commit-ID: 3szIPUssgF5

--HG--
extra : rebase_source : c5ce3f601ce9872c2c2f98340907e13c77a49e71
2018-05-21 17:01:45 -06:00
Kris Maglione
8134b33e89 Bug 1462964: Remove obsolete nsIDOMBlob interface. r=bz
MozReview-Commit-ID: 2HIlaSrvfBe

--HG--
extra : rebase_source : 944a6244dbfe1f0a37dd34a041d1329624a86f93
extra : histedit_source : d7859be664fed00f8504e40969480d3af3d674e7%2C4456b502db338bd06823654306e47c2583101396
2018-05-21 17:32:44 -07:00
Steve Fink
e1fedf5974 Bug 1442722 - Move scope into JSStructuredData, r=baku,jorendorff
--HG--
extra : topic : clone.refactor
extra : rebase_source : 657bfd1a4c87de0a27c99e685adbf739c907ed6c
2018-04-03 11:17:33 -07:00
Stephen A Pohl
447ec53dcd Bug 1461459: Enable bug 1348361 (async process launching) on nightly only. r=ted 2018-05-21 13:53:34 -04:00
Stephen A Pohl
5b81adc6a2 Backout f266f3f133a9 (bug 1446900, bug 1461459) for referencing incorrect bug number in commit message. r=backout DONTBUILD 2018-05-21 13:51:59 -04:00
Stephen A Pohl
c466cf329f Bug 1446900: Enable bug 1348361 (async process launching) on nightly only. r=ted 2018-05-21 13:46:04 -04:00
Csoregi Natalia
2f779be8d9 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-02 01:03:45 +03:00
Markus Stange
88cd48ca91 Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : a24d92a0e7745a81d4dfc30ddef2f95f01fd31cd
2018-05-18 18:17:21 -04:00
Csoregi Natalia
fc2ed6e92a Backed out 18 changesets (bug 1462784) for ESlint failure on FlameGraph.js:1297. CLOSED TREE
Backed out changeset 79556798ff9f (bug 1462784)
Backed out changeset 88321efb673b (bug 1462784)
Backed out changeset 7880f9dc7023 (bug 1462784)
Backed out changeset 71fe35fd1f7e (bug 1462784)
Backed out changeset a543b94b049a (bug 1462784)
Backed out changeset d1ca8b0f2221 (bug 1462784)
Backed out changeset 68eabfbf3c16 (bug 1462784)
Backed out changeset 34e71c789903 (bug 1462784)
Backed out changeset 6fe79d1ca1bd (bug 1462784)
Backed out changeset e5ad2e525ea9 (bug 1462784)
Backed out changeset 329645ff1e23 (bug 1462784)
Backed out changeset e09c38853172 (bug 1462784)
Backed out changeset 0663d1a6d2da (bug 1462784)
Backed out changeset 106967fc29d2 (bug 1462784)
Backed out changeset 99b4a433a8e5 (bug 1462784)
Backed out changeset 1d38a4cf5a4a (bug 1462784)
Backed out changeset 692017229de6 (bug 1462784)
Backed out changeset c2911a626671 (bug 1462784)
2018-06-01 23:42:00 +03:00
Markus Stange
2eecff51ad Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : 3bbf0398b2a2152a9000d51f04688436832f81e1
2018-05-18 18:17:21 -04:00
Noemi Erli
1fd69fa2bc Backed out 18 changesets (bug 1462784) for failures in devtools/client/performance/test/unit/test_tree-model-08.js on a CLOSED TREE
Backed out changeset a74d36598442 (bug 1462784)
Backed out changeset c8192175f360 (bug 1462784)
Backed out changeset cde492240e99 (bug 1462784)
Backed out changeset 8c8d30fa406c (bug 1462784)
Backed out changeset ad3802ffb780 (bug 1462784)
Backed out changeset 2fe10732076c (bug 1462784)
Backed out changeset 268a72b7c3c4 (bug 1462784)
Backed out changeset 4055eb6c3bc6 (bug 1462784)
Backed out changeset 3901070e2e60 (bug 1462784)
Backed out changeset 2faf787fbbdf (bug 1462784)
Backed out changeset 8f06963c7c6f (bug 1462784)
Backed out changeset 036e6f64e224 (bug 1462784)
Backed out changeset e670f156a603 (bug 1462784)
Backed out changeset cd39588aece4 (bug 1462784)
Backed out changeset 2ac65d100fa2 (bug 1462784)
Backed out changeset ea05ff70a51d (bug 1462784)
Backed out changeset 8a06c0ba42f7 (bug 1462784)
Backed out changeset 52ed9a039ad2 (bug 1462784)
2018-06-01 01:06:29 +03:00
Noemi Erli
614b78ae36 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-06-01 00:58:09 +03:00
Markus Stange
3b73629fe1 Bug 1462784 - Annotate idle stacks in the chromium event loop. r=froydnj
MozReview-Commit-ID: Ac8H02GKnmV

--HG--
extra : rebase_source : 8328ecf80068519f5962d1bc5bd58f428136b9af
2018-05-18 18:17:21 -04:00
Jan de Mooij
17f3983d0f Bug 1461605 part 1 - Rename CompartmentOptions to RealmOptions. r=luke,bz 2018-05-17 10:59:45 +02:00
Jan de Mooij
80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Nika Layzell
2d188849ae Bug 1455217 - Part 3: Use the new xpidl Promise type instead of nsISupports, r=bz 2018-05-14 17:55:54 -04:00
Stephen A Pohl
4ecf5cdf16 Bug 1446900: Place bug 1348361 (async content process launching) behind an ifdef and disable it to avoid numerous top crashers. r=jld 2018-05-11 20:00:40 -04:00
Eric Rahm
4e0fc495d6 Bug 1364624 - Part 1: Manually manage locks in MessageChannel::Close. r=froydnj
This switches over to manually managing the locking in MessageChannel::Close
in order to avoid a deadlock on msvc opt builds. It has the added benefit of
avoid a superfluous lock/unlock pair.

--HG--
extra : rebase_source : f3b0ee5499bd75bc75b3d1fe44c0c7efd3063aee
2018-04-26 17:14:22 -07:00
Csoregi Natalia
88704238f1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-05-10 19:46:00 +03:00
Ben Kelly
ef6232cef8 Bug 1459655 Check for error when serializing the LoadInfo triggering principal. r=baku 2018-05-10 08:18:05 -07:00
Stephen A Pohl
860c14b396 Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-05-08 10:31:44 -04:00
Valentin Gosu
bd4365d7e7 Bug 1448058 - Remove nsIMutable from URI implementations r=mayhemer
* Also removes NS_TryToMakeImmutable, NS_TryToSetImmutable, URIIsImmutable
* NS_EnsureSafeToReturn, nsINetUtil.toImmutableURI

MozReview-Commit-ID: 5eFtFm2CQt7

--HG--
extra : rebase_source : 1f3d23ec646883e76844d42113bc1c71c01a1ad7
2018-05-09 18:21:24 +02:00
arthur.iakab
2f2f2ffdbf Merge mozilla-central to inbound 2018-05-08 15:44:33 +03:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Brindusan Cristian
09c2471bd3 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-05-05 00:42:16 +03:00
Cosmin Sabou
2f93cbd6cb Merge mozilla-central to inbound. a=merge CLOSED TREE
--HG--
rename : testing/profiles/prefs_general.js => testing/profiles/common/user.js
extra : rebase_source : e56a2d784bd87af73d03cc5fcdca84d8156ed054
2018-05-04 21:07:31 +03:00
Aaron Klotz
d0a001f04f Bug 1459085: Prevent mutex reentry in mscom::Interceptor::GetInterceptorForIID; r=Jamie 2018-05-03 22:57:11 -06:00
Alex Gaynor
d64dccaf76 Bug 1459270 - fixed a regression where IPC was not correctly checking for transitions to actors being dead; r=froydnj
MozReview-Commit-ID: HzhUna0mVpB

--HG--
extra : rebase_source : 495d4f70f0e9d648bfc36b84921cbfb79881f289
2018-05-04 13:51:22 -04:00
Chris Manchester
26b3ffad58 Bug 1455892 - Use a tracking stub file rather than a phony target to speed up ipdl in incremental builds. r=froydnj
This commit removes some mtime checking logic in ipdl.py that is made redundant
with make's logic to re-invoke ipdl.py when dependencies have changed.


MozReview-Commit-ID: FJuYIZv5uym

--HG--
extra : rebase_source : 5e250cd2dd57b8591db700a3d79ec36c88fa4dd4
2018-05-03 12:54:21 -07:00
Bogdan Tara
474a05018a Backed out changeset 23400e395408 (bug 1455892) for linux build bustages on ContentBridgeParent.h CLOSED TREE 2018-05-03 23:34:54 +03:00
Chris Manchester
5b50d3c787 Bug 1455892 - Use a tracking stub file rather than a phony target to speed up ipdl in incremental builds. r=froydnj
This commit removes some mtime checking logic in ipdl.py that is made redundant
with make's logic to re-invoke ipdl.py when dependencies have changed.


MozReview-Commit-ID: FJuYIZv5uym

--HG--
extra : rebase_source : 9e11ead04bd69eb1f30160fdb15b8ac74b183f87
2018-05-03 12:54:21 -07:00
Alex Gaynor
8fbe3c2f2a Bug 1457536 - refactor Transition in IPC to make it more amenable to fuzing; r=froydnj
Instead of crashing the process inside Transition on a bad state transition,
propagate an error up the stack (and crash higher up).

MozReview-Commit-ID: JJmAeq6xSfe

--HG--
extra : rebase_source : caba8a53603f7b0ad841b657aa3d00e827e3c68c
2018-05-03 12:08:48 -04:00
Alex Gaynor
8dbb80ef3d Bug 1323532 - Part 2 - don't codegen Transition functions in ipdl, just statically define the two variants we need; r=froydnj
MozReview-Commit-ID: GdATc0Wdsxi

--HG--
extra : rebase_source : 315b6d21d5bccac8335869790c0ce9fe7a1d78b7
2018-04-30 17:10:27 -04:00
Alex Gaynor
33a10861a4 Bug 1323532 - Part 1 - don't codegen State enums in ipdl, just statically define the two types we need; r=froydnj
MozReview-Commit-ID: CSfCBiQnKxZ

--HG--
extra : rebase_source : 9b1968ba812eed8f9e6b31a5a7cbf773970282d6
2018-04-30 15:22:18 -04:00
Alex Gaynor
dcaebb1096 Bug 1456147 - do not fail on an assertion error when calling Pickle::ExtractBuffers on an empty iterator; r=jld
MozReview-Commit-ID: 7m2QSOuxLOw

--HG--
extra : rebase_source : 776380e443647019f11e725a106f670adbb2c919
2018-04-23 11:20:07 -04:00
Andreea Pavel
7955752872 Merge mozilla-inbound to mozilla-central. a=merge 2018-05-01 13:13:09 +03:00
Andrew McCreight
1481f95980 Bug 1456942, part 6 - Add a test for ByteBuf. r=Nika
ByteBuf is a new IPDL built in type, so I wrote a very basic test for
it, based on shmem.ipdl. It was added in bug 1379680.

MozReview-Commit-ID: 4tbnljpUqCh

--HG--
extra : rebase_source : 6f423d7d9cf132aba4498be96548684e551b8e2c
2018-04-25 14:16:51 -07:00
Andrew McCreight
6d031ffbb6 Bug 1456942, part 5 - Add test for inconsistent refcounted types. r=Nika
MozReview-Commit-ID: F8WuWQ5n5yk

--HG--
extra : rebase_source : 9620bdfec42b561190a6902a479331c66aadd671
2018-04-25 13:23:46 -07:00
Andrew McCreight
aad458668f Bug 1456942, part 4 - Add a new test for |using|. r=Nika
Bug 1443954 added some new syntax to using, but I noticed that there
was not very much existing test coverage, so I wrote a new test that
covers all of the possible cases.

MozReview-Commit-ID: JRgHCtXHDLZ

--HG--
extra : rebase_source : caacc05ae5b1de0841f73e5fdba4891bfc0ee4bf
2018-04-25 11:25:24 -07:00
Andrew McCreight
5a9bc43157 Bug 1456942, part 3 - Specify the error messages for a few tests. r=Nika
Failing IPDL parser tests require that the error message is specified.

MozReview-Commit-ID: IGNTVAb5r0Q

--HG--
extra : rebase_source : 54e75ae8820f4e9ae2083b1f5382ff4151c8d59e
2018-04-25 11:23:18 -07:00
Andrew McCreight
a132bfb872 Bug 1456942, part 2 - Pass in a blank message-metadata file. r=Nika
The IPDL parser now expects a valid message-metadata to be passed in,
even though we don't need it for parser tests. Fix this by creating
and specifying a blank one. This fixes a regression from bug 1348591.

MozReview-Commit-ID: HJ34mqBdUyP

--HG--
extra : rebase_source : d444e5346f40399f1f1cf71b3d86b6dc15a4b731
2018-04-25 11:14:41 -07:00
Andrew McCreight
05b66f4baf Bug 1456942, part 1 - Always build the IPDL parser test directory. r=Nika
The ipc/ipdl/test/cxx/ subdirectory is only built when MOZ_IPDL_TESTS
is set, because it needs special code to be built into the
binary. ipdl/ should always be built, because it does not need special
support. This gating is already done in the ipc/ipdl/test/ directory,
so it shouldn't be done in ipc/ipdl/, because this stops us from
building it in a regular build.

MozReview-Commit-ID: Jpp0CeXEenR

--HG--
extra : rebase_source : 3dbb6a5c9b7f6ec8cbe9840bff240a63342ecd49
2018-04-25 11:02:33 -07:00
Aaron Klotz
0850bc3ec5 Bug 1451511: Add cross-process function hooking to DLL interceptor; r=handyman
--HG--
rename : ipc/mscom/DynamicallyLinkedFunctionPtr.h => mozglue/misc/DynamicallyLinkedFunctionPtr.h
extra : amend_source : 1eea43cda6e05f722f0b1373535d9ceabac18661
2018-04-04 16:31:43 -06:00
Yura Zenevich
55fe960cc1 Bug 1450927 - add getBoundsInCSSPixels XPCOM method. r=surkov r=jld
MozReview-Commit-ID: CTANPVQw1sG
2018-04-25 14:51:09 -04:00
Tiberius Oros
2fffa00bb3 Backed out 2 changesets (bug 1450927) for failing on ProxyAccessible.cpp(247) on a CLOSED TREE
Backed out changeset ca285aed3926 (bug 1450927)
Backed out changeset d7dd8b0d2473 (bug 1450927)
2018-04-25 19:31:50 +03:00
Yura Zenevich
db18588465 Bug 1450927 - add getBoundsInCSSPixels XPCOM method. r=surkov r=jld
MozReview-Commit-ID: CTANPVQw1sG
2018-04-25 11:45:47 -04:00
Gurzau Raul
faeb9b7ddd Merge inbound to mozilla-central. a=merge 2018-04-25 12:36:04 +03:00
Christoph Diehl
d5091638e8 Bug 777067 - Fuzzing: IPC Protocol Definition Language (IPDL) Protocols. r=jld
--HG--
rename : ipc/glue/Faulty.cpp => tools/fuzzing/faulty/Faulty.cpp
rename : ipc/glue/Faulty.h => tools/fuzzing/faulty/Faulty.h
2018-04-24 20:10:15 +02:00
Alex Gaynor
3e8fd2dc07 Bug 1450232 - in IPC, check that lengths fit in the available data before allocating data; r=mccr8
There are three things we want to be true:

a) If the child sends a large value and the parent can't allocate enough space
   for it we use an infallible allocation so the parent dies with an OOM.
b) If a fuzzer generates (huge-length, small-data) we don't try to allocate
   huge-length bytes; knowing that the read will fail.
c) No fuzzer-specific branches in the core IPC serialization code.

Finally, this makes (huge-length, small-data) consistent with other cases where
the data is potentially truncated: ReadParam returns false.

MozReview-Commit-ID: 6nDKrw5z4pt

--HG--
extra : rebase_source : 58372d29139e9545a6ed2852c7243affeab6fdb7
2018-04-19 16:53:29 -04:00
Christoph Diehl
e15214aa5e Bug 1450231 - Ignore MOZ_CRASH in FatalError() for --enable-fuzzing builds. r=jld 2018-04-03 09:51:21 +02:00
Nathan Froyd
53f1900f29 Bug 1451363 - part 6 - move GetIPCChannel into ProtocolState; r=mccr8
We can move this information into ProtocolState and save having two
virtual functions for every protocol.  Moving some bits out of the
codegen'd IPC code is a nice bonus, though we keep the strange setup
where toplevel protocols have two mChannel member variables.
2018-04-23 14:13:36 -04:00
Nathan Froyd
dbc53de3d9 Bug 1451363 - part 5 - remove ProtocolName virtual function; r=mccr8
ProtocolName() is only used for producing error messages and annotating
crash reports.  But examining actual crash reports that would have used
the result of ProtocolName() indicates that we can always tell what the
erroring protocol is due to the stack backtrace.  So having this virtual
function around just provides duplicate information, and it takes up too
much space in the vtable besides.  Let's get rid of it.
2018-04-23 14:13:36 -04:00
Nathan Froyd
e77f1868f1 Bug 1451363 - part 4 - consolidate generated code into IProtocol; r=mccr8
lower.py generates repetitious:

  SetManager(...);
  Register(...); // Or RegisterID.
  SetIPCChannel(...);

calls, which are moderately sized, given that the above call sequence
requires virtual calls in several places.  Instead of codegenning this
sequence, let's consolidate the sequence into IProtocol and change the
code generator to call into the consolidated function instead.
2018-04-23 14:13:37 -04:00
Nathan Froyd
9eac324691 Bug 1451363 - part 3 - make OnChannelReceivedMessage defined in early beta only; r=mccr8
This function is only overriden in two places, both of which go away
after early beta is done.  We shouldn't be paying for its vtable entry
after that point.
2018-04-23 14:13:37 -04:00
Nathan Froyd
7b8c73c090 Bug 1451363 - part 2b - move protocol event target access into ProtocolState; r=mccr8
The reasoning here is the same as for the protocol register/lookup
functions: these functions are all basic functionality that should not
be overriden by subclasses.
2018-04-23 14:13:37 -04:00
Nathan Froyd
8196fc2720 Bug 1451363 - part 2a - move protocol register/lookup functions into ProtocolState; r=mccr8
This functionality is base functionality for top-level and non-toplevel
protocols; nobody overrides this stuff, so it's safe to move into
ProtocolState.
2018-04-23 14:13:37 -04:00
Nathan Froyd
a796a8f982 Bug 1451363 - part 1 - move Shmem-related IProtocol interfaces into an intermediate State class; r=mccr8
IProtocol, which is inherited by every generated IPDL protocol and every
concrete protocol implementation in-tree, has a number of virtual
methods that are only relevant when distinguishing between top-level
protocols (IToplevelProtocol) and managed protocols (everything else).
These virtual methods require pointers in every protocol's vtable, which
is wasteful, and it's also somewhat confusing that many methods exist
but don't really need to be overridable in any useful way.

Let's clean this up, by creating a ProtocolState class to hold methods
that solely differ between top-level protocols and everything else.
This commit does that work and moves Shmem-related methods into this
class as a proof that this can be done in a reasonable way.
2018-04-23 14:13:37 -04:00
David Major
5b7eb8380c Bug 1456192 - make {Read,Write}IPDLParam MOZ_NEVER_INLINE; r=froydnj
MSVC's PGO inliner thinks these functions are hot enough to be inlined,
but they're really not, and inlining them bloats xul.dll quite a bit.
2018-04-23 14:13:37 -04:00
David Major
4ed8d6a022 Bug 1456192 - make Pickle::ReadSentinel MOZ_NEVER_INLINE; r=froydnj
This function is just pure bloat when it gets inlined, and it will
disappear on non-Nightly builds anyway.  Make it MOZ_NEVER_INLINE so our
size statistics on Nightly are somewhat more reflective of our size
statistics on Release.
2018-04-23 14:13:37 -04:00
jld@mozilla.com
c7c75836c0 Backed out 2 changesets (bug 1439057, bug 1447867)
Backed out changeset baeab3bff807 (bug 1439057)
Backed out changeset 1a024d5ca77b (bug 1447867)

--HG--
extra : rebase_source : d39e4657b4117706a53bc42b7817424cf43f9148
2018-04-23 07:59:02 -06:00
Jed Davis
6f2db7351f Bug 1447867 - Replace base::SharedMemory POSIX backend with shm_open and ashmem. r=froydnj
This replaces using file_util to open and unlink temporary files
(/dev/shm on Linux, $TMPDIR or /tmp otherwise) with the POSIX shm_open
API, or ashmem on Android (which doesn't implement shm_open).

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

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

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

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

MozReview-Commit-ID: 7PirIlcblh4

--HG--
extra : rebase_source : 550a0ab013429c29a57bde5c0e4593d9b426da8e
2018-04-12 21:37:38 -06:00
Steve Fink
c92957a424 Bug 1455071 - Use delegation rather than inheritance for the BufferList in JSStructuredCloneData, r=jorendorff,r=baku
--HG--
extra : rebase_source : 1620d0a2d99d9aeddd7d06b4f29251907311ef86
extra : histedit_source : 59145661383b920085164eff3586a78da41c420b
2018-03-15 16:56:09 -07:00
Andrea Marchesini
2d7cb1d63f Bug 1252998 - StorageActivityService - part 2 - Use of StorageActivityService in LocalStorage, r=asuth 2018-04-18 18:19:10 +02:00
Andrea Marchesini
4a97618634 Bug 1252998 - StorageActivityService - part 1 - Introduce StorageActivityService to monitor origin activities, r=asuth 2018-04-18 18:19:10 +02:00
Stephen A Pohl
484e9fd139 Bug 1423261: Skip intentionally crashing the browser during KillHard shutdowns. r=jimm 2018-04-17 21:38:22 -04:00
Nathan Froyd
9f5a543f01 Bug 1452657 - rename IPDL-private Shmem token struct to something more professional; r=mccr8
Brevity is the soul of wit.
2018-04-17 10:05:30 -04:00
Tom Bannister
988d18881f Bug 1434710 - Replaced all instances of mozilla::IndexSequence, mozilla::MakeIndexSequence and mozilla::IndexSequenceFor with std::index_sequence, std::make_index_sequence and std::index_sequence_for and removed mfbt/IndexSequence.h. r=botond
MozReview-Commit-ID: 1Ema7TUNr5v

--HG--
extra : rebase_source : e5bb164dbe19993214e8c16f92b0a1f5d2ff3fa1
2018-04-09 21:12:13 +10:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Jed Davis
330ff36a4d Bug 1278361 - Step 2: Search-and-replace HANDLE_EINTR(close(...)) to use IGNORE_EINTR. r=froydnj
I've also manually verified that no other references to HANDLE_EINTR are
wrapping a close() in any less syntactically obvious way.

MozReview-Commit-ID: 3KkBwFIhEIq

--HG--
extra : rebase_source : 4e79a70b3be22a7721b6f85b19ee5a31c98df456
2018-04-10 14:36:00 -06:00
Jed Davis
ec48124734 Bug 1278361 - Step 1: Update eintr_wrapper.h to bring in IGNORE_EINTR. r=froydnj
This is based on the current security/sandbox/chromium version of eintr_wrapper.h,
taken from upstream commit 937db09514e061d7983e90e0c448cfa61680f605.

I've edited it to remove some things that aren't relevant to us: the
debug-mode loop limit in HANDLE_EINTR, because we don't seem to be
having the problem it's meant to fix and it risks regressions, and
references to Fuchsia, which we don't (yet) support.  I also kept the
original include guards (the file path has changed upstream).

What this patch *does* do is add IGNORE_EINTR and modernize the C++
slightly (using decltype instead of nonstandard typeof).

MozReview-Commit-ID: BO4uQL9jUtf

--HG--
extra : rebase_source : ab3343c6d93e0ce753859217a55af131a0c4ea68
2018-04-10 14:24:27 -06:00
Jed Davis
de8c3b42fa Bug 1436156 - CHECK() in Chromium IPC code should be fatal when not fuzzing. r=froydnj
Includes a workaround for bug 1445121.

MozReview-Commit-ID: 4iQqzzECCK8

--HG--
extra : rebase_source : 04906bef5c425fb12d30372aab2df120ce5b2b2d
2018-04-10 12:36:46 -06:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jan Varga
efe3185776 Bug 1447156; r=bkelly a=abillings 2018-04-11 06:36:04 +02:00
Nika Layzell
9b6f7881f9 Bug 1443956 - Part 1: Support serializing nsIURI directly over IPDL, r=froydnj 2018-04-10 17:49:48 -04:00
Nika Layzell
952f6a915a Bug 1443954 - Part 3: Add support for RefCounted types to IPDL, r=bz,froydnj,baku
This patch was reviewed in parts, however the intermediate states would not build:

Bug 1443954 - Part 3A: Strip pointers from the argument to WriteParam and WriteIPDLParam before selecting the ParamTraits impl, r=froydnj

Bug 1443954 - Part 3B: Move nsIAlertNotification serialization to the refcounted system, r=bz

Bug 1443954 - Part 3C: Move geolocation serialization to the refcounted system, r=bz

Bug 1443954 - Part 3D: Move nsIInputStream serialization to the refcounted system, r=baku

Bug 1443954 - Part 3E: Move BlobImpl serialization to the refcounted system, r=baku

Bug 1443954 - Part 3F: Correctly implement ParamTraits for actors after the ParamTraits changes, r=froydnj
2018-04-10 17:49:48 -04:00
Nika Layzell
15aae6a990 Bug 1443954 - Part 2: Support parsing using refcounted class imports in IPDL, r=froydnj 2018-04-10 17:49:48 -04:00
Nika Layzell
854c39c514 Bug 1443954 - Part 1: Only Move() arguments when necessary, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell
0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Nika Layzell
c3cbd8710f Bug 1434768 - Part 1: Add Child/ParentSHistory classes which wrap nsISHistory, r=bz 2018-04-10 17:49:44 -04:00
Andreea Pavel
26f640b36b Backed out 4 changesets (bug 1366808) for Windows GPU leakchecks on a CLOSED TREE
Backed out changeset 23f60e5acaa2 (bug 1366808)
Backed out changeset bf2262b6aca8 (bug 1366808)
Backed out changeset 1fc82af3a155 (bug 1366808)
Backed out changeset 0649f0d9884b (bug 1366808)
2018-04-10 05:11:36 +03:00
Stephen A Pohl
b40a23754c Bug 1366808: Properly detect buildID mismatches between parent and child processes and display about:restartrequired to prompt the user to restart Firefox before proceeding. r=jimm,felipe,bz 2018-04-09 20:16:31 -04:00
James Teh
fe6f1b3bf1 Bug 1429665: ipc::mscom::SpinEvent: Only spin for a short time, falling back to an event thereafter. r=aklotz
We want to spin for faster response, but we only want to spin for a very short time.
If we're waiting for a while, we don't want to be burning CPU for the entire time.
Therefore, only spin for 30 ms, then fall back to waiting on an event.

MozReview-Commit-ID: ErAIwpsIqYz

--HG--
extra : rebase_source : b6ac024adb7853456fd06c4385cf32184c8aeca2
2018-01-15 14:51:19 +10:00
James Teh
1d688c5a0d Bug 1411685: Remove another accessibility related diagnostic crash on Nightly. r=aklotz
I missed this one in bug 1431404.
This condition is rare and does indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing this as a result of this crash, so it causes user pain without any gain to us.

MozReview-Commit-ID: GncQGeZckrV

--HG--
extra : rebase_source : b6670005d53bc6d0009f0b8b142c2ab837b7d2e7
2018-03-23 15:21:56 -04:00
Tom Schuster
72acf485fb Bug 1255800 - Make computeThis return a boolean for easier error handling. r=jorendorff
--HG--
extra : rebase_source : 1b4d227aba2fd0e1a458849addb634df9d72111c
extra : histedit_source : 29e8c520ae4d3644131b05794a447a0e7a32796f
2018-03-23 13:09:04 +01:00
Alex Gaynor
42630ebaff Bug 1449679 - Disable sentinel checking in IPC in debug fuzzing builds. r=jld 2018-03-28 14:26:10 -04:00
Christoph Kerschbaumer
3739c23b85 Bug 1439713 - Add flag to loadinfo for skipping certain security policy checks. r=bz 2018-03-29 11:14:35 +02:00
Bob Owen
5fd844b6e4 Bug 1447019 Part 1: Don't SetWinEventHook in InitUIThread for GMP processes. r=jimm 2018-03-27 14:09:31 +01:00
Nathan Froyd
eedd6f361c Bug 1448022 - make MessagePumpForAndroidUI's constructor explicit; r=jld
Attempting to stand up the static analysis for Android builds revealed
that we weren't being explicit enough.
2018-03-27 10:51:32 -04:00
Tom Schuster
2bf6212869 Bug 1255800 - Remove JS_THIS_OBJECT from dom/xpconnect. r=bz
--HG--
extra : rebase_source : dcaa891010e25e10079db853fe4eb1a7fe261e47
2018-03-07 14:35:22 +01:00
Nicholas Nethercote
5f16fc9dc3 Bug 1447246 - Refactor ContentProcess::Init(). r=jimm
The current code is a bit of a mess. This patch does the following.

- Changes the processing from backwards to forwards. This avoids the need for
  all the `found` booleans, because if a flag is present multiple times, the
  last one will naturally override.

- Tightens up the checking. It now doesn't use assertions, but instead returns
  false if any of the options are missing arguments, or have malformed
  arguments, or any of the mandatory flags are missing. (It assumes that
  -appdir and -profile are optional.)

- Renames the loop variable `idx` as `i`.

- Changes `!strcmp(...)` to `strcmp(...) == 0`, because I find that clearer.

- Avoids a redundant nsCString when handling -appdir.

The patch also tweaks GeckoChildProcessHost::mGroupId, which was buggy. It
holds the appModelUserId argument, which XRE_InitChildProcess() always expects
is present in the command. But it's only set to a non-empty value in
InitWindowsGroupID(), which is only called for plugin processes. So in lots of
cases the appModelUserId argument was missing, and a different argument would
be interpreted as the appModelUserId argument (seemingly without noticeable ill
effect).

The patch changes things to mGroupId defaults to "-", which means it's always
present in the command.

Note: all this explains why the old code for ContentProcess::Init() started
processing from argument aArgc, instead of aArgc-1 as you might expect -- it
had to read one extra arg in order to see the argument following -appdir,
because XRE_InitChildProcess() was decrementing aArgc for the appModelUserId
argument even when that argument wasn't present. The new code for
ContentProcess::Init() doesn't have to read past aArgc-1 because the mGroupId
fix ensures the appModelUserId argument is always present.

MozReview-Commit-ID: 8a8k6ABYMgo

--HG--
extra : rebase_source : 70695125ee26e67af3337119f4dfc293a0dab74c
2018-03-16 12:23:10 +11:00
Nathan Froyd
94df69d8f2 Bug 1448053 - be more efficient in MessageChannel::RepostAllMessages; r=jld
Once we've figured out that some task needs to be reposted, there's no
reason to continue scanning the list to find other tasks that need to be
reposted, since the logic in this function just requires one task that
needs to be reposted.
2018-03-23 09:40:53 -04:00
Jed Davis
59f1007c8e Bug 1440199 - Part 3: Remove IPC shared memory IDs. r=froydnj
This code isn't blocking anything, but it's dead and I don't think we
have any plans to use it.

MozReview-Commit-ID: KBoEfLceDns

--HG--
extra : rebase_source : 1eee3d961e249939f02d4cc40a707739eb2a596a
2018-02-20 15:09:12 -07:00
Jed Davis
91efa87e62 Bug 1440199 - Part 2: Remove named mode from IPC shared memory. r=froydnj
We're not using named shared memory, and supporting only anonymous
shared memory allows using other backends that are more compatible
with preventing a process from accessing any shared memory it wasn't
explicitly granted (i.e., sandboxing).

Specifically: SharedMemory::Open is removed; SharedMemory::Create no
longer takes a name, no longer has the open_existing option which doesn't
apply to anonymous memory, and no longer supports read-only memory
(anonymous memory which can never have been written isn't very useful).

This patch also fixes some comments in what remains of SharedMemory::Create.

MozReview-Commit-ID: 4kBrURtxq20

--HG--
extra : rebase_source : f6b1fb2fc79b6e9cdd251b3d9041036c0be503f9
2018-02-20 13:07:32 -07:00
Jed Davis
444639dc96 Bug 1440199 - Part 1: Remove Chromium shared memory locks. r=froydnj
This deletes some dead code and removes a dependency on the shared
memory object's name, which will be removed in the next patch (and is
always empty in our usage).

MozReview-Commit-ID: 1ub0nLCBucO

--HG--
extra : rebase_source : 6a29261e00b89773a2f2ace47303d9d9842c089b
2018-02-20 11:49:24 -07:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Ted Mielczarek
4b813d4c4a bug 1255485 - Remove NSDISTMODE=copy from Makefiles. r=nalexander
MozReview-Commit-ID: GJV2O6zvEx2
2017-11-22 15:30:06 -05:00
Kartikaya Gupta
c864e00967 Bug 1441324 - Move the input event messages from PAPZCTreeManager to PAPZInputBridge. r=froydnj,rhunt
This remotes the APZInputBridge interface over the PAPZInputBridge
protocol in the case of the GPU process, and makes the GPU process'
main thread act as the APZ controller thread in that process. If
there is no GPU process we continue as before and the APZInputBridge
interface implementation is the concrete APZCTreeManager instance
in the UI process.

The main changes in this patch are moving all the code associated with
these messages out of APZCTreeManager{Parent,Child} and into
APZInputBridge{Parent,Child}. APZCTreeManagerChild now returns an
APZInputBridgeChild instance via InputBridge(), instead of returning
itself. The SetControllerThread call in the GPU process is also updated.

MozReview-Commit-ID: M4AaIW1Q0h

--HG--
extra : rebase_source : e5a8f14e23be34229fe80a47f6789d19b19e0a9f
2018-03-16 16:28:19 -04:00
Stephen A Pohl
db9ff55a1c Bug 1348361 - Part 3 - Do not block the thread when spawning a gecko child process; r=jld
They are not yet fully async because ContentParent::InitInternal calls
OtherPid(), which will block until the process is spawned. Deferring the calls
to OtherPid() will be a subject of a follow up patch.

MozReview-Commit-ID: 4TFkMpdQtRw

--HG--
extra : rebase_source : 3e7567679ae04aa4c04ea6f6c146e70417e7ce05
2018-02-16 10:24:21 -05:00
Alex Gaynor
911eab5d61 Bug 1348361 - Part 1 - Added locking to IToplevelProtocol's management of the peer's pid; r=jld
This will let us manipulate it from multiple threads in a future patch.

MozReview-Commit-ID: 2AOgho8SEX9

--HG--
extra : rebase_source : 49e7d82b38e6f7b7eb9f6cb7c61a2b41d34f2bdc
2018-02-22 10:36:55 -05:00
Sylvestre Ledru
fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00