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

4643 Коммитов

Автор SHA1 Сообщение Дата
Chris Manchester c86173526a Bug 1403346 - Replace all uses of ALLOW_COMPILER_WARNINGS with a template, remove ALLOW_COMPILER_WARNINGS. r=glandium
MozReview-Commit-ID: 1G2o4fy74cf
2017-10-25 15:12:09 -07:00
Andrea Marchesini 9a7c9c7e95 Bug 1408333 Get rid of nsIIPCBackgroundChildCreateCallback - part 20 - main part, r=asuth 2017-10-24 12:02:41 +02:00
sotaro c7d1be868f Bug 1410766 - Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander
--HG--
extra : amend_source : 4de9f562337cff010b90a3f579d7f7a451bebc5e
2017-10-26 17:32:07 +02:00
Attila Craciun 950e37c5e7 Backed out 1 changesets (bug 1410766) for failing Reftest in reftest/tests/layout/reftests/bugs/409084-1a.html r=backout on a CLOSED TREE.
Backed out changeset 6eac731d5c33 (bug 1410766)
2017-10-26 16:40:41 +03:00
sotaro fa6c47dce5 Bug 1410766 - Re-acquireDevices in gpu process when SimulateDeviceReset() is called r=dvander 2017-10-26 19:40:24 +09:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Sebastian Hengst 7e9a8a9bc9 merge mozilla-central to autoland. r=merge a=merge 2017-10-21 11:00:23 +02:00
Jed Davis 70736cfb1b Bug 1401790 - Remove ProcessArchitecture from IPC. r=billm,jimm
This was used to support cross-architecture NPAPI plugins on OS X, but
we stopped supporting that in 54 (bug 1339182).

MozReview-Commit-ID: 2BcWYD6mguY

--HG--
extra : rebase_source : 6e509a3cc1f356ccd24f1459c43bc8fb66d7b0f4
2017-10-04 20:31:12 -06:00
sotaro 8d85c3d52b Bug 1405952 - Remove PWebRenderBridge::SetDisplayListSync r=kats,kanru 2017-10-20 19:48:57 +09:00
Sebastian Hengst 24583b9443 merge mozilla-central to autoland. r=merge a=merge 2017-10-20 01:08:09 +02:00
Aaron Klotz 8f79c15fdb Bug 1409545: Add the ability to query a handler provider for the expected interface for an IUnknown outparam; r=jimm
MozReview-Commit-ID: 7eZ2giTfVG1

--HG--
extra : rebase_source : cc36fbd875ef798c41f20951b8354880138c0037
2017-10-16 16:15:02 -06:00
Kris Maglione 4a767c7e6e Bug 1404198: Part 2j - Switch to NS_NewTimer* everywhere else. r=njn
MozReview-Commit-ID: LmGIgfmNSmk

--HG--
extra : rebase_source : bf34e852beb0c8f6eafd09184c2e0cda95f95f83
2017-09-24 19:57:48 -07:00
Aaron Klotz eb3882c42d Bug 1409538: Add durations to MSCOM log; r=jimm
This patch adds two additional fields to each mscom log entry: The first is
the duration, in microseconds, of time spent in mscom overhead when executing
a call from the MTA on behalf of a remote client.

The second field is the duration, in microseconds, of time spent actually
executing the method within Gecko itself.

(In other words, the sum of the two fields will equal the total duration of
time spent executing the call.)

MozReview-Commit-ID: EhFieEPrhE5
2017-07-25 15:57:18 -06:00
Jed Davis 84c3a8a672 Bug 1400061 - Stop using SetAllFDsToCloseOnExec when launching processes on OS X. r=billm
As its original comments indicate, SetAllFDsToCloseOnExec has an
unavoidable race condition if another thread creates file descriptors
during launch.  Instead, use POSIX_SPAWN_CLOEXEC_DEFAULT, which is an
Apple-specific extension to posix_spawn that accomplished the desired
effect atomically.

This patch also introduces some RAII to simplify cleanup in error cases.

MozReview-Commit-ID: 6oHggs77AiY

--HG--
extra : rebase_source : a9391031a95fee4977af800ca993871277db51ce
2017-10-04 19:39:54 -06:00
Kris Maglione bd6d63772a Bug 1407428: Hand out a const array reference for expanded principal whiteList. r=krizsa
The current API makes the life time and ownership of the result array unclear
without careful reading. The result array is always owned by the principal,
and its lifetime tied to the lifetime of the principal itself. Returning a
const array reference makes this clear, and should prevent callers from
accidentally modifying the returned array.

MozReview-Commit-ID: 3f8mhynkKAj

--HG--
extra : source : 237acf2879f6222bc4b076c377bf026d18a6ebef
extra : amend_source : dfaf6e88e3c4758f7fdcf7fb422d457edafab1b7
2017-10-10 15:00:16 -07:00
Sebastian Hengst 11a2b8ef67 Backed out changeset 237acf2879f6 (bug 1407428) for frequent crashes, e.g. in xpcshell's test_bug248970_cookie.js. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 1ccac4fb953566239cba8db7d6f8bdca4ce48b35
2017-10-16 00:00:15 +02:00
Kris Maglione 7d8f8ea3d6 Bug 1407428: Hand out a const array reference for expanded principal whiteList. r=krizsa
The current API makes the life time and ownership of the result array unclear
without careful reading. The result array is always owned by the principal,
and its lifetime tied to the lifetime of the principal itself. Returning a
const array reference makes this clear, and should prevent callers from
accidentally modifying the returned array.

MozReview-Commit-ID: 3f8mhynkKAj

