Commit Graph

4445 Commits

Author SHA1 Message Date
evilpies@gmail.com
8d8e27a06f Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: ADVtxjSQjk5

--HG--
extra : rebase_source : 6e0ddf49328d7ae71937b7bbe5e5bea736c49bef
2017-10-02 11:05:33 -07:00
Petr Sumbera
cd2a716e79 Bug 1402851 - ipc/chromium/moz.build needs some stuff for Solaris too. r=glandium 2017-09-25 06:53:41 -07:00
Ryan VanderMeulen
2ccfaf0697 Backed out changesets d0d30a90efa1 and fd1d81b93380 (bug 1305237) for causing bug 1403932. 2017-09-28 17:55:43 -04:00
evilpies@gmail.com
95cfc510a9 Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz
MozReview-Commit-ID: JdOjc7Ihhv

--HG--
extra : rebase_source : 82ac220ad4cb39536014d5732b4731f0889dafa6
2017-09-25 12:12:47 -07:00
Kan-Ru Chen
9016ef6cef Bug 1397456 - Always use static name for ipc messages r=billm
Never store names in Message. One can get string names from
Message::name() or use IPC::StringFromIPCMessageType() when only
message id is available.

MozReview-Commit-ID: 15ksx6SE90c

--HG--
extra : rebase_source : 1a041dc365b7f42edd540d8c7a4dfd8912e48921
2017-09-14 16:08:57 +08:00
Ryan Hunt
83e90232cc Don't crash in SendBuildID when MessageChannel isn't connected. (bug 1333056, r=dvander)
xpcshell can sometimes create and then almost immediately kill the GPU process. This can
cause the connection state of GPUParent's message channel to be in error or closed
when it attempts to send its build ID. In this case we should ignore the request
because the process will soon close.

MozReview-Commit-ID: EAupU844iFo

--HG--
extra : histedit_source : df05a01df5ad095b4e3c91e0e038d4e145da5f9d
2017-09-22 16:15:21 -05:00
Bevis Tseng
da72a5478c Bug 1399707 - Make entries in TabChild::sActiveTabs and EventLoopActivation::mEventGroups unique. r=billm
--HG--
extra : rebase_source : ffccc53b6b1055d7cfeb281ee145b897807a7810
2017-09-13 11:59:35 +08:00
Bill McCloskey
061f254d6e Bug 1398070 - Convert WillDestroyCurrentMessageLoop assertion to a safe no-op (r=dvander)
MozReview-Commit-ID: HZvW6nsvrj9
2017-09-25 15:45:24 -07:00
Dan Minor
30d76b125c Bug 1382182 - Build jsep using moz.build; r=ted,jesup
MozReview-Commit-ID: 9UhlBZi0yO0

--HG--
extra : rebase_source : 7ad69af2dfb61ad88fc5f87f4d17a09abbf23edc
2017-07-20 11:24:08 -04:00
Chris Peterson
1ca3d5aa46 Bug 870698 - Part 8: Replace Equals(NS_LITERAL_CSTRING("")) with EqualsLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: B5Y8KyExPQ8

--HG--
extra : rebase_source : e27b266c145daa5acd887e998c6d5b408101e1db
extra : source : 33f49977a33cbdb1c7127871b940eefccc018f65
2017-09-06 15:00:31 -07:00
Chris Peterson
45aa2a8e8e Bug 870698 - Part 2: Replace Append("") with AppendLiteral(""). r=erahm
MozReview-Commit-ID: CrkIP4iHP1U

