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

3540 Коммитов

Автор SHA1 Сообщение Дата
Josh Matthews ee8da66177 Bug 1294450 - Make AutoIPCStream favour PSendStream for large input streams. r=nfroydj 2016-09-29 06:20:00 +02:00
Carsten "Tomcat" Book 5b45193594 merge mozilla-inbound to mozilla-central a=merge 2016-09-29 11:44:58 +02:00
Tooru Fujisawa 6d493d48ec Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
Wes Kocher 673a0db365 Backed out changeset 57e78c503c4e (bug 1294450) for build bustage a=backout 2016-09-28 17:38:00 -07:00
Josh Matthews facc06fda2 Bug 1294450 - Make AutoIPCStream favour PSendStream for large input streams. r=froydnj
--HG--
extra : rebase_source : 764aa593bd2734ca15d556a0b5ca55e3f69d25bb
2016-09-28 18:38:51 -04:00
Nathan Froyd aa23cf7561 Bug 1305814 - fix -Wreorder warning in MessageChannel; r=billm
Initializer lists are supposed to initialize member variables in the
order they're listed in the class definition.
2016-09-28 04:44:11 -04:00
Aaron Klotz 96c052cf1f Bug 1304883: Modify mscom::MainThreadInvoker and Win32 widget to use atomic boolean to flag pending APCs; r=jimm
MozReview-Commit-ID: 7fXoDkBEd2V

--HG--
extra : rebase_source : 1960f9bf8294bfea15209554dd7fdc0ce1df5dcc
2016-09-22 15:07:01 -06:00
Kate McKinley c57d400961 Bug 1246540 - HSTS Priming Proof of Concept. r=ckerschb, r=mayhemer, r=jld, r=smaug, r=dkeeler, r=jmaher, p=ally
HSTS priming changes the order of mixed-content blocking and HSTS
upgrades, and adds a priming request to check if a mixed-content load is
accesible over HTTPS and the server supports upgrading via the
Strict-Transport-Security header.

Every call site that uses AsyncOpen2 passes through the mixed-content
blocker, and has a LoadInfo. If the mixed-content blocker marks the load as
needing HSTS priming, nsHttpChannel will build and send an HSTS priming
request on the same URI with the scheme upgraded to HTTPS. If the server
allows the upgrade, then channel performs an internal redirect to the HTTPS URI,
otherwise use the result of mixed-content blocker to allow or block the
load.

nsISiteSecurityService adds an optional boolean out parameter to
determine if the HSTS state is already cached for negative assertions.
If the host has been probed within the previous 24 hours, no HSTS
priming check will be sent.

MozReview-Commit-ID: ES1JruCtDdX

--HG--
extra : rebase_source : 2ac6c93c49f2862fc0b9e595eb0598cd1ea4bedf
2016-09-27 11:27:00 -04:00
Aaron Klotz 9772dd793a Bug 1306014: Modify ipc/mscom/moz.build to only build essentials when a11y is disabled in build config; r=jimm
MozReview-Commit-ID: 4B08546SS4w

--HG--
extra : rebase_source : bded5176afaf99cb681c1be4b70edb9457ed2028
2016-09-28 14:09:07 -06:00
Carsten "Tomcat" Book 762cd18602 Merge mozilla-central to autoland 2016-09-28 16:52:13 +02:00
Makoto Kato 8edd5c2fd5 Bug 1305690 - GetCurrentProcessArchitecture should return cpu type on aarch64. r=billm
MozReview-Commit-ID: 7kwpZ6cbqfk

