Commit Graph

1440 Commits

Author SHA1 Message Date
Tom Ritter
22d2cdf063 Bug 1406687 Pass return values from fwrite to Unused to silence the warn-unused-result warning r=njn
MozReview-Commit-ID: 4v6tPF5aMz7

--HG--
extra : rebase_source : c54b129c6815096035e262322f40aa0884b1ae56
2017-10-09 00:26:16 -05:00
Sebastian Hengst
aa78440a09 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EE6DcCgHufi
2017-10-09 11:19:20 +02: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
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Haik Aftandilian
6da29eda0b Bug 1393805 - Part 1 - Add XRE_USER_SYS_EXTENSION_DEV_DIR XRESysExtDev Key. r=bobowen,gcp
Adds a new directory provider key "XRESysExtDev" to be used by system extension
developers needing to load system extensions from a directory readable by
sandboxed content processes.

MozReview-Commit-ID: 4BKOZoPzCC3

--HG--
extra : rebase_source : 452db8d53a1f0248a080f858c48492978b5db808
2017-10-04 10:43:49 -07: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
4ee7a9c1c4 Backed out changeset 98092d164d57 (bug 1393805) for mass test failures, at least on OS X. r=backout on a CLOSED TREE 2017-10-05 00:21:03 +02:00
Haik Aftandilian
765ca88de4 Bug 1393805 - Part 1 - Add XRE_USER_SYS_EXTENSION_DEV_DIR XRESysExtDev Key. r=bobowen,gcp
Adds a new directory provider key "XRESysExtDev" to be used by system extension
developers needing to load system extensions from a directory readable by
sandboxed content processes.

MozReview-Commit-ID: 4BKOZoPzCC3

--HG--
extra : rebase_source : 8def79f66944f03943ea082dc3bbe746b7382010
2017-10-04 10:43:49 -07: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
Sebastian Hengst
006ae28b0a Backed out changeset 3eb67e350f38 (bug 1403366) 2017-09-29 17:19:46 +02:00
Mike Hommey
31399bfad2 Bug 1403366 - Stop requiring argv[0] for XRE_GetBinaryPath and the underlying BinaryPath::Get. r=froydnj
--HG--
extra : rebase_source : f61fd84dcc801f84f4838d357c795ce07928a4e6
2017-09-28 10:37:27 +09:00
Chris Peterson
10073693ba Bug 870698 - Part 3: Replace Insert("") with InsertLiteral(""). r=erahm
MozReview-Commit-ID: 7ERQfcVAiRx

--HG--
extra : rebase_source : de006c4c32f91bf184d9197e920d546253657f82
extra : intermediate-source : 1e875e7bf42881fd1a104501ad379d9f1cdc3c33
extra : source : 9a43a6935a1ce9bd52020fd816cc6c1686aa8564
2017-09-05 12:41:31 -07:00
Tomislav Jovanovic
8a81eff787 Bug 1386427 - Part 1: Add XRE*NativeManifests locations to dirsvc r=kmag
MozReview-Commit-ID: DoJIP6QZ5AX

--HG--
extra : rebase_source : 8351f66a4ddbe8a7c5a7fdf0dcc96288d060f53a
2017-09-12 18:58:23 +02:00
Doug Thayer
8aae071723 Bug 1382440 - Watch CPU usage in BHR r=froydnj
We would like to be able to see if a given hang in BHR occurred
under high CPU load, as this is an indication that the hang is
of less use to us, since it's likely that the external CPU use
is more responsible for it.

The way this works is fairly simple. We get the system CPU usage
on a scale from 0 to 1, and we get the current process's CPU
usage, also on a scale from 0 to 1, and we subtract the latter
from the former. We then compare this value to a threshold, which
is 1 - (1 / p), where p is the number of (virtual) cores on the
machine. This threshold might need to be tuned, so that we
require an entire physical core in order to not annotate the hang,
but for now it seemed the most reasonable line in the sand.

I should note that this considers CPU usage in child or parent
processes as external. While we are responsible for that CPU usage,
it still indicates that the stack we receive from BHR is of little
value to us, since the source of the actual hang is external to
that stack.