--HG--
extra : rebase_source : 5dc4e91a3f1860773c199f1abf3f66479218834a
extra : intermediate-source : ba51cc79847f2b43ba616f4a5d2bbc6958ca9f6d
extra : source : 1fda2fa990cc918c748ffa14fcc5dbe13fe3bdc3
2017-09-03 22:14:11 -07:00
Aaron Klotz
da8dc618c4 Bug 1383501: Obtain and report the current activation context's manifest path; r=jimm
MozReview-Commit-ID: HJ1zNoEMzvS
2017-09-19 14:35:27 -06:00
Nathan Froyd
5e23bf9dc1 Bug 1328634 - part 2 - use UniquePtr to manage messages inside of MessageChannel; r=billm
Using them for replies in various places would be a much larger task.
This is nice and simple.
2017-09-21 14:52:37 -05:00
Nathan Froyd
98a84baac9 Bug 1328634 - part 1 - use UniquePtr in AutoEnterTransaction; r=billm
One less use of nsAutoPtr!
2017-09-21 14:52:37 -05:00
Wes Kocher
a6b8d9e91b Merge inbound to central, a=merge
MozReview-Commit-ID: JpqY5uEi1nf
2017-09-20 17:18:21 -07:00
Aaron Klotz
143a969b94 Bug 1399557: Follow-up: Add check for expected error code; r=bustage
--HG--
extra : rebase_source : bf2db1dc3f7869f360bd22557a793cc3f770aee7
extra : amend_source : 9fc98cc81cac846dcde68abad2ff1ab0c3f46dad
2017-09-20 14:40:41 -06:00
Andrew McCreight
36eb42025b Bug 1176342, part 1 - De-COM InitClassesWithNewWrappedGlobal. r=mrbkap
MozReview-Commit-ID: EfRQW3QUXCG

--HG--
extra : rebase_source : 895694d28cc228cfb095639880738c84767e08a8
2017-09-18 16:35:39 -07:00
Aaron Klotz
c0a1a84af9 Bug 1399557: Add diagnostic asserts to interceptor creation code; r=jimm
MozReview-Commit-ID: 9fJxHbxCmgh
2017-09-18 10:49:15 -06:00
Markus Stange
6aae3892e2 Bug 1401305 - Fix TaskTracer build failure. r=froydnj
MozReview-Commit-ID: 62KhOTwvxuZ

--HG--
extra : rebase_source : 6e870da2a216d717e4dea7063b6991eb44caa8d4
2017-09-19 15:15:36 -04:00
Aaron Klotz
6fdf5f0f15 Bug 1383501: Diagnostic assert when CoMarshalInterface returns E_INVALIDARG; r=jimm
MozReview-Commit-ID: JDSKZLgij83
2017-09-18 11:04:09 -06:00
Nathan Froyd
37cbcb454b Bug 1397823 - part 4 - reduce codesize for IPDL IPC::Message creation; r=kanru
Each protocol in IPDL has a bunch of autogenerated functions that
instantiate IPC::Message with various parameters.  Each of these
functions, then:

1) Pays the cost of calling malloc()
2) Setting up various parameters
3) Calling IPC::Message()

There's no reason that we should be duplicating 1) across all of these
autogenerated functions.  In step 2), several of the parameters we're
setting up are common across all or nearly all calls: the message
segment size is almost always zero, and we're always indicating that
IPDL-generated messages should be recorded in telemetry.

Instead of duplicating that code several thousand times, we can add a
small helper function that takes the only interesting parameters for an
IPDL message.  This helper function can then deal with calling malloc in
a single place and setting up the common parameters.  For messages that
require a custom segment size, we'll have to use the old scheme, but
such messages are uncommon.

The previous changes are not required for this scheme to work, but they
do help significantly, as the helper function (Message::IPDLMessage) can
now take four parameters, which ensures that its arguments are passed
solely in registers on Win64 and ARM.  The wins from this change are
also larger than they would be without the previous parts: ~100K on
x86-64 Linux (!)  and ~80K on ARM Android.
2017-09-15 08:06:11 -04:00
Nathan Froyd
a697f87d36 Bug 1397823 - part 3 - do a better job setting IPC::Message flags; r=kanru
The current IPC::Message constructor takes a large number of arguments,
three of which--the nesting level, the priority, and the
compression--are almost always constant by virtue of the vast majority
of Message construction being done by auto-generated IPDL code.  But
then we take these constant values into the Message constructor, we
check them for various values, and then based on those values, we
perform a bunch of bitfield operations to store flags based on those
values.  This is wasted work.

Furthermore, for replies to IPDL messages, we'll construct a Message
object, and then call mutating setters on the Message object that will
perform even more bitfield manipulations.  Again, these operations are
performing tasks at runtime that are the same every single time, and use
information we already have at compile time.