--HG--
extra : rebase_source : d2a5e0862f8c964fb5a3e46b50c2e9629b218699
extra : amend_source : 27d7a7ef5da6fe2aa1104009b6ee067465db73e1
2017-10-10 15:00:16 -07:00
Dan Banner 7caa92d5d8 Bug 1408777 - Automatically fix instances of missing semicolons in the tree. r=Standard8
MozReview-Commit-ID: Jm8BRgt6mIv
2017-10-15 20:50:39 +01:00
Jed Davis a9b7865141 Bug 1316153 - Remove base::ChildPrivileges from IPC. r=billm,bobowen
ChildPrivileges is a leftover from the B2G process model; it's now
mostly unused, except for the Windows sandbox using it to carry whether
a content process has file:/// access.

In general, when sandboxing needs to interact with process launch, the
inputs are some subset of: the GeckoProcessType, the subtype if content,
various prefs and even GPU configuration; and the resulting launch
adjustments are platform-specific.  And on some platforms (e.g., OS X)
it's all done after launch.  So a simple enum used cross-platform isn't
a good fit.

MozReview-Commit-ID: K31OHOpJzla

--HG--
extra : rebase_source : 3928b44eb86cd076bcac7897536590555237b76b
2017-09-08 16:16:50 -06:00
Jed Davis 6f041840ce Bug 1259852 - Merge Linux/BSD/Mac child process environment handling. r=billm f=jbeich
This is mostly based on the BSD version, which in turn is more or less
the Mac version minus some race conditions.  The Linux version does
something similar, but more verbosely and (at least in my opinion) is
harder to follow.  Some changes have been made, mainly to use C++11
features like UniquePtr.

MozReview-Commit-ID: 3Gv4DKCqWvu

--HG--
extra : rebase_source : 972264a778b9361d1259851554b5b7ae8f3dcdc6
2017-09-15 11:18:43 -06:00
evilpies@gmail.com 06beef32ba Bug 1305237 LoadInfo changes to include all ancestors principals and window IDs, r=bz,mystor
MozReview-Commit-ID: 1IMi5MqTx7o

--HG--
extra : rebase_source : 373f1928987718fe3bc22306e0dd3ae13fc0cd9f
2017-10-10 09:54:00 -07:00
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Sebastian Hengst fd1c572923 merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-05 11:47:25 +02:00
Andrea Marchesini e1d4351ed9 Bug 1403706 - Remove race conditions in temporary blob - part 8 - Remove nsTemporaryFileInputStream, r=smaug 2017-10-05 07:41:43 +02:00
Andrea Marchesini 943e663601 Bug 1403706 - Remove race conditions in temporary blob - part 6 - Introducing PTemporaryIPCBlob, r=smaug 2017-10-05 07:41:42 +02:00
Tom Ritter 99edbfc566 Bug 1404147 Fix signed/unsigned comparison of uints r=jld
MozReview-Commit-ID: 7z3JocWOrW5

--HG--
extra : rebase_source : f90aacbe737deff81da9aca0f6b64cad268074f4
2017-09-28 17:45:46 -05:00
Jim Chen f281c874c0 Bug 1404144 - 2. Move start child process JNI call to GeckoProcessManager; r=rbarker
Avoid going through GeckoAppShell and move the start child process JNI
call directly to GeckoProcessManager.

MozReview-Commit-ID: KU62TiHVQJX

--HG--
extra : rebase_source : 0e8546da502257e1c59bc00b79f50c79a314f3e6
2017-10-04 22:28:43 -04:00
Mike Hommey 4fe7459180 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Sebastian Hengst 7e81b9743d merge mozilla-central to autoland. r=merge a=merge 2017-10-04 11:15:12 +02:00
Sebastian Hengst 5e0b457b10 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EVLGo1zCANb
2017-10-04 11:13:24 +02:00
Sebastian Hengst 1d5497084d Backed out changeset 582d112281f9 (bug 1403366) 2017-10-04 01:27:07 +02:00
Mike Hommey 3b34606aa6 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : ac7bb0d7766fce5b6325c34c2868b26eec594e18
2017-09-28 10:37:27 +09:00
Wes Kocher 9e15b5649f Merge m-c to autoland, a=merge
MozReview-Commit-ID: 43R3aNMoMyN
2017-10-03 14:58:01 -07:00
Wes Kocher f4358f1539 Merge inbound to central, a=merge
MozReview-Commit-ID: I1ge4dvWtTB
2017-10-03 14:37:35 -07:00
Aaron Klotz aa44e53f36 Bug 1393600: Ensure that the handler sends a known interface to external clients; r=jimm
MozReview-Commit-ID: F5vxF2pB347
2017-09-24 14:32:36 -06:00
Aaron Klotz 35c65ef535 Bug 1393600: Prevent mismatches between the handler's expected interface and the one being provided by content; r=jimm
MozReview-Commit-ID: 4yQENc7i4LS
2017-09-21 16:53:56 -06:00
Tom Ritter 3b81e79e5a Bug 1405417 Add typename keyword in ipc/mscom/PassthruProxy.h to resolve ambiguity around member type r=aklotz
MozReview-Commit-ID: 6zEBdk8bKb9

--HG--
extra : rebase_source : 7e7c7a240abbe066d7f4e1d8b6619471b76c1c2d
2017-10-03 12:32:24 -05:00
Gian-Carlo Pascutto bc7dfc9353 Bug 1382323 - Remote OSProtocolHandlerExists. r=jld,smaug
MozReview-Commit-ID: Gml7cjbgUvK

--HG--
extra : rebase_source : 6ee7dfc8b5c05aec1ed268011fbec2ef64760554
2017-09-04 21:48:59 +02:00
Sebastian Hengst 9a0edde0b2 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: IRW0W7LuIM7
2017-10-03 11:43:52 +02:00
Aaron Klotz f88fa2ef6c Bug 1399557: Add Environment to mscom::ProxyStream and define it for IAccessible; r=jimm
MozReview-Commit-ID: 4wBjnFW9GRa