MozReview-Commit-ID: JkG53zq1MdY

--HG--
extra : rebase_source : 16553a9b5eac0a73cd1619c6ee01fa177ca60e58
2017-07-24 13:46:09 -07:00
Nicholas Nethercote
d5f5450783 Bug 1392884 - Remove nsIAtomService. r=froydnj.
It's no longer used, and we're in the process of making nsIAtom not usable from
scripts, so we don't want it to be used.
2017-08-25 17:06:58 +10:00
Kris Maglione
c4a2fd3bfb Bug 1363482: Part 2 - Allow pre-loading file and JAR entry contents off-thread during startup. r=erahm
MozReview-Commit-ID: 8bKzYpXBQvT

--HG--
extra : rebase_source : 6750d471a0a39338b5145e2dab9d953b4c30a63f
2017-08-30 15:47:17 -07:00
Kris Maglione
42402b8f46 Bug 1363482: Part 1 - Fix FileLocation(nsIZipArchive*) and add a GetBaseZip() getter. r=erahm
The FileLocation(nsIZipArchive*) constructor is declared, but not actually
implemented, so attempting to use it causes a linking error.

Additionally, when a FileLocation is created from an existing zip archive
(such as one from the zip cache or the Omnijar service), it's helpful to have
direct access to that archive rather than having to open a new copy, or infer
it from the path.

MozReview-Commit-ID: 2U14gAm0FYL

--HG--
extra : rebase_source : 97a420f5cc1a97a24debee3764989916be79bcaf
2017-05-10 17:10:58 -07:00
David Major
100151c7a9 Bug 1392485: Add REX.R mov to the disassembler. r=handyman
To mitigate risk for beta uplift, the logic here is limited to what we need for QueryDosDeviceW on Win7x64. A better long-term fix would be to combine this with the more general mov logic in the REX.W section.

MozReview-Commit-ID: BykQSYY61Ua

--HG--
extra : rebase_source : 84ad8ff28865cb04e21d6234a09b06202ca4d363
2017-08-30 07:16:44 +12: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
c3169de381 Bug 1392630 Remove unused variables r=froydnj
MozReview-Commit-ID: eSbnMzdWZm

--HG--
extra : rebase_source : c432a7d08b845fc102251faadeb7200a4991294a
2017-08-22 09:16:31 -05:00
Tom Ritter
9206f7061c Bug 1392618 Fix comparison between signed and unsigned integer expressions r=dmajor
MozReview-Commit-ID: JCfPClnoe2H

--HG--
extra : rebase_source : c955d489024ae2cff82304ec4d0d9aca5dcb9ee0
2017-08-22 08:57:35 -05:00
Olli Pettay
6e1dc494d2 Bug 1391423, add a nursery for purple buffer to allow faster addref/release on the main thread, r=mccr8
--HG--
extra : rebase_source : 4dcb8af2d3f2518ab0fd00b65fbf1d0096d8e810
2017-08-22 00:01:47 +03:00
Cervantes Yu
102fb1453d Bug 1320134 - Part 4: Remove the debug patches for running out of TLS slots on Windows. r=froydnj
Revert revision f760842b14a2, 051b765ca8f2 and 01125b5142e5 since the original
bug that we run out of TLS slots on Windows is no longer showing up after
firefox55. It should have been fixed elsewhere, very likely in the rust part.

MozReview-Commit-ID: 9j5hFSGT3OE
2017-08-21 16:24:29 +08: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
Bill McCloskey
a7bc022071 Bug 1384336 - Stop using OS-level event loop in content process (r=mstange)
MozReview-Commit-ID: 1ouSlgGchWl
2017-08-09 21:24:20 -07:00
Masatoshi Kimura
06311d2e3a Bug 1375125 - Remove nsILocalFile. r=froydnj
MozReview-Commit-ID: 6oU6Ya5UXtC

--HG--
extra : rebase_source : 55b6e30aa348c1b939326698b0da7d72c26b479c
2017-08-05 09:43:49 +09:00
Nicholas Nethercote
08e54b7c13 Bug 1384819 (part 1) - Split MozStackWalk(). r=glandium.
MozStackWalk() is different on Windows to the other platforms. It has two extra
arguments, which can be used to walk the stack of a different thread.