The impact of these extra operations is not large, maybe 15-30K of extra
code, depending on platform.  Nonetheless, we can easily make them go
away, and make everything cleaner to boot.

This patch adds a HeaderFlags class that encapsulates all the knowledge
about the various kinds of flags Message needs to know about.  We can
construct HeaderFlags objects with strongly-typed enum arguments for the
various kinds of flags, and the compiler can take care of folding all of
those flags together into a constant when possible (and it is possible
for all the IPDL-generated code that instantiates Messages).  The upshot
is that we do no unnecessary work in the Message constructor itself.  We
can also remove various mutating operations on Message, as those
operations were only there to support post-constructor flag twiddling,
which is no longer necessary.
2017-09-15 08:06:11 -04:00
Nathan Froyd
c726125099 Bug 1397823 - part 2 - tidy _generateMessageConstructor enums a little; r=kanru
There's no need to be repeating 'IPC::Message::' prefixes or spreading
around more ExprVar calls than we need here.  Let's try to improve the
signal-to-noise ratio of this code by introducing a helper function to
inject some of the boilerplate for us.
2017-09-15 08:06:11 -04:00
Nathan Froyd
f4a054ab8d Bug 1397823 - part 1 - move work into _generateMessageConstructor; r=kanru
_generateMessageConstructor takes a lot of `md.FOO`-style parameters,
which could be derived inside the function by simply passing `md`.
Especially with the upcoming changes to calculate things like reply-ness
of messages, sync-ness, etc, we'd be wanting to pass even more
parameters like `md.FOO`.  So let's just pass `md` in, and then we can
make all the necessary future changes in a single place.
2017-09-15 08:06:11 -04:00
Kartikaya Gupta
b4ad327a0e Bug 1390488 - Pass the childProcessTmpDir from the parent process to the GPU process. r=froydnj
The GPU process doesn't have the directory service enabled, so it can't find
a tmp dir to put its .extra files for crash reports. Even if we do enable the
directory service, we still don't get the correct "content process tmp dir" in
the GPU process, because the UUID baked into that folder is passed via the
preferences service, and that isn't initialized in the GPU process either.
Rather than unneccessarily initialize all this stuff in the GPU process just
to get one folder name, we can pass that folder name directly in the argv list.

See comments 12-19 on the bug for further discussion of the various solutions
attempted/explored.

MozReview-Commit-ID: 1sFg27hIe7S

--HG--
extra : rebase_source : 78eb600a58fed45800b9df8303cc4d6898d96ae9
2017-09-13 11:26:25 -04:00
Kartikaya Gupta
2d2252c7b9 Bug 1390488 - Clean up ifdef indenting and balancing comments, no functional changes. r=froydnj
This function is very large and has many nested ifdefs. Without this cleanup
it was really hard to figure out where all I needed to add code.

MozReview-Commit-ID: IeA0AWW62Mn