--HG--
extra : rebase_source : 43308d5c1d926300be222cb59d4913f61cc6c060
2017-09-29 15:41:28 -06:00
Benjamin Smedberg ce00e2cd37 Bug 1352567 - Remove plugin IPC code to support stream types other than NP_NORMAL (seekable and/or file streams), r=jimm
MozReview-Commit-ID: FWl2gcpKy6D
2017-10-02 14:54:22 -07:00
Wes Kocher 7c7aca4ea6 Backed out 2 changesets (bug 1305237) for crashtest failures in 403574-1.xhtml and 1282985-1.svg a=backout
Backed out changeset 96b5d596cc27 (bug 1305237)
Backed out changeset 5fe72402746f (bug 1305237)

MozReview-Commit-ID: CjCWY73Hps1

--HG--
extra : rebase_source : 7a9f0893dabdb0cb6ea79cc9cb7169ceed14616f
2017-10-02 16:41:56 -07:00
evilpies@gmail.com af192f668f 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
Wes Kocher 6b7e085c86 Backed out 2 changesets (bug 1305237) for bc failures in browser_WebRequest_ancestors.js a=backout
Backed out changeset 163a2b0bb0a0 (bug 1305237)
Backed out changeset e05bab140564 (bug 1305237)

MozReview-Commit-ID: GLlbWYZqyVS
2017-10-02 13:35:03 -07:00
Andrew McCreight 256f12363f Bug 1403961, part 2 - Fix and enable eslint for ipc/. r=billm
After the previous patch, all that is needed to pass eslint is some
whitespace fixes I generated using:
  ./mach eslint --fix ipc

The .eslintrc.js file makes eslint expect XPCShell global variables.

With those two changes, eslint can be enabled for the ipc/ directory.

MozReview-Commit-ID: BqSICp2iV6O

--HG--
extra : rebase_source : ccab8be9fc1ae1116ae55631d3978c39d35cad05
2017-09-29 09:46:32 -07:00
Andrew McCreight 5bee3fc312 Bug 1403961, part 1 - Don't load test_ipcshell_child.js from test_ipcshell.js. r=billm
I don't fully understand what this test is trying to do, but as far as
I can see, test_ipcshell_child.js does nothing when loaded from
test_ipcshell.js besides define a few variables, so just define them
directly in test_ipcshell.js. I am doing this because eslint does not
like the way the test is currently written: the definition of runtime
in another file confuses it, and it does not like the assignment to
run_test.

MozReview-Commit-ID: Ek0HY9n49eZ

--HG--
extra : rebase_source : 5c99b20afe93c085a198e7824e82207be347f26b
2017-09-29 09:52:23 -07:00
Jed Davis cf40bed720 Bug 1397928 - Remove some unused type definitions from process_util. r=billm
MozReview-Commit-ID: I30AUWYOPwi

--HG--
extra : rebase_source : 4183336bd3e1f0055366ebddf39cd1f518e2b139
2017-08-28 12:45:29 -06:00
Arthur Edelstein 8c18d9409a Bug 1404226 - Fix ubsan runtime error for mozilla::ipc::Transport::Mode enum. r=billm 2017-10-02 02:03:00 -04:00
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
Kris Maglione 616f60eb84 Bug 1255894: Part 9 - Allow returning non-copyable types in async IPDL methods. r=kanru
Certain types (such as Shmem and Endpoint types) cannot be copied, and need to
be moved when passed around. When used with MozPromises, that means that the
promise needs to be non-shareable, and the resolve functions need to use the
correct ref qualifiers.

MozReview-Commit-ID: Kt4WZNsDErK

--HG--
extra : rebase_source : 5a96f9844df1646482aa223edf5081de9d5fc976
2017-08-27 18:57:30 -07:00
Kris Maglione bbd81a336a Bug 1255894: Part 3 - Create skeleton IPDL framework for OOP stream filters. r=baku
This interface will allow extensions running into a content process to attach
a filtering stream listener to an HTTP request in the parent process. The
content process attaches a listener by sending a message from the content
process containing the ID of the request to filter, and the ID of the add-on
making the request. The permissions and request mappings for this are handled
by the web request service added in part 2.

MozReview-Commit-ID: B7Dd3ywwCBX

--HG--
extra : rebase_source : bf67c87f03c8355109bcc1193fbcb0b1c70ef224
2017-03-22 20:33:05 -07:00
Aaron Klotz 5e15da4ff9 Bug 1395329: Modify mscom::Interceptor::Create to properly initialize IUnknown interfaces; r=jimm
MozReview-Commit-ID: 7ZLzpH030Of

--HG--
extra : rebase_source : c49df7205a20c8ef4afbfb31b6cc5f54475179a0
2017-08-30 16:34:43 -06:00
Sebastian Hengst a895d4ae49 Backed out changeset 0eb505a8ac7c (bug 1395329) for Windows static bustage in Interceptor.obj. r=backout 2017-09-01 19:58:06 +02:00
Aaron Klotz 64fc054dc6 Bug 1395329: Modify mscom::Interceptor::Create to properly initialize IUnknown interfaces; r=jimm
MozReview-Commit-ID: 7ZLzpH030Of

--HG--
extra : rebase_source : 24fd48eb72bcee18bbc75a670d0035362dbeb92d
2017-08-30 16:34:43 -06:00
Aaron Klotz 693b60cf9c Bug 1395840: Backed out changeset e7f2eaf99d46 on suspicion of breaking virtual buffers in a11y clients; r=backout 2017-09-01 10:44:41 -06:00
Aaron Klotz a55d72f6da Bug 1383501: Move a crash annotation so that it does not mask a previous annotation with the same key; r=handyman
MozReview-Commit-ID: 9u7VTKDglrS
2017-08-31 11:31:28 -06:00
Petr Sumbera 61bd1ae7d9 Bug 1392203 - Make internal libevent work on Solaris. r=glandium 2017-08-23 03:40:23 -07:00
Sebastian Hengst 030c11d7dd merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 4IUksc3Mn9i
2017-08-31 14:36:51 +02:00
Aaron Klotz 81a34aa6ab Bug 1383501: Change remaining references to HKEY_CLASSES_ROOT to HKEY_LOCAL_MACHINE in mscom-related code; r=jimm
MozReview-Commit-ID: GAV3iqapXss