This patch makes those differences clearer. Instead of having a single function
and forbidding those two arguments on non-Windows, it removes those arguments
from MozStackWalk, and splits off MozStackWalkThread() which retains them. This
also allows those arguments to have more appropriate types (HANDLE instead of
uintptr_t; CONTEXT* instead of than void*) and names (aContext instead of
aPlatformData).

The patch also removes unnecessary reinterpret_casts for the aClosure argument
at a couple of MozStackWalk() callsites.

--HG--
extra : rebase_source : 111ab7d6426d7be921facc2264f6db86c501d127
2017-07-27 12:46:47 +10:00
Nicholas Nethercote
e99e711d3f Bug 1382099 - Remove MOZ_WIDGET_GONK from xpcom/. r=erahm.
As well as the straightforward things, this lets us remove ReadSysFile and
WriteSysFile, which in turn lets us remove TestFileUtils.cpp.

--HG--
extra : rebase_source : fc90c05352e654ffc41009d8504a9c54f394fc3f
2017-07-21 10:45:39 +10:00
Carsten "Tomcat" Book
b5c809a8bc merge mozilla-inbound to mozilla-central a=merge 2017-07-07 10:35:44 +02:00
Sylvestre Ledru
4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Stephen Fewer
9aa633008d Bug 1372849 - Improve the security of WindowsDllDetourPatcher. r=dmajor
--HG--
extra : rebase_source : d5afe76d17a4af5c54d041cde29bce2f34477742
2017-06-14 14:46:39 -05:00
Nicholas Nethercote
2262103c96 Bug 1378051 - Remove bogus #include of nsStringAPI.h. r=froydnj.
nsStringAPI.h is long gone, so that branch is clearly never compiled.

--HG--
extra : rebase_source : 0b237e73a11eed11d05e7c572583362fe52eab70
2017-07-04 16:04:51 +10:00
Nicholas Nethercote
033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote
915a56fb41 Bug 1375299 (part 2) - Remove PROFILER_MARKER. r=mstange.
PROFILER_MARKER is now just a trivial wrapper for profiler_add_marker(). This
patch removes it.

--HG--
extra : rebase_source : 9858f34763bb343757896a91ab7ad8bd8e56b076
2017-06-22 13:40:21 +10:00
Nicholas Nethercote
4b364cf3f3 Bug 1375299 (part 1) - Reduce usage of MOZ_GECKO_PROFILER. r=mstange.
This patch reduces the differences between builds where the profiler is enabled
and those where the profiler is disabled. It does this by removing numerous
MOZ_GECKO_PROFILER checks.

These changes have the following consequences.

- Various functions and classes are now defined in all builds, and so can be
  used unconditionally: profiler_add_marker(), profiler_set_js_context(),
  profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel.
  (They are effectively no-ops in non-profiler builds, of course.)

- The no-op versions of PROFILER_* are now gone. The remaining versions are
  almost no-ops when the profiler isn't built.

--HG--
extra : rebase_source : 8fb5e8757600210c2f77865694d25162f0b7698a
2017-06-22 06:26:16 +10:00
Chris Peterson
de85740dbf Bug 1373525 - xpcom/build: Remove unused member function DebugFilesAutoLock::Clear(). r=froydnj
xpcom/build/PoisonIOInterposerBase.cpp:79:21 [-Wunused-member-function] unused member function 'Clear'

MozReview-Commit-ID: ITI1mZk0DTx

--HG--
extra : source : 77e0683d430bac85376b476a783862db7acc384c
extra : intermediate-source : 935b7d158e4a1d2727998b0c2e7a9122ebefa257
2017-06-07 00:56:55 -07:00
Perry Jiang
45ea222ca2 Bug 1357154 - Cache Windows executable path after BinaryPath::Get is called in main. r=ehsan
MozReview-Commit-ID: Qby9b4ngz2
2017-06-22 10:56:04 -07:00
Arthur Edelstein
355ed44adc Bug 1344034 - Auto-enforce W^X for WindowsDllInterceptor hook pages. r=dmajor 2017-06-09 14:44:00 -04:00
Randell Jesup
bafb1e730e Bug 1344223 error-check mkstemp() r=froyd
MozReview-Commit-ID: 1z3cQXioTXP
2017-06-02 15:53:40 -04:00
Carl Corcoran
3ec4012254 Bug 1367899: Add handling for call reg opcode; r=dmajor
MozReview-Commit-ID: 2ncXsGf2H95