--HG--
extra : rebase_source : a8447df42c60da79f1c982111c8f65bd0175f1de
2017-09-13 10:17:39 -04:00
Sebastian Hengst
b5c600d7f8 Backed out changeset fdffa51b68d1 (bug 1390488) for build bustage at ipc/glue/GeckoChildProcessHost.cpp:868: undefined reference to `CrashReporter::GetChildProcessTmpDir(nsIFile**)'. r=backout on a CLOSED TREE 2017-09-13 16:37:50 +02:00
Sebastian Hengst
3066457971 Backed out changeset b80e267bdf30 (bug 1390488) 2017-09-13 16:36:56 +02:00
Kartikaya Gupta
36b2d6e26d Bug 1390488 - Pass the childProcessTmpDir from the parent process to the GPU process. r=froydnj
The GPU process doesn't have the directory service enabled, so it can't find
a tmp dir to put its .extra files for crash reports. Even if we do enable the
directory service, we still don't get the correct "content process tmp dir" in
the GPU process, because the UUID baked into that folder is passed via the
preferences service, and that isn't initialized in the GPU process either.
Rather than unneccessarily initialize all this stuff in the GPU process just
to get one folder name, we can pass that folder name directly in the argv list.

See comments 12-19 on the bug for further discussion of the various solutions
attempted/explored.

MozReview-Commit-ID: 1sFg27hIe7S

--HG--
extra : rebase_source : 62ff819c5b03f642cd4b9af7c89c84b790397372
2017-09-13 10:18:15 -04:00
Kartikaya Gupta
89b69bc1d6 Bug 1390488 - Clean up ifdef indenting and balancing comments, no functional changes. r=froydnj
This function is very large and has many nested ifdefs. Without this cleanup
it was really hard to figure out where all I needed to add code.

MozReview-Commit-ID: IeA0AWW62Mn

--HG--
extra : rebase_source : a8447df42c60da79f1c982111c8f65bd0175f1de
2017-09-13 10:17:39 -04:00
J.C. Jones
554acaea86 Bug 1245527 - Remove NSS U2F SoftToken. r=ttaubert, r=jed
The nsIU2FToken and its implementors are no longer needed; the soft token was
re-implemented into dom/webauthn/U2FSoftTokenManager.cpp during the WebAuthn
implementation. When the dom/u2f/ code changed to the implementation from
WebAuthn, the old synchronous version became dead code.

This patch removes the dead code.

MozReview-Commit-ID: 2yDD0tccgZr

--HG--
extra : rebase_source : 0f14d8de8f62599a41c13aa4d8fc9cdbc1fd79c7
2017-09-05 12:32:42 -07:00
Sebastian Hengst
ecf716b8bb merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: CmMBcpJapLy
2017-09-12 11:35:15 +02:00
Bob Owen
6b4635da55 Bug 1395952: Enhance telemetry for failed launch of Windows sandboxed process by process type/error code key. r=jimm, data-r=rweiss
Only one telemetry accumlation will occur for each key per session.
2017-09-12 07:53:52 +01:00
Doug Thayer
d01cafd325 Bug 1397376 - Avoid copying on initializing histogram ranges r=gfritzsche
Since LinearHistogram and its descendants inherit ranges_ from
Histogram, and we wanted to replace the copying into a std::vec
for Histogram, the simplest approach seemed to just be to
precompute ranges for all histograms, exponential or otherwise.
This should have the added benefit of reducing the memory
footprint for those histograms, since they will benefit from the
deduplication work that the precomputing script already does.

MozReview-Commit-ID: JTV5Dej5ZIb

--HG--
extra : rebase_source : de942d54b3475be54c70d43d2fa8e772ee2e18c4
2017-09-08 12:13:44 -07:00
Wes Kocher
05c4aba599 Merge m-c to autoland, a=merge CLOSED TREE
MozReview-Commit-ID: 2dRRh6JLTIL
2017-09-11 15:21:36 -07:00
Aaron Klotz
5ff52c6547 Bug 1398907: Handler path should be written using length of null-terminated string in bytes, not size of the buffer; r=eeejay
MozReview-Commit-ID: 64Zv3obsQie

--HG--
extra : amend_source : bddaf442ed1af677aac6d03417fa2afc754b07eb
2017-09-11 13:47:38 -06:00
Andrea Marchesini
ee5e12fec0 Bug 1397645 - Propagation of the IPCBlobInputStream slicing to the parent process, r=asuth 2017-09-11 17:29:44 +02:00
Jeff Hajewski
91957254d0 Bug 1383816 - Adds IPC Read and Write methods for FocusTarget and NoFocusState structs and creates EmptyStructSerializer helper class; r=botond
Since NoFocusState is am empty struct used in the |mData| variant in
FocusTarget, we need to add a Reader and a Writer for IPC for NoFocusState so we
can properly read and write the |mData| variant. The NoFocusState Read and Write
methods do not read or write anything, since NoFocusState does not contain any
data. This is done by creating a helper class EmptyStructSerliazer and
inheritting from EmptyStructSerializer for the NoFocusState specialization.

The |Read| and |Write| methods for FocusTarget are updated by removing the read
and write code for the individual types of |mData| and instead makes use of the
IPC read and write methods for Variant.

MozReview-Commit-ID: 3159sp6FLek

--HG--
extra : rebase_source : ff82797c26abffbd8bbcc465dc40c621be3257d0
2017-09-02 14:10:40 -05:00
Jeff Hajewski
4a5af78bc9 Bug 1383816 - Fixes several minor errors in Variant's IPC implementation. r=botond
* VariantWriter construction switched to use aggregate initialization
* Call to AsVariant was inappropriately called via |paramType| when it should
  have been called via |mozilla|
* |Next::Read| call in VariantReader specialization was missing the |result|
  argument

MozReview-Commit-ID: Izany7iDX0k

--HG--
extra : rebase_source : 7387e72100c7d2ba8fcfd1e5a3b6d0ce6be6c740
2017-09-03 06:30:42 -05:00
Chris Manchester
c0a229d4c3 Bug 1386876 - Replace all uses of DISABLE_STL_WRAPPING with a template, remove DISABLE_STL_WRAPPING. r=glandium
MozReview-Commit-ID: FMEtb5PY7iP

--HG--
extra : rebase_source : 3cdee7528846462c758e623d6bcd2e6e17dbabff
2017-09-11 11:33:26 -07:00
Bill McCloskey
95968309c5 Bug 1397506 - IPDL unit test fix (r=kmag)
MozReview-Commit-ID: 96el4jm6WBS
2017-09-07 22:31:34 -07:00
Bill McCloskey
505889dbf4 Bug 1396155 - Change MessageChannel ordering assertion (r=froydnj)
MozReview-Commit-ID: 9MS9svUAeYR
2017-09-07 22:31:34 -07:00
Bill McCloskey
ae0dd13fe2 Bug 1397468 - Shmem creation/destruction messages should not be SystemGroup (r=dvander)
It's important that shmem creation/destruction messages be ordered
correctly with respect to other messages that use shmems. For example,
if we create a shmem with ID 10 and then send a message that
references shmem 10, then the creation message must be handled before
the referencing message. If shmem creation/destruction messages go in
a separate queue from other messages, this ordering may not be
preserved.

Leaving shmem creation/destruction unlabeled will give us the correct
ordering. Eventually, though, we'll need to provide a solution that
doesn't bottleneck the event queue.

MozReview-Commit-ID: 88MrslRrfnh
2017-09-07 22:31:34 -07:00
Kris Maglione
058f9fb930 Bug 1255894: Part 10 - Move StreamFilterParent to necko child process. r=billm,dragana
MozReview-Commit-ID: 4JKUC7x3QgN

--HG--
extra : rebase_source : ec1bcdc9d89b264df65b0ec1096921a4fc105f30
2017-09-07 17:28:27 -07:00
Aaron Klotz
d8518e56ab Bug 1383501: Move stream creation below buffer size check in mscom::ProxyStream::ProxyStream; r=jimm
MozReview-Commit-ID: fG4an6mSiR
2017-09-06 10:38:13 -06:00
Kris Maglione
c79059605f Bug 1396856: Part 2 - Add top outer window ID to LoadInfo. r=ehsan
The WebRequest API needs to know if a given window ID is at the top level, for
various reasons. It currently figures this out by mapping a channel's load
context to a <browser> element, which tracks its current top outer window ID.
But this is inefficient, and not friendly to C++ callers.

Adding the top window ID to the load info simplifies things considerably.

MozReview-Commit-ID: Fy0gxTqQZMZ

--HG--
extra : rebase_source : bb5b1e1b3294004ca5e713fc88c4e20652296e53
2017-09-06 14:25:23 -07:00
Bevis Tseng
cd0ef77297 Bug 1390076 - Label MainThreadInvoker using SystemGroup. r=aklotz 2017-08-28 14:11:38 +08:00
Bill McCloskey
677102393e Bug 1395330 - Release IPC lifetime assertions (r=mccr8)
MozReview-Commit-ID: 3CGjEofjojc
2017-09-06 15:28:41 -07:00
Nathan Froyd
d549d65f97 Bug 1396869 - eliminate -Wunused-private-field warnings in Android's message pump; r=jld
Android's MessagePumpForUI includes some useless code in its
MessagePumpAndroid class, which is completely unused.  Let's go ahead
and delete that.
2017-09-06 13:10:33 -04:00
Nicolas Silva
09e43ac029 Bug 1393031 - Expose webrender transactions at the ipc boundary. r=jrmuizel, r=kanru 2017-09-04 13:59:26 +02:00