--HG--
extra : rebase_source : c0ed0578ca2e560203fc6c1a8fd172272209e84c
2017-08-28 15:15:35 -06:00
Aaron Klotz 2614073612 Bug 1393600: Prevent mismatches between the handler's expected interface and the one being provided by content; r=jimm
MozReview-Commit-ID: 9DTZHplk4Cz

--HG--
extra : rebase_source : 6c948e34b2bab71ba9a8df21b3d49495e2c9477b
2017-08-24 15:31:02 -06:00
Aaron Klotz f550f56c7e Bug 1394395 - Fix mscom build when ACCESSIBILITY is disabled. r=jimm
MozReview-Commit-ID: KmMTWR9FQcx

--HG--
extra : rebase_source : afb5ebce0c9478b4fba26610c2ee4292ee4afcb2
2017-08-28 12:27:28 -06:00
Wes Kocher 2198196808 Merge inbound to central, a=merge
MozReview-Commit-ID: G6QZZ8RGk6n
2017-08-29 16:14:22 -07:00
Aaron Klotz 73a014d007 Bug 1383501: Restrict mscom::MainThreadRuntime crash annotations to chrome and content to avoid false-positive leakchecks in gpu process; r=bustage CLOSED TREE
--HG--
extra : rebase_source : df8afbd05f6743163710cb29b1dab18a7aeaed3a
2017-08-29 12:00:04 -06:00
Aaron Klotz 436ebb0970 Bug 1383501: Follow-up: Remove unnecessary assertion; r=bustage 2017-08-29 11:32:19 -06:00
Jan Varga 1cb8d244c7 Bug 1351488 - Simplify IPCStreamSource::DoRead() and remove reallocation of the buffer (r=asuth)
MozReview-Commit-ID: 90mZpD1YqpV

--HG--
extra : rebase_source : 4a46872e1a89cabd43576b9437a93912185af4f5
2017-08-29 10:42:33 -05:00
Aaron Klotz de44372d1c Bug 1383501: More crash annotation improvements for mscom proxy unmarshaling failures; r=jimm
MozReview-Commit-ID: DIOsFREuhxj

--HG--
rename : ipc/mscom/InterfaceRegistrationAnnotator.cpp => ipc/mscom/RegistrationAnnotator.cpp
rename : ipc/mscom/InterfaceRegistrationAnnotator.h => ipc/mscom/RegistrationAnnotator.h
2017-08-28 15:16:20 -06:00
Tom Ritter ecc4b5ef67 Bug 1394868 Fix include casing in VTableBuilder.h to fix MinGW build r=aklotz
MozReview-Commit-ID: 8YHKyOOd7S5

--HG--
extra : rebase_source : d1ae0def3418235632b2ac8d671d4e8d3f6fa2b4
2017-08-29 11:34:58 -05:00
Jan de Mooij 3e1a11f41d Bug 1393790 part 1 - Remove JS_STUBGETTER and JS_STUBSETTER. r=jorendorff 2017-08-28 10:39:57 +02:00
Wes Kocher 7ea5ed6e6a Merge m-c to autoland, a=merge
MozReview-Commit-ID: LEKykpTAKjv
2017-08-25 17:32:33 -07:00
Wes Kocher 68149d6a59 Merge inbound to central, a=merge
MozReview-Commit-ID: 3N9jinnrmjb
2017-08-25 16:21:57 -07:00
Sebastian Hengst 6fd5b9e1ca merge mozilla-central to autoland. r=merge a=merge 2017-08-25 13:19:59 +02:00
Sebastian Hengst 31302b9cec merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 5armhVE9Jui
2017-08-25 13:12:04 +02:00
Cervantes Yu 7d0d416f10 Bug 1390143 - Generate the parent minidump synchronously to keep parent process's stack when creating paired minidumps. r=gsvelto
Bug 1360308 offloads IO operations from the main thread when we create paired minidumps.
This breaks the symmetry of paired minidumps: the thread stacks of the parent minidump
doesn't correspond to the thread stacks in the child minidumps and renders the parent
stack useless. This patch moves generation of the parent minidump back to the main
thread to keep the context of the parent process when creating paired minidumps. Child
minidump is still created asynchronously.

MozReview-Commit-ID: 9RmBAuXMPSX
2017-08-25 11:12:34 +08:00
Aaron Klotz 5921c2115b Bug 1393589: Refactor NOPING marshaling into its own class, mscom::FastMarshaler, and use it with IGeckoBackChannel; r=jimm
MozReview-Commit-ID: 9osDoYcvtWV

--HG--
extra : rebase_source : 9ead42f1b0c79f11b15121274a996d33d7ad4830
2017-08-17 15:54:28 -06:00
Aaron Klotz d7d645f5c4 Bug 1390652: Part 3 - Add proxy wrapper that passes its inner proxy through content as a blob; r=jimm
MozReview-Commit-ID: A4pAyiuJUlz
2017-08-21 15:47:44 -06:00
Aaron Klotz bd05dcbb61 Bug 1392681: Move IStream creation out of mscom::ProxyStream into its own utility functions; r=jimm
MozReview-Commit-ID: EucWtw0YeBI
2017-08-22 10:48:12 -06:00
Aaron Klotz 153e6759b5 Bug 1390652: Part 2 - Add support for TABLESTRONG marshaling to mscom::ProxyStream; r=jimm
MozReview-Commit-ID: 8hSvkULxF50
2017-08-16 16:31:07 -06:00
Ryan VanderMeulen 2f60ba6fc6 Merge m-c to autoland. a=merge
CLOSED TREE