--HG--
extra : rebase_source : 65c4a9a9e36948ecaec52abbd07bc94d66f867d3
2016-09-27 20:42:29 +09:00
Josh Matthews ee501c8947 Bug 1167730 - Make nsTemporaryFileStream serializable. r=baku 2016-09-23 10:34:42 -04:00
Aaron Klotz 98faee3572 Bug 1304876: Fix 64-bit build failure in IPC TestDataStructures test; r=billm
MozReview-Commit-ID: G0b0mvV8gus
2016-09-19 13:15:39 -06:00
Ehsan Akhgari 5404c2dc93 Bug 1297687 - Part 2: Allow specifying an OriginAttribute when creating an expanded principal; r=bholley 2016-09-22 13:27:40 -04:00
David Anderson e87d2f8355 Make ipc::Shmem hold a strong reference to underlying SharedMemory. (bug 1303426 part 1, r=billm)
--HG--
extra : rebase_source : 32e182cf5fca848144f472b54a100547a3414f60
2016-09-21 22:40:20 -07:00
Andrea Marchesini db15f776a7 Bug 1288997 - memory blob should not be shared across processes - part 1 -PSendStream should use nsIContentChild, r=jld, f=bkelly 2016-09-21 12:27:26 +02:00
Ting-Yu Chou 823913da1e Bug 1301022 - Add an API for annotating pending IPC messages. r=ted
MozReview-Commit-ID: GiAMUnjYjvI

--HG--
extra : rebase_source : fdae4651f902f2d540b584c584de07f30a00bb8f
2016-09-20 14:10:43 +08:00
Christoph Kerschbaumer 8500d497a7 Bug 1297338 - Extend LoadInfo with a PrincipalToInherit member. r=bz 2016-09-20 08:35:45 +02:00
David Anderson df6a78744b Allow passing an empty Endpoint over IPDL. (bug 1302009, r=billm) 2016-09-19 19:18:20 -07:00
David Anderson f8b7f5c0ac Don't allow double-closing of IPC channels. (bug 1301481, r=billm) 2016-09-19 19:17:09 -07:00
Nicholas Nethercote d6cfd7634f Bug 1302309 - Cast some MaybeDestroy() calls to void. r=billm.
Most calls to MaybeDestroy() have their return value checked, but those that
take a T__None argument legitimately don't. Coverity gets upset by this, so
let's cast those calls to void to make Coverity happier.