--HG--
extra : rebase_source : 70419541bf28844af4ce6348e343691d073556c3
2017-05-25 19:39:43 +02:00
Carl Corcoran
f203b4e69b Bug 1367899: Add handling for test r/m32, r32 and jne rel8 opcodes; r=dmajor
MozReview-Commit-ID: 3Cnx5tYrqMT

--HG--
extra : rebase_source : 723d961913e8d2788dcf3ce9b18aa6dffee4e963
2017-05-26 01:56:07 +02:00
Carl Corcoran
42a16ea02c Bug 1343149: Add handling for movups opcode; r=dmajor
MozReview-Commit-ID: 3fDrr2FkfD

--HG--
extra : rebase_source : 09b094868e0c6d754abf8e92b696699c70976382
2017-05-25 22:52:16 +02:00
David Parks
51b34f2689 Bug 1363290 - Part 4: Extend DLL interceptor to handle mov r32, imm32. r=dmajor
The code already handles this if the r32 is eax.  This allows it to use the other 32-bit registers.

--HG--
extra : histedit_source : 1cff5b54640cc48a0574b0b4323ad909e8a7e7b2
2017-05-16 14:48:56 -07:00
David Parks
efb6b228f4 Bug 1363290 - Part 2: Add movxsd instruction to WindowsDllInterceptor. r=dmajor
movxsd moves 32-bit register values to 64-bit registers, sign-extending them.  It is used by SetCursorPos.
2017-05-16 14:42:58 -07:00
Cervantes Yu
2dc8565a99 Bug 1348747 - Part 2: Support stub functions starting with jmp rel8 in WindowsDllDetourPatcher. r=handyman
MozReview-Commit-ID: 5hPBmxtBCnu

--HG--
extra : rebase_source : 52a1d43c9f57c9c8b70ded93cbcb76218922ea8b
extra : amend_source : 6377d7eb2246b38e69b95b2a7f507a0f86e300b1
extra : histedit_source : 5cc91dfb4613431466ccde12610a36578361bf53
2017-05-19 15:53:54 +08:00
Cervantes Yu
cd7a0759ce Bug 1348747 - Part 1: Fix WindowsDllDetourPatcher that generates extra 0xff byte when generating a x64 jmp instruction. r=handyman
MozReview-Commit-ID: 8TfcwXh6GUN

--HG--
extra : rebase_source : dae5e7e517bdac97eae0983fe4eedacd59f33deb
extra : amend_source : 8332240c2eeff58bc6cd9ea6e6175f2b860777f8
extra : histedit_source : f287291c7405a283f62c15e7ad2a9d8a1c283e06
2017-05-19 15:53:44 +08:00
Kris Maglione
fc0586811d Bug 1361900: Part 4 - Use a separate script cache for scripts loaded in the child process. r=erahm,gabor
MozReview-Commit-ID: EIdwmuTOl90

--HG--
extra : rebase_source : d2f6ba18a03cb54459e98b9d2ff03bc3d9567e83
extra : source : ad243db647c708b74859d73e8787b5b34897c140
2017-05-09 19:52:17 -07:00
Sebastian Hengst
e1ddae17f8 Backed out changeset ad243db647c7 (bug 1361900) 2017-05-13 18:53:40 +02:00
Kris Maglione
34e20a0617 Bug 1361900: Part 4 - Use a separate script cache for scripts loaded in the child process. r=erahm,gabor
MozReview-Commit-ID: EIdwmuTOl90

--HG--
extra : rebase_source : bce9efcd7b97c281bf4e17e30eed31e6e93c614a
2017-05-09 19:52:17 -07:00