--HG--
extra : amend_source : 57c6e5e3155c1ad79d409f8a71c40704297b0600
2017-08-24 20:59:40 -04:00
Tom Ritter 9f954680d0 Bug 1392688 Make variable DebugOnly to silence warning about it being unused r=jld
MozReview-Commit-ID: 7wSkP2Lcd0W

--HG--
extra : rebase_source : 1aa49424442f9bc278c257a3a65d93b22f04aea8
2017-08-22 12:41:24 -05:00
Gabriele Svelto 7387dc791b Bug 1393435 - Remove unnecessary inclusions of the crash reporter header files; r=mconley
MozReview-Commit-ID: 3tdFDrTYql8

--HG--
extra : rebase_source : cc862688f19afb8a5cf8c7cf915a5d3d45f041b5
2017-08-07 14:10:02 +02:00
Bill McCloskey c0ec174576 Bug 1391848 - Use nsIEventTarget instead of nsIThread for MessageLoop/Pump (r=kanru)
MozReview-Commit-ID: 8op94arX6FE
2017-08-25 10:28:23 -07:00
Bill McCloskey 2f11271997 Bug 1391865 - Use same PBackground for all cooperative threads (r=bevis)
MozReview-Commit-ID: 5Fgp42o8zbE
2017-08-25 10:28:23 -07:00
Bill McCloskey 587e22d043 Bug 1333962 - Add nsILabelableRunnable to label runnables like vsync (r=kanru)
MozReview-Commit-ID: FdvqV0LfFsz
2017-08-25 10:28:23 -07:00
Jan de Mooij 0f2181d932 Bug 1393715 - Remove JSFUN_STUB_GSOPS and JS_FS. r=arai 2017-08-25 17:04:12 +02:00
Eric Rahm a33f11e0f5 Bug 1391803 - Use nsStringFwd.h for forward declaring string classes. r=froydnj
We should not be declaring forward declarations for nsString classes directly,
instead we should use nsStringFwd.h. This will make changing the underlying
types easier.

--HG--
extra : rebase_source : b2c7554e8632f078167ff2f609392e63a136c299
2017-08-16 16:48:52 -07:00
Tom Ritter d0293ed01d Bug 1392684 Remove const qualifier that gets discarded after function return in mscom::AgileReference r=aklotz
gcc throws a warning-as-error saying that the const qualifier will be ignored by function callers.
Remove the const qualifier to remove the warning.

MozReview-Commit-ID: JRQMz6Zdcdz

--HG--
extra : rebase_source : 687a7b310270823180b848d6c65cba7ba688b2ae
2017-08-22 17:25:27 -05:00
Boris Zbarsky f979e78b8c Bug 1393063 - Part 1: Fix IPCStreamSource's handling of async streams returning 0 from Available. r=bkelly
This aligns the code more closely with how the input stream pump works: 0
available bytes when the stream itself told us it's ready means the stream is at
the end.

Note from asuth: This fix was originally part of bug 1371699, it was part 5.
However, its initial landing was backed out, but it is now very much needed for
bug 1393063, so I'm landing it.

--HG--
extra : rebase_source : 0675d9fd5796a90a4e206cbfa350cc5b4cd94d54
2017-06-13 16:16:55 -04:00
Henry Chang 25f77bb74d Bug 1349255 - Part 1: Make PBrowser.NotifyIMEFocus async to avoid UI jank. r=kanru,masayuki
Telemetry and some performance profiles show that Msg_NotifyIMEFocus can take
a few seconds to complete, and jank the browser. With bug 1217700, it removes
the necessity of sync Msg_NotifyIMEFocus, so in this patch we make this async
for performance improvement.

MozReview-Commit-ID: 15eUwMJ2Q7H

--HG--
extra : rebase_source : b463e6e881ca5ebec00d0f76e29ca103059b3ddd
2017-05-08 19:07:56 +08:00
J. Ryan Stinnett c3afba59bb Bug 1390736 - Add RUST_LOG_CHILD for child-only logging. r=froydnj
For certain use cases, it's nice to be able to target Rust debug logging to only
child processes (so you focus on web content vs. chrome running in the parent).

This adds `RUST_LOG_CHILD` which is copied to `RUST_LOG` when launching child
processes.

MozReview-Commit-ID: BWAZ4f51AW

--HG--
extra : rebase_source : 4663803f4ebd35d3fa655a2e2c404afa81671c2e
2017-05-01 16:42:15 -05:00
Tom Ritter c9aa053d8a Bug 1394874 Fix function order and add include to fix MinGW build r=aklotz
nsPrintfCString.h was not included, so it caused an error
GetStringValue was called before it was defined

MozReview-Commit-ID: HYoyWyaxqaZ

--HG--
extra : rebase_source : bf2c253cdba0c2fcf079a5b9bb275d39c6074f44
2017-08-30 00:36:14 -05:00
Wes Kocher c043502159 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 7sFZmPUXSx6
2017-08-18 17:21:29 -07:00
Eric Rahm 0938982c90 Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj
--HG--
extra : rebase_source : 063c7f95dda063eafabfa1921366bd1957b8fe73
2017-08-11 17:45:18 -07:00
Aaron Klotz 322aa4efee Bug 1383501: Add crash report annotations to proxy unmarshaling failure paths; r=jimm
--HG--
extra : amend_source : 69af068238f7792d2e579e02031d0b1e67b95e52
2017-08-09 15:07:11 -06:00
Masatoshi Kimura f7fb96c7e5 Bug 1390106 - Stop using versioned scripts in tests. r=jmaher
MozReview-Commit-ID: ErqU4M1f7Oj