--HG--
extra : rebase_source : 798c852371a682372c61cae953cc13c160b9ff9a
2016-09-13 13:48:42 +10:00
Bill McCloskey bb0a94054a Bug 1303499 - Fix broken IPDL tests (r=me, NPOTB) 2016-09-16 20:35:11 -07:00
Haik Aftandilian 9de1898bc2 Bug 1290619 - Content sandbox rules should use actual profile directory, not Profiles/*/ regex's; r=jimm
Passes the profile dir to the content process as a -profile CLI
option so that the correct profile dir can be used in the OS X content
sandbox rules.  Only enabled on OS X for now.

On Nightly, profile directories will now be read/write protected
from the content process (apart from a few profile subdirectories) even
when they don't reside in ~/Library.

xpcshell tests invoke the content process without providing a
profile directory. In that case, we don't need to add filesystem
profile dir. read/write exclusion rules to the sandbox.

This patch adds two new macros to the content sandbox rule set:
|profileDir| holds the path to the profile or the emptry string;
|hasProfileDir| is a boolean (1 or 0) that indicates whether or
not the profile directory rules should be added. If |hasProfileDir|
is 0, profile directory exclusion rules don't need to be added
and |profileDir| is not used.

MozReview-Commit-ID: rrTcQwTNdT

--HG--
extra : rebase_source : 3d5b612c8eb3a1d0da028eba277cd9d6f0c9ac00
2016-08-30 13:32:21 -07:00
Carsten "Tomcat" Book 0f2c669a48 merge mozilla-inbound to mozilla-central a=merge 2016-09-09 12:02:43 +02:00
Aaron Klotz fec23fc114 Bug 1301217: Ensure that RegisteredProxy objects are MTA-aware; r=jimm
MozReview-Commit-ID: HStX3pBl5ly
2016-09-07 16:10:45 -06:00
Aaron Klotz 23956d09e2 Bug 1301184: Notify the profiler and hang monitor when we're executing APCs; r=jimm
MozReview-Commit-ID: B4nTiAf9GNk
2016-09-06 14:39:37 -06:00
Kacper Michajlow 47fc1444d9 Bug 1297794 - Fix SetEntriesInAcl failure on non-English Windows version. r=aklotz
MozReview-Commit-ID: 4FJBtUBjPEu

--HG--
extra : rebase_source : 4463d4d897587e9a6427252b4c373b38c2c6331d
2016-08-24 20:57:16 +02:00
Alexandre Lissy e458f6fbc5 Bug 1301010 - Add missing Unused.h, StorageManager.h r=fabrice
MozReview-Commit-ID: 3ehLQTtBChb
2016-09-07 18:52:58 +02:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Bob Owen add3717103 Bug 1287426 Part 2: Remove uneeded base/basictypes.h include from WindowsMessageLoop.h r=jimm
MozReview-Commit-ID: AZ9cUmxHk4R
2016-09-06 08:57:20 +01:00
Cykesiopka f821d7aff6 Bug 1299743 - Remove unused XPCShellDirProvider class from XPCShellEnvironment.cpp. r=mrbkap
MozReview-Commit-ID: 5QULAP0NtSo

--HG--
extra : rebase_source : 4c66d52d5267aef326fa70e5299b0339428c3ab2
2016-09-03 22:46:13 +08:00
Nathan Froyd 499fc0976b Bug 1297804 - part 4 - avoid array bounds checks in DestroySubtree loops; r=billm
The IPDL compiler generates code like this in DestroySubtree methods:

    // Recursively shutting down PAPZ kids
    nsTArray<PAPZChild*> kids((mManagedPAPZChild).Count());
    // Accumulate kids into a stable structure to iterate over
    ManagedPAPZChild(kids);
    for (uint32_t i = 0; (i) < ((kids).Length()); (++(i))) {
        // Guarding against a child removing a sibling from the list during the iteration.
        if ((mManagedPAPZChild).Contains(kids[i])) {
            (kids[i])->DestroySubtree(subtreewhy);
        }
    }

There are three problems with this code:

1) We initialize |kids| with a capacity, which is wasted work;
   ManagedPAPZChild() is going to resize the array for us anyway.
2) We're constantly reading from |kids.Length()| in the loop, when we
   only really need to read from it once.
3) We're repeatedly accessing kids[i], and doing needless bounds checks.

Let's fix those three problems.
2016-09-02 16:14:28 -04:00
Nathan Froyd 2d2dec7fe4 Bug 1297804 - part 3 - avoid array bounds checking when writing nsTArray<T> to messages; r=billm
We know we're not going to perform out-of bounds accesses here.
2016-09-02 16:14:28 -04:00
Nathan Froyd 4de7ea1914 Bug 1297804 - part 2 - eschew array bounds checking in nsTArray IPDL-generated code, writer-side; r=billm
For better or worse, the IPDL compiler, for protocols that send or
receive arrays, generates Write methods for transferring those arrays,
rather than going through the standard ParamTraits specializations.
These generated methods perform unnecessary bounds checks when accessing
elements; such checks can be safely bypassed because we know the exact
length of all the arrays involved.  (Some compilers are not smart enough
to eliminate the bounds checks on their own.)
2016-09-02 16:14:28 -04:00
Nathan Froyd b086521c81 Bug 1297804 - part 1 - eschew array bounds checking in nsTArray IPDL-generated code, reader-side; r=billm
For better or worse, the IPDL compiler, for protocols that send or
receive arrays, generates Read methods for transferring those arrays,
rather than going through the standard ParamTraits specializations.
These generated methods perform unnecessary bounds checks when accessing
elements; such checks can be safely bypassed because we know the exact
length of all the arrays involved.  (Some compilers are not smart enough
to eliminate the bounds checks on their own.)
2016-09-02 16:14:28 -04:00
Nathan Froyd 25c7ca2c50 Bug 1297804 - part 0 - add a RangedFor stament type to IPDL's code generator; r=billm
This addition makes many of the upcoming patches significantly easier to
write, and enables us to avoid unpleasantness trying to fiddle with
ipdl.py's notions of C++ types.  (For instance, there's no good way,
when you have a type in-hand, to say the moral equivalent of
std::add_pointer<T>::type.)
2016-09-02 16:14:28 -04:00
Nathan Froyd 9d05d5014b Bug 1299594 - part 3 - remove gProtocolMutex; r=billm
It no longer protects any global state, and is therefore pure overhead.
2016-09-02 16:13:50 -04:00
Nathan Froyd 29e8bfeb34 Bug 1299594 - part 2 - remove opened actor tracking from IToplevelProtocol; r=billm
The only thing we needed opened actor tracking for was the ability to
clone all the actors.  But now that we no longer have support for
cloning actors, we no longer need to track the actors that we've cloned,
which makes a number of things significantly simpler.
2016-09-02 16:13:50 -04:00
Nathan Froyd fff9bd3854 Bug 1299594 - part 1 - remove CloneManagees/CloneToplevel code from IPDL; r=billm
CloneOpenedToplevels, which is never called, is the only interesting
caller of CloneToplevel.  And CloneToplevel, in turn, is the only
interesting caller of CloneManagees.  Which means we can ditch all this
code for a decent amount of space savings, both in code and writable
static data (no more useless virtual function entries in vtables).
2016-09-02 16:13:50 -04:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Kan-Ru Chen 99748028a6 Bug 1051567 - Make sure we resend file descriptors for the first chunk of a message. r=billm
Check if the buffers iterator was never consumed. This is a regression
introduced when converting ipc to use BufferList in bug 1262671.

MozReview-Commit-ID: LWAoVlI5CKJ

--HG--
extra : rebase_source : c4f16f4f90f56153c10cf1d9113c4c55748595f0
2016-08-30 18:26:59 +08:00
Nathan Froyd 40d6f37643 Bug 1298462 - tidy ipc/mscom/ files to avoid warnings from clang-cl; r=aklotz
Changing classes to `final` avoids complaints about deleting a class with
virtual functions.  Making destructors private avoids static_asserts from
XPCOM code about refcounted classes with public destructors.

MozReview-Commit-ID: IiPrZln1wvj

--HG--
extra : rebase_source : 5d70eea909e9d8c7f191c465b700b778b7ff564c
2016-08-26 14:26:29 -04:00
Wes Kocher 6c4583e52f Merge m-c to inbound, a=merge 2016-08-29 17:54:53 -07:00
Wes Kocher ecea29f6a3 Backed out changeset 0f53bc1a9aea (bug 1290619) a=merge 2016-08-29 17:40:59 -07:00
Aaron Klotz 63a3869bb8 Bug 1298412: Fix Interceptor construction to use Move semantics for STAUniquePtr instead of pass-by-reference; r=jimm
MozReview-Commit-ID: 8DzeT35Ao4O

--HG--
extra : rebase_source : 14a94903843e54c1c4a4b6c980805ed37d878911
2016-08-26 10:03:17 -06:00
Haik Aftandilian 3c44a5f111 Bug 1290619 - Content sandbox rules should use actual profile directory, not Profiles/*/ regexes. r=jimm
Passes the profile dir to the content process as a -profile CLI option so
that the correct profile dir can be used in the OS X content sandbox rules.
Only enabled on OS X for now.

On Nightly, profile directories will now be read/write protected from the
content process (apart from a few profile subdirectories) even when they
don't reside in ~/Library.

MozReview-Commit-ID: rrTcQwTNdT

--HG--
extra : rebase_source : d91d8939cabb0eed36b640766756548a790a301c
2016-08-25 15:19:52 -07:00
Nathan Froyd ed976e566d Bug 1298882 - ensure mozilla/mscom/Utils.h is included with uniform casing; r=aklotz
We install mozilla/mscom/Utils.h, but include it with an all-lowercased
path in some places.  clang-cl warns about this, and even though this is
Windows-only code and will therefore work, it's better to make
everything consistent.
2016-08-29 21:55:37 -04:00
Nathan Froyd 6d0ffbfa26 Bug 1298840 - declare dependent type with typename in ParamTraits<COMPtrHolder<Interface, _IID>>; r=aklotz
MSVC lets this slide, but clang-cl complains about the missing typename.
2016-08-29 21:47:03 -04:00
Ryan VanderMeulen 1c0c6ec5d4 Merge m-c to inbound. a=merge 2016-08-29 12:56:19 -04:00
Nathan Froyd 286887898c Bug 1297801 - part 4 - use non-null-checked operator new in IPDL code; r=billm
The standard placement new function requires a null check, implicitly
generated by the compiler, on its returned value.  For places we know
don't deal with null pointers, such as all the generated methods of IPDL
code, we can use an overloaded operator new that doesn't require the
null check.
2016-08-29 20:41:22 -04:00