--HG--
extra : rebase_source : 968490c3f787949324c44ba75b6daf5c346f54c3
2017-08-14 20:46:55 +09:00
Stone Shih de7f705042 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Wes Kocher 5a4357c768 Merge inbound to central, a=merge
MozReview-Commit-ID: GArkKmOFIVH
2017-08-11 13:15:33 -07:00
Wes Kocher cff9e9b197 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 2YvHbITn9w3
2017-08-10 18:25:34 -07:00
Sebastian Hengst 51d351f567 merge mozilla-central to mozilla-inbound. r=merge a=merge 2017-08-10 17:41:11 +02:00
Doug Thayer a70aac6a11 Bug 1388748 - Don't resize histogram ranges on init r=gfritzsche
We were using std::vector::assign, which resizes the vector to
match the incoming data. This isn't what we want, as ranges_ has
already been sized to bucket_count_ + 1. Instead, just use a
copy.

MozReview-Commit-ID: EGuW5jj7Rpq

--HG--
extra : rebase_source : 616d61fc27c7e43c22ea69e11e070ba958bf20a9
2017-08-09 10:21:09 -07:00
Bill McCloskey 81720f1abb Bug 1384336 - Fix to MainThreadInvoker to avoid deadlocks (r=aklotz)
When removing our Windows message loop pumping code in the content
process, a11y code on the MTA thread must have some way to wake up the
main thread. The main thread could be blocked either on a conditional
variable waiting for a Gecko event, or it could be blocked waiting on
a Windows HANDLE in IPC code (doing a sync message send). In the
former case, we wake it up by posting an event to the main thread. In
the latter case, we continue to use the asynchronous procedure call
mechanism.

MozReview-Commit-ID: FN6KWaGo9Zl
2017-08-09 21:24:20 -07:00
Mike Hommey 889e867916 Bug 1388981 - Fixup EVENT__SIZEOF_OFF_T. r=jld
There are two problems related with EVENT__SIZEOF_OFF_T:
- When building Firefox with -D_FILE_OFFSET_BITS=64, off_t is 64 bits,
  but the in-tree event-config.h still defines EVENT__SIZEOF_OFF_T to 4.
- When building Firefox *without* -D_FILE_OFFSET_BITS=64 (the default)
  against a system libevent that was built with -D_FILE_OFFSET_BITS=64,
  its event-config.h defines EVENT__SIZEOF_OFF_T to 8, which then
  doesn't match off_t size.

For the latter, libevent actually defines its own off_t type, that
callers are supposed to use instead of off_t. So that's what our
static_assert should be checking.

--HG--
extra : rebase_source : 4231530e3c260b2cdd53e15206d48ef0779e394c
2017-08-10 14:03:08 +09:00
Bob Owen 132c433aab Bug 1388048 - Check for failure of ResolveJunctionPointsAndSymLinks in GeckoChildProcessHost::GetPathToBinary. r=jimm
This patch also adds logging into ResolveJunctionPointsAndSymLinks to help diagnose issues that
might arise if the resolution fails or the path is not usable for some reason.
2017-08-07 17:27:10 +01:00
Carsten "Tomcat" Book c329d562fb merge mozilla-inbound to mozilla-central a=merge 2017-08-09 11:37:08 +02:00
Eric Rahm fe18bf0131 Bug 1386825 - Part 4: Remove remaining instances of MOZ_B2G. r=froydnj
MozReview-Commit-ID: 8r4eMwiZ4Vg
2017-08-08 14:41:09 -07:00
Jan Varga ac9ac9e347 Bug 1350637 - Part 9: Move Local Storage event broadcasting from PContent to PBackground; r=asuth 2017-08-08 23:02:28 +02:00
Jan Varga 03162967f7 Bug 1350637 - Part 8: Implement BackgroundParent::GetLiveActorArray; r=billm 2017-08-08 23:02:16 +02:00
Jan Varga 9d50c72e29 Bug 1350637 - Part 6: Fix a deadlock when main process storage child actor triggers storage thread initialization; r=asuth 2017-08-08 23:01:52 +02:00
Jan Varga 9ea37e48ab Bug 1350637 - Part 3: Move mozilla::dom::Optional serialization helper to ipc/glue/IPCMessageUtils.h to make it available to other consumers; r=billm 2017-08-08 23:01:03 +02:00
Jan Varga ceff0f7d8f Bug 1350637 - Part 1: Move PStorage stubs from PContent to PBackground; r=asuth r=billm
--HG--
rename : dom/storage/PStorage.ipdl => dom/storage/PBackgroundStorage.ipdl
2017-08-08 22:56:49 +02:00
Stone Shih 7de447a25a Backed out changeset 46d8f42863af (bug 1351148) 2017-08-11 15:19:44 +08:00
Doug Thayer d8e7d5c150 Bug 1383210 - Use precomputed histogram buckets r=gfritzsche
The log and exp calls in base::Histogram::InitializeBucketRange()
were showing up in profiles. This patch uses the precomputed
buckets for exponential histograms instead of computing them at
runtime. Though linear histograms do show up in the profile that
prompted this change, they contribute much less, and due to the
trivial nature of generating these, it's unlikely that a static
cache would provide much if any speedup.

MozReview-Commit-ID: IavFwoWjFhk

--HG--
extra : rebase_source : ad7d641ab2982f5cf8d202c7c382bfc26daa4bd5
2017-08-04 10:02:28 -07:00
Wes Kocher 4550ccb5d1 Backed out changeset 277c7e4952a8 (bug 1383210) for flake8 failures a=backout
MozReview-Commit-ID: 3j1ROBxjf2Z
2017-08-08 12:38:41 -07:00
Doug Thayer b31336cbe3 Bug 1383210 - Use precomputed histogram buckets r=gfritzsche
The log and exp calls in base::Histogram::InitializeBucketRange()
were showing up in profiles. This patch uses the precomputed
buckets for exponential histograms instead of computing them at
runtime. Though linear histograms do show up in the profile that
prompted this change, they contribute much less, and due to the
trivial nature of generating these, it's unlikely that a static
cache would provide much if any speedup.

MozReview-Commit-ID: IavFwoWjFhk

--HG--
extra : rebase_source : 18101da322faf9477acae266e9e27f579464f8d0
2017-08-04 10:02:28 -07:00
Jason Orendorff 5df09661ff Bug 1363200 - JSAPI for realms: JS_SetVersionForCompartment() -> JS::SetVersionForCurrentRealm(). r=sfink
--HG--
extra : rebase_source : 8b0d53210fe827a648251395e038cb7b9eb616e9
2017-05-22 14:40:13 -05:00
Nathan Froyd 0e2d3cda96 Bug 1387134 - out-of-line type-specific Pickle::Write* methods; r=billm
Having these functions declared in the class definition and therefore
inlined means that every call site is bloated by having to store the
argument so its address can be taken and load the sizeof() constant.
There's no good reason that we should be doing this; the Read*
counterparts are also out-of-lined, which hasn't seemed to cause any
problems.  Moving these out-of-line saves about 200K (!) of space on
x86-64 Linux.
2017-08-04 17:12:38 -04:00
Wes Kocher 2196b718d3 Merge inbound to central, a=merge
MozReview-Commit-ID: DlSLhaepjeU
2017-08-03 18:06:53 -07:00
Jan Varga 35496c2080 Bug 1283609 - Part 4: Remove unused code; r=billm 2017-08-03 11:22:32 +02:00
Jan Varga ae5b947527 Bug 1283609 - Part 3: Core changes, stop using nested event loop in BackgroundChild::GetOrCreateForCurrentThread(); r=billm
- BackgroundChild::GetOrCreateForCurrentThread(nsIIPCBackgroundChildCreateCallback* aCallback) emulates former asynchronous behavior
2017-08-03 11:22:11 +02:00
Jan Varga fdb1375046 Bug 1283609 - Part 2: Rename BackgroundChild::SynchronouslyCreateForCurrentThread to BackgroundChild::GetOrCreateForCurrentThread; r=billm 2017-08-03 11:21:53 +02:00
Jan Varga 72d235da4a Bug 1283609 - Part 1: Add an IToplevelProtocol::Open overload that takes an nsIEventTarget; r=billm 2017-08-03 11:21:44 +02:00
Aaron Klotz 13318abe9e Bug 1386422: Clean up error handling and stream positioning in StreamHandlerFromOBJREF; r=jimm
MozReview-Commit-ID: HmbZeX76bkb
2017-08-01 15:43:26 -06:00
Nicholas Nethercote 96045fda51 Bug 1382955 (part 3) - Remove a bunch of unused HAL stuff. r=gsvelto,kanru. 2017-08-02 10:09:32 +10:00
Masatoshi Kimura 8ed4a80a4e Bug 1322874 - Get rid of nsIURI.originCharset. r=valentin.gosu
nsIURI.originCharset had two use cases:
 1) Dealing with the spec-incompliant feature of escapes in the hash
    (reference) part of the URL.
 2) For UI display of non-UTF-8 URLs.

For hash part handling, we use the document charset instead. For pretty
display of query strings on legacy-encoded pages, we no longer care to them
(see bug 817374 comment 18).

Also, the URL Standard has no concept of "origin charset". This patch
removes nsIURI.originCharset for reducing complexity and spec compliance.

MozReview-Commit-ID: 3tHd0VCWSqF

--HG--
extra : rebase_source : b2caa01f75e5dd26078a7679fd7caa319a65af14
2017-08-02 20:43:30 +09:00
Stone Shih 9d1d77d849 Bug 1351148 Part2: Add a priority queue for input events. r=smaug.
MozReview-Commit-ID: 5ud1Ex9UNVo
2017-03-21 15:44:12 +08:00
Bill McCloskey 638d315450 Bug 1388920 - Call OnChannelConnected handler in parent protocols (r=bkelly)
MozReview-Commit-ID: 8lmpPlmraSw
2017-08-10 14:31:13 -07:00
Georg Koppen 235a9211b1 Bug 1372959 - Fix broken mingw-w64 build with --enable-accessibility. r=aklotz
This is a patch originally proposed by Jacek Caban.

--HG--
extra : rebase_source : 6f4c8049baec67f00484364b36a98d1a583eb2b5
2017-08-09 12:49:45 +02:00
Bob Owen 00eaf28579 Bug 1386502 - Whitelist paths added via pref for files opened in the content process during some tests. r=jimm
--HG--
extra : rebase_source : a34c7e1d445154843e8efd0146824dff0bdfda9b
2017-08-07 17:42:00 +01:00
Tom Ritter 762be623bf Bug 1390624 Resolve missing do_GetCurrentThread instance by including nsThreadUtils.h r=cyu
MozReview-Commit-ID: 2cQN4VTix7q

--HG--
extra : rebase_source : 169da32f32ae5c3f74b928e04b217cf9b6d58e4f
2017-08-16 20:12:37 -05:00
Aaron Klotz 9788ece7db Bug 1384328: Follow-up: Fix some error handling problems exposed by 71df96e65afa; r=bustage
MozReview-Commit-ID: GOar3lF4kCr
2017-08-01 15:11:34 -06:00
Dean deef8d264a Bug 1381470 - Added a less memory consuming method to tell if a histogram is empty. r=chutten 2017-07-31 21:38:48 +02:00
Aaron Klotz 43fe35a023 Bug 1384328: Marshal proxies destined for parent main thread with MSHLFLAGS_NOPING; r=jimm
MozReview-Commit-ID: Jfd4reMNYU0

--HG--
extra : rebase_source : 313b8db3381b730cc06843658b56a9fe9b4fa54c
2017-07-31 16:11:19 -06:00
Bob Owen 7aa93cb129 Bug 1369669: Resolve junction points and symlinks in the child executable path before launching. r=jimm
This is required so that DLL paths loaded after lockdown match policy rules.
2017-07-29 09:29:56 +01:00
Bill McCloskey c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Sebastian Hengst 6389867b7c Backed out changeset 1d87b1dc4ce2 (bug 1272697) for failing mochitest test_interfaces.html for 'ByteLengthQueuingStrategy' and wpts, e.g. general.dedicatedworker.html. r=backout on a CLOSED TREE 2017-07-28 20:20:50 +02:00
Till Schneidereit dec687b07c Bug 1272697 - Part 2: Add runtime pref to enable streams. r=baku,jonco
MozReview-Commit-ID: 5OSxbcd3jQB
2017-07-28 17:48:12 +02:00
Carsten "Tomcat" Book 28bdd40776 Merge mozilla-central to mozilla-inbound 2017-07-28 09:48:24 +02:00
Carsten "Tomcat" Book de369deb98 Backed out changeset 284af26c1b53 (bug 1351148) 2017-07-28 09:20:27 +02:00
Carsten "Tomcat" Book d360d49d2a merge mozilla-inbound to mozilla-central a=merge 2017-07-27 10:57:25 +02:00
Nathan Froyd f8bedda41c Bug 1384713 - remove unused *MsgStartChild constants; r=billm
We only ever use these for passing them into Endpoint construction.
Let's remove them.  Removing them also shows that the corresponding
field in Endpoint is essentially read-only, so we can completely avoid
passing in protocol IDs to Endpoint.
2017-07-27 13:32:15 -04:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Aaron Klotz 748441ac46 Bug 1383260: Fix problems with unmarshaling handler-wrapped object when in its original apartment; r=jimm 2017-07-21 16:16:16 -06:00
Kartikaya Gupta ba4b3b9101 Bug 1384233 - Remove SizePrintfMacros.h. r=froydnj
We have a minimum requirement of VS 2015 for Windows builds, which supports
the z length modifier for format specifiers. So we don't need SizePrintfMacros.h
any more, and can just use %zu and friends directly everywhere.

MozReview-Commit-ID: 6s78RvPFMzv

--HG--
extra : rebase_source : 009ea39eb4dac1c927aa03e4f97d8ab673de8a0e
2017-07-26 16:03:57 -04:00
Carsten "Tomcat" Book 198430bca2 merge mozilla-inbound to mozilla-central a=merge 2017-07-26 11:11:40 +02:00
Wes Kocher f19f28adfd Merge m-c to autoland, a=merge
MozReview-Commit-ID: F1X8wKqbkg
2017-07-25 19:16:09 -07:00
Nathan Froyd d501af7ca9 Bug 1378973 - label mscom's MainThreadRelease runnable; r=billm
These pointers don't touch things in the DOM, so SystemGroup is fine for
releasing them.
2017-07-25 11:17:32 -04:00
Bill McCloskey c590d9adb8 Bug 1383322 - Allow changing the current MessageLoop (r=dvander)
MozReview-Commit-ID: 1kyHqrhOzjF
2017-07-25 19:52:29 -07:00
Wes Kocher a1eadef812 Merge m-c to autoland, a=merge
MozReview-Commit-ID: B7oWq7qfpJ0
2017-07-24 18:13:05 -07:00
Chris H-C d85e538902 bug 1366294 - Part 11 - Fix OSX Build. r=gfritzsche
MozReview-Commit-ID: DSljXr8ZRhy
2017-07-24 09:52:26 -04:00
Chris H-C 6f04d378e5 bug 1366294 - Part 9 - Fix Windows Build. r=gfritzsche
MozReview-Commit-ID: 8P2W8fD2xNi
2017-07-24 09:52:26 -04:00
Georg Fritzsche 3a649263e4 Bug 1366294 - Part 3 - Refactor TelemetryHistogram storage. r=chutten
Previously we used the base::StatisticsRecorder object for storage by name.
This is keyed by histogram name, which doesn't match our storage reality anymore.
Instead we use a name to refer to a set of histogram instances that record data from different processes, as well as separating session and subsession data.

In this re-write, we instead introduce the following lookup paths (managed in TelemetryHistogram.cpp):
- Main storage:
  - (histogramId, processId, sessionOrSubsession) -> Histogram*
  - (histogramId, processId) -> KeyedHistogram* (this handles subsessions internally)
- Lookup:
  - (histogramName) -> histogramId
  - (HistogramID) -> bool (is recording enabled for this histogram?)

This is wrapped with a few lookup functions.

This also allows us to keep HistogramIDs in the JS histogram instances now, instead of pointers to Histogram instances.
That means Histogram instance life-time management is now properly contained inside TelemetryHistogram.cpp.

MozReview-Commit-ID: 5yijGv7mc89
2017-07-24 09:52:26 -04:00
Georg Fritzsche 681bd8d85a Bug 1366294 - Part 2 - Cleanup Chromium Histogram code. r=chutten
- A histogram name identifies a set of histogram instances, for which storage and lookup will be handled in TelemetryHistogram.cpp.
  So we remove the names from histogram code.
- Various unused macros in the header are removed.
- Remaining traces of StatisticsRecorder are removed from the Histogram class code.
- Some unused methods are dropped that were about printing histograms to ASCII etc.

MozReview-Commit-ID: BF2rLSpKOJ8
2017-07-24 09:52:26 -04:00