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

2922 Коммитов

Автор SHA1 Сообщение Дата
Coroiu Cristina 1468575650 Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-01-10 23:45:07 +02:00
Dave Townsend 91b4da5027 Bug 1519184: Fix cache purging on windows. r=Gijs
When Firefox runs we cache a number of things, JS, XUL, XBL, CSS etc. Whenever
a new build of Firefox runs against a profile we clear the cache to rebuild with
the new information.

On the first run of a profile where compatibility.ini doesn't exist (presumably
to cover the case of upgrading from a very old versions of Firefox, but also
affects new profiles) we attempt to clear the cache as well.

If any attempt to clear the cache fails we set a flag in compatibility.ini
telling us to clear the cache on next startup.

Unfortunately nsIFile.remove returns different error codes on different
platforms when the file in question already doesn't exist. So an attempt to
remove a cache that does't exist is counted as a failure on Windows and so the
cache will be cleared again on second run.

This change counts the file not found return code as counting as a success when
clearing the cache.

Differential Revision: https://phabricator.services.mozilla.com/D16224

--HG--
extra : moz-landing-system : lando
2019-01-10 20:10:04 +00:00
Margareta Eliza Balazs 9dda825205 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-18 12:31:59 +02:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ehsan Akhgari 06c3d29113 Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre
Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

Differential Revision: https://phabricator.services.mozilla.com/D16936

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
2019-01-18 10:12:56 +01:00
Nathan Froyd e7964cca4f Bug 1514044 - part 1 - macro-ify process enums, strings, and XRE functions; r=mccr8
Having this information all defined in a single header will make life
easier if we ever add new process types.
2019-01-10 10:52:51 -05:00
Bob Owen 6c8f34c9ac Bug 1489796: On Windows resolve junction points and symlinks in the sys user extensions directories. r=jimm
This is needed because they are currently used in sandbox rules.
2018-12-13 09:08:40 +00:00
Dave Townsend e1283ad6c2 Bug 1518846: Fix missing includes in nsUpdateDriver.cpp. r=rstrong
Adds some includes that are needed for functions used in nsUpdateDriver.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D16063

--HG--
extra : moz-landing-system : lando
2019-01-09 17:27:21 +00:00
Aaron Klotz 1914ecea36 Bug 1509929: Part 2 - Modify MakeCommandLine to accept an array of extra args that will be appended to the final result; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D15447

--HG--
extra : moz-landing-system : lando
2019-01-08 00:09:52 +00:00
Bogdan Tara 96769dfd83 Backed out 3 changesets (bug 1509929) for mingw failures on TestSameBinary.cpp CLOSED TREE
Backed out changeset 8d432633f8fb (bug 1509929)
Backed out changeset 5ec50f23671e (bug 1509929)
Backed out changeset 8bdba9ec4d5b (bug 1509929)
2019-01-08 01:33:43 +02:00
Aaron Klotz ee8d23b14e Bug 1509929: Part 2 - Modify MakeCommandLine to accept an array of extra args that will be appended to the final result; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D15447

--HG--
extra : moz-landing-system : lando
2019-01-07 22:36:33 +00:00
Sylvestre Ledru cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D15426

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Carl Corcoran 26b6ee8b63 Bug 1516363: Fix duplicate definition of scoreThreshold causing compile error with `--disable-tests` r=gcp
When compiling without ENABLE_TESTS, the following error occurs:

/toolkit/xre/ModuleEvaluator_windows.cpp(221,20):  error: redefinition of
    'scoreThreshold' with a different type: 'const int' vs 'int'

This removes the 2 lines of code that caused the error.

Differential Revision: https://phabricator.services.mozilla.com/D15372

--HG--
extra : moz-landing-system : lando
2018-12-26 13:05:10 +00:00
Carl Corcoran b2b3ea7d03 Bug 1513176: Prevent mozglue.dll from appearing erroneously in the untrusted modules ping;r=aklotz
Nightly is reporting mozglue.dll as being untrusted in the untrusted modules
ping. Until now, xpcshell tests hard-code mozglue to appear as untrusted in
order to cover certain code paths related to startup modules.

This patch:
1. Checks explicitly for the xpcshell environment and only applies this logic
   during xpcshell tests.
2. Uses a purpose-build DLL, "untrusted-startup-test-dll.dll", instead of
   mozglue. This is more explicit and doesn't interfere with any "true"
   processing of mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D14720

--HG--
extra : moz-landing-system : lando
2018-12-24 21:04:13 +00:00
Carl Corcoran 26baade8b2 Bug 1514694: Treat DLLs under WinSxS with same trustworthiness as system32 r=aklotz
Adds a new flag for evaluating DLL trustworthiness:

ModuleTrustFlags::WinSxSDirectory

This flag indicates that the DLL was loaded from the WinSxS folder. This
grants a trustworthiness equal to that of ModuleTrustFlags::SystemDirectory, in
particular allowing some Microsoft DLLs, like comctl32.dll, to be considered
trusted so they don't appear in the untrusted modules ping.

Differential Revision: https://phabricator.services.mozilla.com/D15106

--HG--
extra : moz-landing-system : lando
2018-12-24 21:05:19 +00:00
Mike Hommey ad64da67ba Bug 1514435 - Always hook rust OOM handler. r=froydnj
And do that as early as possible.

Differential Revision: https://phabricator.services.mozilla.com/D14666

--HG--
extra : moz-landing-system : lando
2018-12-15 17:45:17 +00:00
Stephen A Pohl 40bf29a25f Bug 469990: Backout cset 7bd4fa70b728 for causing a large number of regressions (bug 1513341, bug 1513328, bug 1513335, bug 1513336). r=me, a=ryanvm 2018-12-13 13:18:42 -05:00
Richard Pospesel e29c04869d Bug 1485836: Move call to SandboxBroker::GeckoDependentInitialize into nsXREDirProvider::DoStartup. r=froydnj
This is because we need it to be called before extensions initialize, but after
NS_APP_USER_PROFILE_50_DIR is known.
2018-12-11 13:12:48 +00:00
Dave Townsend 0dd333051d Bug 1463198: Submit telemetry whenever the downgrade UI is shown. r=froydnj, datareview=chutten
Send a downgrade ping to telemetry when the downgrade UI is displayed.

--HG--
extra : rebase_source : 43a2437c5bf1ef448e5b1ca1cc3e32fc98b02868
extra : intermediate-source : b965981c9ce0449a8d70df6ad47ebf6c4f1f70b9
extra : source : 348f67b15246aa63b83457fde1a17540fa21379e
2018-05-18 13:03:24 -07:00
Dave Townsend 1e3b008bd7 Bug 1455707: Detect when running an older version than previously ran with the selected profile. r=froydnj, r=mconley, r=Gijs
Use the information in compatibility.ini to detect that the current running
application is an older version than previously ran with the profile and in
that case open a UI allowing the user to launch the profile manager, launch
the previous instance of the application or quit.

Also includes the patch from bug 1523725.

--HG--
rename : browser/themes/shared/information.svg => toolkit/themes/shared/profile/information.svg
extra : rebase_source : 3bf8b329eb5ea9e71fe2f0ed34a7e44dfdc434fd
extra : intermediate-source : 21a801ca5f6d435509f93e1dee187cb6ca868c8f
extra : source : c9d89812bc226ca593119bf440cb4f5e50ac2ace
2019-01-30 14:56:30 -08:00
Dave Townsend 0b0a1e8daa Bug 1522934: Add telemetry data to record what happened during profile selection at startup. r=froydnj, datareview=chutten
Set a telemetry scalar depending on the path taken during profile selection at
startup.

Differential Revision: https://phabricator.services.mozilla.com/D17696

--HG--
extra : rebase_source : bb4056c1c234f3aa61aedc8fddc87193f7aa45a9
extra : source : ebcd8225434ae82b837d632b5ef44bcc9dd5c5b0
2019-01-25 14:05:39 -08:00
Dave Townsend ca5293cbed Bug 1474285: Implement dedicated profiles per install. r=froydnj, r=Gijs
Uses a different profile depending on the install directory of the application.
installs.ini is used to map a hash of the install directory to a profile
directory.

If no profile is marked as default for the current install we use a heuristic
explained in the code to decide whether to use the profile that would have
been used before this feature.

The feature is disabled in snap builds where the install directory changes for
every version of the app, but multiple instances cannot share profiles anyway.
A boolean flag is used to turn on the feature because in a later patch we need
to be able to turn off the behaviour at runtime.

Includes code folded in from bug 1518634, bug 1522751, bug 1518632 and bug 1523024.

--HG--
extra : rebase_source : 0250c70e992fd8369e52ccee3755cf116a894791
extra : intermediate-source : e69cac07b209ad4ef4229815ffd8138ed64c348e
extra : source : e406bf0bcd665bd0e54ddb13d9ae880004badef1
2019-01-25 16:02:28 -08:00
Dave Townsend 9127e8bbdc Bug 1322797: Replace selectedProfile with currentProfile and fix defaultProfile. r=froydnj, r=flod
The current properties selectedProfile and defaultProfile are somewhat confusing
selectedProfile actually returns the default profile for the build and
defaultProfile returns the default profile for non-dev-edition builds. This
confusion leads to callers doing the wrong thing in some places.

What most code actually cares about is being able to set/get the default profile
for this build and getting the current profile in use. So this patch replaces
the previous properties with currentProfile and defaultProfile which do what
makes more sense.

This patch also switches from using the preprocessor to change behaviour for
dev-edition builds to using a boolean flag since some code was incorrectly
ignoring the setting to make dev-edition use the same profile as normal builds.

In order to make currentProfile correct when resetting a profile I had to move
CreateResetProfile into nsToolkitProfileService.

Differential Revision: https://phabricator.services.mozilla.com/D16118

--HG--
extra : rebase_source : cefe252618cd3a1b0e0cd5a71b056dd2b557f1a3
extra : intermediate-source : 35af79575f54f75d22e213fdac7ddd704b40807a
extra : source : 732d1ce192408d4f595f2fce16f45c7354ce3097
2018-12-28 09:44:47 -08:00
Coroiu Cristina 98ec0ea927 Backed out 7 changesets (bug 1518632, bug 1463198, bug 1455707, bug 1522934, bug 1322797, bug 1474285) for build bustages at /builds/worker/workspace/build/src/toolkit/xre/nsAppRunner.cpp on a CLOSED TREE
Backed out changeset 82355ab7e063 (bug 1455707)
Backed out changeset b965981c9ce0 (bug 1463198)
Backed out changeset 21a801ca5f6d (bug 1455707)
Backed out changeset 05200c5388b4 (bug 1518632)
Backed out changeset ebcd8225434a (bug 1522934)
Backed out changeset e69cac07b209 (bug 1474285)
Backed out changeset 35af79575f54 (bug 1322797)
2019-01-31 03:34:49 +02:00
Dave Townsend 3a81e14a64 Bug 1455707: Fix rebase breakage. r=bustage CLOSED TREE
--HG--
extra : amend_source : 8eb2287e57d04960e8c368d444b09e1f182b8b86
2019-01-30 17:17:24 -08:00
Dave Townsend e91f114689 Bug 1463198: Submit telemetry whenever the downgrade UI is shown. r=froydnj, datareview=chutten
Send a downgrade ping to telemetry when the downgrade UI is displayed.

--HG--
extra : rebase_source : 799ef400bc20aaab520641d21d744fe83aa5da27
extra : intermediate-source : 6bb1233693b8b2790263dbd511d92857a9d31e0b
extra : source : 348f67b15246aa63b83457fde1a17540fa21379e
2018-05-18 13:03:24 -07:00
Dave Townsend 25ec38eec8 Bug 1455707: Detect when running an older version than previously ran with the selected profile. r=froydnj, r=mconley, r=Gijs
Use the information in compatibility.ini to detect that the current running
application is an older version than previously ran with the profile and in
that case open a UI allowing the user to launch the profile manager, launch
the previous instance of the application or quit.

Also includes the patch from bug 1523725.

--HG--
rename : browser/themes/shared/information.svg => toolkit/themes/shared/profile/information.svg
extra : rebase_source : f81be6c98b8248ca9a09c1e3d70cff2f925ad77f
extra : intermediate-source : 198a6d5b96d4127b6d21485a3b1b0ab2d3bc2f72
extra : source : c9d89812bc226ca593119bf440cb4f5e50ac2ace
2019-01-30 14:56:30 -08:00
Dave Townsend 1fb2dfc2ee Bug 1522934: Add telemetry data to record what happened during profile selection at startup. r=froydnj, datareview=chutten
Set a telemetry scalar depending on the path taken during profile selection at
startup.

Differential Revision: https://phabricator.services.mozilla.com/D17696

--HG--
extra : rebase_source : 6c797b4a8122db69e61d0d954dcfd726d3d1970e
2019-01-25 14:05:39 -08:00
Dave Townsend 007be95c70 Bug 1474285: Implement dedicated profiles per install. r=froydnj, r=Gijs
Uses a different profile depending on the install directory of the application.
installs.ini is used to map a hash of the install directory to a profile
directory.

If no profile is marked as default for the current install we use a heuristic
explained in the code to decide whether to use the profile that would have
been used before this feature.

The feature is disabled in snap builds where the install directory changes for
every version of the app, but multiple instances cannot share profiles anyway.
A boolean flag is used to turn on the feature because in a later patch we need
to be able to turn off the behaviour at runtime.

Includes code folded in from bug 1518634, bug 1522751, bug 1518632 and bug 1523024.

--HG--
extra : rebase_source : b4608f6e8800af4f154daf0e0262f521c8ebd9fd
extra : intermediate-source : ba34b021c8e995ec7fc7c7fbb3dcc5dcf268278c
extra : source : e406bf0bcd665bd0e54ddb13d9ae880004badef1
2019-01-25 16:02:28 -08:00
Dave Townsend dd2eee0019 Bug 1322797: Replace selectedProfile with currentProfile and fix defaultProfile. r=froydnj, r=flod
The current properties selectedProfile and defaultProfile are somewhat confusing
selectedProfile actually returns the default profile for the build and
defaultProfile returns the default profile for non-dev-edition builds. This
confusion leads to callers doing the wrong thing in some places.

What most code actually cares about is being able to set/get the default profile
for this build and getting the current profile in use. So this patch replaces
the previous properties with currentProfile and defaultProfile which do what
makes more sense.

This patch also switches from using the preprocessor to change behaviour for
dev-edition builds to using a boolean flag since some code was incorrectly
ignoring the setting to make dev-edition use the same profile as normal builds.

In order to make currentProfile correct when resetting a profile I had to move
CreateResetProfile into nsToolkitProfileService.

Differential Revision: https://phabricator.services.mozilla.com/D16118

--HG--
extra : rebase_source : 24feb46363b5e43f35b51614d9dc6ae20ae49b65
extra : amend_source : 3c2051b98f19dc3288c59b0028db7d33c6953be3
extra : intermediate-source : 8404cc6140177a40c7086ddd4bf5d84735681048
extra : source : 732d1ce192408d4f595f2fce16f45c7354ce3097
2018-12-28 09:44:47 -08:00
Yuri 5232656d44 Bug 469990: Allow command line arguments to be handed off from a new Firefox/Thunderbird process to an existing one when necessary. r=spohl 2018-12-07 09:33:40 -05:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13371

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Sylvestre Ledru ef05004811 Bug 1503537 - Get rid of the pdfium & mortar code r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D10352

--HG--
extra : moz-landing-system : lando
2018-11-28 19:31:21 +00:00
Thomas Daede d23a7312fc Bug 1510113 - Never inline SaveToEnv or SaveWordToEnv. r=karlt
This allows Valgrind to recognize the call stacks to this function,
avoiding Valgrind warnings in intentional leaks in these functions.

Differential Revision: https://phabricator.services.mozilla.com/D13036

--HG--
extra : moz-landing-system : lando
2018-11-28 03:10:55 +00:00
Mike Hommey 6bf4eb5bce Bug 1496503 - Install the rust panic hook early. r=froydnj
Previously, our panic hook was only really useful when the crash
reporter is used, because all it did apart from calling rust's default
panic handler was to keep a pointer to the panic message for the crash
reporter.

Now that it just redirects to the Gecko crash code, it doesn't need to
be tied to the crash reporter. In fact, to ensure it's consistently used
in all cases, we ought to install it early on. Use a static initializer
for that.

Depends on D11720

Depends on D11720

Differential Revision: https://phabricator.services.mozilla.com/D11721

--HG--
extra : moz-landing-system : lando
2018-11-14 22:35:35 +00:00
Mike Hommey 1c6d1f8586 Bug 1496503 - Change the rust panic hook to delegate to Gecko's crash code. r=froydnj
The current rust panic hook keeps a string for the crash reporter, and
goes on calling the default rust panic hook, which prints out a crash
stack...  when RUST_BOOTSTRAP is set *and* when that works. Notably, on
both mac and Windows, it only really works for local builds, but fails
for debug builds from automation, although on automation itself, we also
do stackwalk from crash minidumps, which alleviates the problem.
Artifact debug builds are affected, though.

More importantly, C++ calls to e.g. MOZ_CRASH have a similar but
different behavior, in that they dump a stack trace on debug builds, by
default (with exceptions, see below for one). The format of those stack
traces is understood by the various fix*stack*py scripts under
tools/rb/, that are used by the various test harnesses both on
automation and locally.

Additionally, the current rust panic hook, as it calls the default rust
panic hook, ends up calling abort() on non-Windows platforms, which ends
up being verbosely redirected to mozalloc_abort per
https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/memory/mozalloc/mozalloc_abort.cpp#79
which then calls MOZ_CRASH. Theoretically, /that/ would also print a
stack trace, but doesn't because currently the stack trace printing code
lives in libxul, and MOZ_CRASH only calls it when compiled from
libxul-code, which mozalloc_abort is not part of.

With this change, we make the rust panic handler call back into
MOZ_CRASH directly. This has multiple advantages:
- This is more consistent cross-platforms (Windows is not special
anymore).
- This is more consistent between C++ and rust (stack traces all look
the same, and can all be post-processed by fix*stack*py if need be)
- This is more consistent in behavior, where debug builds will show
those stack traces without caring about environment variables.
- It demangles C++ symbols in rust-initiated stack traces (for some
reason that didn't happen with the rust panic handler)

A few downsides:
- the loss of demangling for some rust symbols.
- the loss of addresses in the stacks, although they're not entirely
useful
- extra empty lines.

The first should be fixable later one. The latter two are arguably
something that should be consistent across C++ and rust, and should be
changed if necessary, independently of this patch.

Depends on D11719

Depends on D11719

Differential Revision: https://phabricator.services.mozilla.com/D11720

--HG--
extra : moz-landing-system : lando
2018-11-14 22:35:33 +00:00
Michael Froman 2e78f7f1a1 Bug 1471535 - pt12 - Hook up RDD process and Remote decoding. r=jya,spohl
Depends on D8493

Differential Revision: https://phabricator.services.mozilla.com/D8494

--HG--
extra : moz-landing-system : lando
2018-11-14 18:07:28 +00:00
Michael Froman eb980fd0f3 Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
Depends on D8487

Differential Revision: https://phabricator.services.mozilla.com/D8488

--HG--
extra : moz-landing-system : lando
2018-11-14 18:05:53 +00:00
Dorel Luca 00c7bf05f9 Backed out 4 changesets (bug 1496503) for Valgrind bustage. CLOSED TREE
Backed out changeset 033a89b3e00d (bug 1496503)
Backed out changeset a0f255b660ce (bug 1496503)
Backed out changeset 963d8ac1cfee (bug 1496503)
Backed out changeset 43e44f8439ec (bug 1496503)
2018-11-14 19:00:29 +02:00
Mike Hommey abd27af4c4 Bug 1496503 - Install the rust panic hook early. r=froydnj
Previously, our panic hook was only really useful when the crash
reporter is used, because all it did apart from calling rust's default
panic handler was to keep a pointer to the panic message for the crash
reporter.

Now that it just redirects to the Gecko crash code, it doesn't need to
be tied to the crash reporter. In fact, to ensure it's consistently used
in all cases, we ought to install it early on. Use a static initializer
for that.

Depends on D11720

Differential Revision: https://phabricator.services.mozilla.com/D11721

--HG--
extra : moz-landing-system : lando
2018-11-14 08:46:07 +00:00
Mike Hommey 6345b0d7d9 Bug 1496503 - Change the rust panic hook to delegate to Gecko's crash code. r=froydnj
The current rust panic hook keeps a string for the crash reporter, and
goes on calling the default rust panic hook, which prints out a crash
stack...  when RUST_BOOTSTRAP is set *and* when that works. Notably, on
both mac and Windows, it only really works for local builds, but fails
for debug builds from automation, although on automation itself, we also
do stackwalk from crash minidumps, which alleviates the problem.
Artifact debug builds are affected, though.

More importantly, C++ calls to e.g. MOZ_CRASH have a similar but
different behavior, in that they dump a stack trace on debug builds, by
default (with exceptions, see below for one). The format of those stack
traces is understood by the various fix*stack*py scripts under
tools/rb/, that are used by the various test harnesses both on
automation and locally.

Additionally, the current rust panic hook, as it calls the default rust
panic hook, ends up calling abort() on non-Windows platforms, which ends
up being verbosely redirected to mozalloc_abort per
https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/memory/mozalloc/mozalloc_abort.cpp#79
which then calls MOZ_CRASH. Theoretically, /that/ would also print a
stack trace, but doesn't because currently the stack trace printing code
lives in libxul, and MOZ_CRASH only calls it when compiled from
libxul-code, which mozalloc_abort is not part of.

With this change, we make the rust panic handler call back into
MOZ_CRASH directly. This has multiple advantages:
- This is more consistent cross-platforms (Windows is not special
anymore).
- This is more consistent between C++ and rust (stack traces all look
the same, and can all be post-processed by fix*stack*py if need be)
- This is more consistent in behavior, where debug builds will show
those stack traces without caring about environment variables.
- It demangles C++ symbols in rust-initiated stack traces (for some
reason that didn't happen with the rust panic handler)

A few downsides:
- the loss of demangling for some rust symbols.
- the loss of addresses in the stacks, although they're not entirely
useful
- extra empty lines.

The first should be fixable later one. The latter two are arguably
something that should be consistent across C++ and rust, and should be
changed if necessary, independently of this patch.

Depends on D11719

Differential Revision: https://phabricator.services.mozilla.com/D11720

--HG--
extra : moz-landing-system : lando
2018-11-14 08:46:51 +00:00
Coroiu Cristina d0047119b0 Backed out 4 changesets (bug 1496503) for xpcshell failures at toolkit/crashreporter/test/unit/test_crash_rust_panic.js on a CLOSED TREE
Backed out changeset cfeee3d5ed6a (bug 1496503)
Backed out changeset 164a5a49fd25 (bug 1496503)
Backed out changeset d0b6c1fc149d (bug 1496503)
Backed out changeset bfb4ee856c71 (bug 1496503)
2018-11-14 09:00:06 +02:00
Mike Hommey dfc58833c0 Bug 1496503 - Install the rust panic hook early. r=froydnj
Previously, our panic hook was only really useful when the crash
reporter is used, because all it did apart from calling rust's default
panic handler was to keep a pointer to the panic message for the crash
reporter.

Now that it just redirects to the Gecko crash code, it doesn't need to
be tied to the crash reporter. In fact, to ensure it's consistently used
in all cases, we ought to install it early on. Use a static initializer
for that.

Depends on D11720

Differential Revision: https://phabricator.services.mozilla.com/D11721

--HG--
extra : moz-landing-system : lando
2018-11-13 23:50:37 +00:00
Mike Hommey 38dc94b5eb Bug 1496503 - Change the rust panic hook to delegate to Gecko's crash code. r=froydnj
The current rust panic hook keeps a string for the crash reporter, and
goes on calling the default rust panic hook, which prints out a crash
stack...  when RUST_BOOTSTRAP is set *and* when that works. Notably, on
both mac and Windows, it only really works for local builds, but fails
for debug builds from automation, although on automation itself, we also
do stackwalk from crash minidumps, which alleviates the problem.
Artifact debug builds are affected, though.

More importantly, C++ calls to e.g. MOZ_CRASH have a similar but
different behavior, in that they dump a stack trace on debug builds, by
default (with exceptions, see below for one). The format of those stack
traces is understood by the various fix*stack*py scripts under
tools/rb/, that are used by the various test harnesses both on
automation and locally.

Additionally, the current rust panic hook, as it calls the default rust
panic hook, ends up calling abort() on non-Windows platforms, which ends
up being verbosely redirected to mozalloc_abort per
https://dxr.mozilla.org/mozilla-central/rev/237e4c0633fda8e227b2ab3ab57e417c980a2811/memory/mozalloc/mozalloc_abort.cpp#79
which then calls MOZ_CRASH. Theoretically, /that/ would also print a
stack trace, but doesn't because currently the stack trace printing code
lives in libxul, and MOZ_CRASH only calls it when compiled from
libxul-code, which mozalloc_abort is not part of.

With this change, we make the rust panic handler call back into
MOZ_CRASH directly. This has multiple advantages:
- This is more consistent cross-platforms (Windows is not special
anymore).
- This is more consistent between C++ and rust (stack traces all look
the same, and can all be post-processed by fix*stack*py if need be)
- This is more consistent in behavior, where debug builds will show
those stack traces without caring about environment variables.
- It demangles C++ symbols in rust-initiated stack traces (for some
reason that didn't happen with the rust panic handler)

A few downsides:
- the loss of demangling for some rust symbols.
- the loss of addresses in the stacks, although they're not entirely
useful
- extra empty lines.

The first should be fixable later one. The latter two are arguably
something that should be consistent across C++ and rust, and should be
changed if necessary, independently of this patch.

Depends on D11719

Differential Revision: https://phabricator.services.mozilla.com/D11720

--HG--
extra : moz-landing-system : lando
2018-11-13 23:48:40 +00:00
Bogdan Tara fc8134a16a Backed out 12 changesets (bug 1471535) for VideoDecoderChild failures CLOSED TREE
Backed out changeset 3d8a11458d79 (bug 1471535)
Backed out changeset 2176010bc1fe (bug 1471535)
Backed out changeset dfb4d3462b22 (bug 1471535)
Backed out changeset ea6b73ded74d (bug 1471535)
Backed out changeset 404d760a9e82 (bug 1471535)
Backed out changeset 28ae4b6fab68 (bug 1471535)
Backed out changeset af91e1f04c2d (bug 1471535)
Backed out changeset d39fef4334b3 (bug 1471535)
Backed out changeset a038821cd8ae (bug 1471535)
Backed out changeset 5dcc74a938c6 (bug 1471535)
Backed out changeset 53aff7e699b4 (bug 1471535)
Backed out changeset f3f6abc052f0 (bug 1471535)

--HG--
rename : dom/media/ipc/GpuDecoderModule.cpp => dom/media/ipc/RemoteVideoDecoder.cpp
rename : dom/media/ipc/GpuDecoderModule.h => dom/media/ipc/RemoteVideoDecoder.h
2018-11-13 23:31:56 +02:00
Michael Froman 563ff5b11d Bug 1471535 - pt12 - Hook up RDD process and Remote decoding. r=jya,spohl
Depends on D8493

Differential Revision: https://phabricator.services.mozilla.com/D8494

--HG--
extra : moz-landing-system : lando
2018-11-13 17:36:47 +00:00
Michael Froman f862c70f8d Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
Depends on D8487

Differential Revision: https://phabricator.services.mozilla.com/D8488

--HG--
extra : moz-landing-system : lando
2018-11-13 17:35:21 +00:00
Martin Stransky 582b645d9b Bug 1504904 - Don't use GDK_IS_WAYLAND_DISPLAY() as it's missing on Gtk+ X11 only builds, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D11610

--HG--
extra : moz-landing-system : lando
2018-11-12 15:25:38 +00:00
Martin Stransky dceca31a34 Bug 1506543 - Remove the comment from Bug 1506543, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D11612

--HG--
extra : moz-landing-system : lando
2018-11-12 14:43:02 +00:00
Martin Stransky 244d34062f Bug 1506079 - Build and run without DBus remote client on Wayland display, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D11466

--HG--
extra : moz-landing-system : lando
2018-11-09 13:27:08 +00:00
Dorel Luca cb089b0bc4 Backed out 9 changesets (bug 1471535) for Mochitest failures in build/src/dom/media/ipc/VideoDecoderChild.cpp
Backed out changeset 1342e21cf613 (bug 1471535)
Backed out changeset 8dc9b4d59f90 (bug 1471535)
Backed out changeset 8082f226b52d (bug 1471535)
Backed out changeset f53e1e7bd538 (bug 1471535)
Backed out changeset 1a991ac2e1f8 (bug 1471535)
Backed out changeset a32288737e57 (bug 1471535)
Backed out changeset a094c1ac3afe (bug 1471535)
Backed out changeset fe9b5cdf78f9 (bug 1471535)
Backed out changeset 3a8a75389c42 (bug 1471535)
2018-11-09 12:14:50 +02:00
Michael Froman 54b7fc8580 Bug 1471535 - pt12 - Hook up RDD process and Remote decoding. r=jya,spohl
Depends on D8493

Differential Revision: https://phabricator.services.mozilla.com/D8494

--HG--
extra : moz-landing-system : lando
2018-11-08 03:48:29 +00:00
Michael Froman e1e4d7186c Bug 1471535 - pt6 - Add GeckoProcessType_RDD. r=jya
Depends on D8487

Differential Revision: https://phabricator.services.mozilla.com/D8488

--HG--
extra : moz-landing-system : lando
2018-11-08 03:46:57 +00:00
Haik Aftandilian b1a4ba8dff Bug 1505445 - [Mac] With sandbox early startup, start the sandbox after the port exchange r=Alex_Gaynor
Don't start the sandbox until after the port exchange so the parent process does not have to wait longer in ContentParent::LaunchSubprocess() for the (expensive) sandbox_init_with_parameters call to complete in the child. Remove the policy rule allowing access to the parent port now that it is already open when the sandbox is initialized and therefore not needed.

Differential Revision: https://phabricator.services.mozilla.com/D11186

--HG--
extra : moz-landing-system : lando
2018-11-08 21:04:19 +00:00
Martin Stransky a3dbcdcdf6 Bug 1504937 - Use DBus remote only when running on Wayland display, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D11004

--HG--
extra : moz-landing-system : lando
2018-11-06 14:59:58 +00:00
Daosheng Mu e9931800c1 Bug 1498625 - Part 2: Switch VR process to TYPE_MOZILLA_CHILD message loop type. r=froydnj,handyman
Differential Revision: https://phabricator.services.mozilla.com/D10643

--HG--
extra : moz-landing-system : lando
2018-11-05 21:28:38 +00:00
Carl Corcoran e5453b98ac Bug 1435827 part 9/9: Adding basic test for untrusted modules ping;r=janerik
This is the first test for the untrusted modules ping. Tests for
- Basic payload structure validity.
- Expected results for a few specific DLLs

Differential Revision: https://phabricator.services.mozilla.com/D7177

--HG--
extra : moz-landing-system : lando
2018-11-02 07:41:07 +00:00
Carl Corcoran 70f1efda61 Bug 1435827 part 5/9: Add untrusted DLLs evaluation and processing r=aklotz
Bug 1435827 part 5/9: Add untrusted DLLs evaluation and processing;r=aklotz

This adds the module trustworthiness calculation code and WinDllServices
handling which prepares data to be consumed by telemetry.

This effectively closes the gap between UntrustedDllsHandler and the upcoming
untrusted modules telemetry ping. At this point nothing is going to invoke most
of this code yet; that comes in following patches that add the untrusted
modules telemetry ping.

Differential Revision: https://phabricator.services.mozilla.com/D6241

--HG--
extra : moz-landing-system : lando
2018-11-02 07:59:19 +00:00
Carl Corcoran 13f66b51b6 Bug 1435827 part 1/9: Send DLL load event info to xul;r=aklotz
We now record DLL load events along with stack trace and other data so we can
later determine trustworthiness and report the DLL via telemetry.

Differential Revision: https://phabricator.services.mozilla.com/D7175

--HG--
extra : moz-landing-system : lando
2018-11-02 08:01:52 +00:00
Martin Stransky 77e09876f8 Bug 1503592 - Make X11 Gtk backend default on Wayland enabled builds, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D10540

--HG--
extra : moz-landing-system : lando
2018-11-01 12:50:18 +00:00
Kirk Steuber 64e3703341 Bug 1501491 - Fix the Firefox build flag: --disable-content-sandbox r=bobowen,handyman
Differential Revision: https://phabricator.services.mozilla.com/D9811

--HG--
extra : moz-landing-system : lando
2018-10-30 11:44:22 +00:00
Carl Corcoran aec37aebf3 Bug 1503221: Add missing namespace qualifications in nsXREDirProvider.cpp;r=gcp
Due to UNIFIED_SOURCES, some missing "mozilla::" namespace qualifications in
nsXREDirProvider.cpp don't cause build errors. Fixing this for correctness and
to avoid build errors if the sources are separated.

Differential Revision: https://phabricator.services.mozilla.com/D10208

--HG--
extra : moz-landing-system : lando
2018-10-30 11:50:20 +00:00
Robert Strong 6c7cf8b65e Bug 1502681 - Always use ProgramData\Mozilla\updates for the updates directory. r=bytesized
Changes GetCommonUpdateDirectory to always return a directory under ProgramData\Mozilla\updates on Windows
Changes getMockUpdRootDWin to always return ProgramData\Mozilla\updates for the new updates dir location
Removed code that is no longer used in getMockUpdRootDWin
Fixes a build time warning that get_relative_path is not used in updater.cpp
2018-10-29 11:21:49 -07:00
Kirk Steuber 19c8368ea5 Bug 1458314 - Move the update directory to an installation specific location r=rstrong
This change applies to Windows only.
Firefox will need to migrate the directory from the old location to the new location. This will be done only once by setting the pref `app.update.migrated.updateDir2.<install path hash>` to `true` once migration has completed.

Note: The pref name app.update.migrated.updateDir has already been used, thus the '2' suffix. It can be found in ESR24.

This also removes the old handling fallback for generating the update directory path. Since xulrunner is no longer supported, this should no longer be needed. If neither the vendor nor app name are defined, it falls back to the literal string "Mozilla".

The code to generate the update directory path and the installation hash have been moved to the updatecommon library. This will allow those functions to be used in Firefox, the Mozilla Maintenance Service, the Mozilla Maintenance Service Installer, and TestAUSHelper.

Additionally, the function that generates the update directory path now has extra functionality. It creates the update directory, sets the permissions on it and, optionally, recursively sets the permissions on everything within.

This patch adds functionality that allows Firefox to set permissions on the new update directory on write failure. It attempts to set the permissions itself and, if that fails and the maintenance service is enabled, it calls into the maintenance service to try from there. If a write fails and the permissions cannot be fixed, the user is prompted to reinstall.

Differential Revision: https://phabricator.services.mozilla.com/D4249

--HG--
rename : toolkit/mozapps/update/updater/win_dirent.cpp => toolkit/mozapps/update/common/win_dirent.cpp
rename : toolkit/mozapps/update/tests/unit_aus_update/cleanupSuccessLogMove.js => toolkit/mozapps/update/tests/unit_aus_update/updateDirectoryMigrate.js
extra : moz-landing-system : lando
2018-10-23 21:41:04 +00:00
Panos Astithas 6edc5a8fce Bug 1085391 - Support Yosemite Handoff 'web browsing' activity type. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D8665

--HG--
extra : moz-landing-system : lando
2018-10-20 04:47:38 +00:00
David Parks 99e17d748f Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

Differential Revision: https://phabricator.services.mozilla.com/D7532

--HG--
extra : moz-landing-system : lando
2018-10-12 22:36:22 +00:00
Coroiu Cristina 4224edc453 Backed out 2 changesets (bug 1488439) for build bustage at /build/src/dom/plugins/ipc/PluginProcessParent.cpp on a CLOSED TREE
Backed out changeset 74b2087ee696 (bug 1488439)
Backed out changeset 85575fc37555 (bug 1488439)
2018-10-12 21:00:41 +03:00
David Parks 1ad569c6b1 Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

Differential Revision: https://phabricator.services.mozilla.com/D7532

--HG--
extra : moz-landing-system : lando
2018-10-12 17:40:10 +00:00
Ciure Andrei 9dc058058c Backed out changeset 6af35f6a050f (bug 1488439) for PluginProcessParent.cpp build bustages CLOSED TREE 2018-10-10 23:47:57 +03:00
David Parks cdf3ac5659 Bug 1488439: Part 1 - Replace Windows temp folder in sandboxed plugin process (r=bobowen,erahm)
The sandbox blocks GetTempFileName's prior response, causing the system to end up searching a number of (inaccessible) folders to use as a replacement for the temp folder.  This patch provides a path to a new folder on the command line for the plugin process.  This new temp folder, specific to this plugin process instance, is then communicated to the system via the TEMP/TMP environment variables.  This is similar to what is done for the content process but avoids nsDirectoryService, which doesn't exist in plugin processes.

Differential Revision: https://phabricator.services.mozilla.com/D7532

--HG--
extra : moz-landing-system : lando
2018-10-10 20:16:22 +00:00
Mike Hommey b4a498b215 Bug 1496327 - Remove MOZ_ENABLE_XREMOTE r=froydnj
Depends on D7691

Differential Revision: https://phabricator.services.mozilla.com/D7692

--HG--
extra : moz-landing-system : lando
2018-10-04 13:55:55 +00:00
Andrew McCreight 0437363577 Bug 1495912- Remove more trivial calls to do_QueryInterface r=smaug
MozReview-Commit-ID: 34BAwt3SAJk

Differential Revision: https://phabricator.services.mozilla.com/D7640

--HG--
extra : moz-landing-system : lando
2018-10-03 19:52:01 +00:00
Andrew McCreight ea6021b769 Bug 1494127 - Fix trivial calls to do_QueryInterface that return an nsresult r=smaug
Calls to do_QueryInterface to a base class can be replaced by a static
cast, which is faster.

Differential Revision: https://phabricator.services.mozilla.com/D7224

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:43 +00:00
Andrew McCreight 837f0af066 Bug 1493737 - Fix many trivial calls to do_QueryInterface r=smaug
If class A is derived from class B, then an instance of class A can be
converted to B via a static cast, so a slower QI is not needed.

Differential Revision: https://phabricator.services.mozilla.com/D6861

--HG--
extra : moz-landing-system : lando
2018-10-01 21:38:01 +00:00
Christian Holler 126cd814b0 Bug 1494021 - Disable task dispatching/running chaos mode in ASan Nightly. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D7267

--HG--
extra : moz-landing-system : lando
2018-10-01 11:12:41 +00:00
Masatoshi Kimura 209fbc21cd Bug 1493414 - Re-enable warnings as errors on clang-cl in toolkit/xre/. r=froydnj
_CrtSetReportXxxx stuff is dead decause we do not use debug CRT even in debug
builds for a long time. So I removed it to fix -Wunused-function.

--HG--
extra : source : ba00278fc1deee805e7ed13d0dc0658dee13465c
extra : intermediate-source : 5ffdd1f9f2562f9915f3c8805218fa33a908be20
2018-09-18 22:04:28 +09:00
Dave Townsend 8864a3e3e2 Bug 1493310: Add a way to access certain functionality of nsXREDirProvider for testing purposes. r=froydnj
In order to be able to have even basic xpcshell tests for bug 1474285 I need
nsXREDirProvider to be accessible and to be able to override a couple of the
directories it returns.

Differential Revision: https://phabricator.services.mozilla.com/D6544

--HG--
extra : moz-landing-system : lando
2018-09-24 14:55:37 +00:00
Dave Townsend 9136559bb3 Bug 1493202: Don't store offline startup state in nsIToolkitProfileService. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D6503

--HG--
extra : moz-landing-system : lando
2018-09-21 16:50:02 +00:00
Christian Holler 9cb2f6cd27 Bug 1486400 - Enable MOZ_CHAOSMODE by default for ASan Nightly Reporter builds. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5408

--HG--
extra : histedit_source : 81b2dcfe7eff8e37ce24153ecd0df6c649303f07
2018-09-10 13:03:23 +02:00
Eric Rahm 0c061732bd Bug 1492204 - Part 1: Stop using deprecated string writing iterators. r=froydnj
This switches over the few remaining usages of the deprecated
BeginWriting/EndWriting(iterator&) functions to the more standard
BeginWriting/EndWriting() functions.

--HG--
extra : rebase_source : 3c54621d4921eb45157ec4edce0b693bdd7f02d5
2018-09-18 09:44:57 -07:00
Ehsan Akhgari 84f3a6fad7 Bug 1491741 follow-up: Address review comment
DONTBUILD
2018-09-17 23:46:47 -04:00
Ehsan Akhgari 1c41cda6e0 Bug 1491741 - Part 2: DeCOMtaminate nsAppStartupNotifier; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5995
2018-09-17 23:45:02 -04:00
Ehsan Akhgari 14b7695438 Bug 1491741 - Part 1: Remove the XPCOM registration for nsAppStartupNotifier; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5994
2018-09-17 23:45:02 -04:00
Ehsan Akhgari 6c19b5c6fd Bug 1491735 - Remove the XPCOM registration for nsWebBrowserFind; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D5993
2018-09-17 19:48:13 -04:00
Ehsan Akhgari 9fe0e0670a Bug 1491605 - Remove nsIControllerCommandGroup because it is dead code; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5965
2018-09-17 09:54:04 -04:00
Ehsan Akhgari 743c23d1d0 Bug 1491588 - Remove the XPCOM registration for nsCommandParams; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5959
2018-09-17 09:54:00 -04:00
Ehsan Akhgari a219367760 Bug 1491576 - Remove the XPCOM registration for nsNativeAppSupportBase; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5951
2018-09-15 13:54:52 -04:00
Ehsan Akhgari e97468eee5 Bug 1491560 follow-up: Fix typo
Landed on a CLOSED TREE
2018-09-15 12:38:52 -04:00
Ehsan Akhgari 731d1adebd Bug 1491560 - Remove the XPCOM registration for nsCommandLine; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D5944
2018-09-15 12:16:39 -04:00
Bogdan Tara 3fc5bc9ad5 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-09-12 01:15:44 +03:00
L. David Baron 0ab1a41beb Bug 1490259 - Fix signed/unsigned comparison warning. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5569

--HG--
extra : moz-landing-system : lando
2018-09-11 19:01:51 +00:00
Ehsan Akhgari 554d3d7b44 Bug 1489790 - Part 1: Remove the XPCOM component registration for nsControllerCommandTable as well as kHTMLEditorCommandTableCID and kHTMLEditorDocStateCommandTableCID; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D5356
2018-09-11 09:58:33 -04:00
L. David Baron 2d5b9bbf5e Bug 1489297 patch 3 - Report MemoryErrorCorrection from WMI. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5201

--HG--
extra : moz-landing-system : lando
2018-09-10 21:56:53 +00:00
L. David Baron 4a8d8fce03 Bug 1489297 patch 2 - Refactor WMI query code so that it can be used for something else. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5200

--HG--
extra : moz-landing-system : lando
2018-09-10 21:53:57 +00:00
L. David Baron 28b04f143b Bug 1489297 patch 1 - Rename function that gets system manufacturer data from WMI in preparation for using it for memory error correction as well. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D5199

--HG--
extra : moz-landing-system : lando
2018-09-10 21:51:22 +00:00
Gerald Squelart b51e0fd0cc Bug 1489944 - Fixed some std::move warnings - r=froydnj
> dom/media/gmp/CDMStorageIdProvider.cpp(63,10):  warning:
> local variable 'storageId' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClip.cpp(581,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/DisplayItemClipChain.cpp(88,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> layout/painting/nsDisplayList.cpp(179,10):  warning:
> local variable 'str' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> gfx/thebes/gfxWindowsPlatform.cpp(454,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Will remove std::move().

> gfx/thebes/gfxFontEntry.cpp(245,20):  warning:
> local variable 'name' will be copied despite being returned by name [-Wreturn-std-move]
nsAutoCString -> nsCString, will add std::move().

> netwerk/cookie/nsCookieService.cpp(4460,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
GetPathFromURI() result is stored in an nsAutoCString, so it might as well return that type.

> toolkit/components/extensions/WebExtensionPolicy.cpp(462,12):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
> toolkit/components/extensions/WebExtensionPolicy.cpp(475,10):  warning:
> local variable 'result' will be copied despite being returned by name [-Wreturn-std-move]
`result` may be empty or may be arbitrarily long, so I'll use nsCString inside the function.

> toolkit/xre/CmdLineAndEnvUtils.h(349,10):  warning:
> moving a local object in a return statement prevents copy elision [-Wpessimizing-move]
Returning an UniquePtr, will remove std::move().
Also will `return s` instead of `return nullptr` when `(!s)`, to avoid extra construction which could also prevent elision (not entirely sure, but it's at least not worse!); and it's clearer that the two `return`s return the same already-constructed on-stack object.

> tools/profiler/core/shared-libraries-win32.cc(111,10):  warning:
> local variable 'version' will be copied despite being returned by name [-Wreturn-std-move]
nsPrintfCString -> nsCString, will add std::move().

> xpcom/glue/FileUtils.cpp(179,10):  warning:
> local variable 'fullName' will be copied despite being returned by name [-Wreturn-std-move]
> xpcom/glue/FileUtils.cpp(209,10):  warning:
> local variable 'path' will be copied despite being returned by name [-Wreturn-std-move]
nsAuto{,C}String -> ns{,C}String, will add std::move().

This allowed removals of 'AllowCompilerWarnings' from layout/painting,
netwerk/cookie, and toolkit/components/extensions.

Differential Revision: https://phabricator.services.mozilla.com/D5425

--HG--
extra : moz-landing-system : lando
2018-09-10 15:51:48 +00:00
Kirk Steuber e3df1a80e2 Bug 1489607 - Make nsXREDirProvider::GetInstallHash consistent with the NSIS CityHash plugin r=mossop
I would like to migrate the update directory to use a version of the hash consistent with what our installer generates as part of the work already being done to migrate the update directory (Bug 1458314).

This patch is a bit of a shim to ensure that no one uses the newly-exposed nsXREDirProvider::GetInstallHash to get the *old* value before Bug 1458314 lands. This way new callers will get a value that is stable, but also consistent with the hash generated by the installer.

Differential Revision: https://phabricator.services.mozilla.com/D5334

--HG--
extra : moz-landing-system : lando
2018-09-10 17:35:23 +00:00
Mike Hommey 117e48720c Bug 1489363 - Replace some string.Assign* with AssignLiteral. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D5224

--HG--
extra : moz-landing-system : lando
2018-09-07 22:12:01 +00:00
Nicholas Nethercote 563171857f Bug 1488628 - Change nsIConsoleMessage.message to an AString. r=erahm
--HG--
extra : rebase_source : e43aec79e309936e17d475b8c50559767538c18d
2018-09-05 13:31:42 +10:00
Bogdan Tara f302cbb0b3 Merge inbound to mozilla-central. a=merge 2018-09-05 02:24:27 +03:00
Aaron Klotz bd0e3152bb Bug 1488547: Add flag to IsSafeModeRequested to skip keypress checks; r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D4966

--HG--
extra : moz-landing-system : lando
2018-09-04 19:55:53 +00:00
Coroiu Cristina 83cdfe7284 Merge mozilla-central to inbound a=merge on a CLOSED TREE 2018-08-31 19:35:06 +03:00
ui.manish a5ea6dfab9 Bug 1435552 Remove NO_EM_RESTART from test harnesses; r=gbrown 2018-08-31 15:33:32 +02:00
Mark Banner 691543ee89 Bug 1486739 - Add missing dangling commas in browser/, services/, taskcluster/ and toolkit/. r=mossop
Automatic changes by ESLint, except for manual corrections for .xml files.

Differential Revision: https://phabricator.services.mozilla.com/D4439

--HG--
extra : moz-landing-system : lando
2018-08-31 05:59:17 +00:00
Ehsan Akhgari b26b734898 Bug 1488112 - Remove the XPCOM component registration for nsBaseCommandController; r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D4835
2018-09-04 15:03:22 -04:00
Ehsan Akhgari d37a149353 Bug 1488111 - Remove the XPCOM component registration for nsCommandManager; r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D4834
2018-09-04 15:03:22 -04:00
Tom Ritter 7e0fefeaa0 Bug 1475566 Disable #pragma comments for MinGW Builds r=glandium
In the MinGW browser build job, we're going to use -fms-extensions,
which will tell clang to start processing these comments. Clang
cannot process them correctly (it's an upstream bug) but it doesn't
need to, because we include the libs we need in moz.build files.

So we exclude them for MinGW builds. mingw-clang gets them wrong and
mingw-gcc (which doesn't even work anymore on -central) ignored them.

In the future, with a llvm fix, we could clean up the moz.build
files and re-enable these comments.

Differential Revision: https://phabricator.services.mozilla.com/D3527

--HG--
extra : moz-landing-system : lando
2018-08-29 03:50:39 +00:00
Aaron Klotz 7cdb379078 Bug 1486901: Part 2 - Set MOZ_LAUNCHER_PROCESS when the launcher process is enabled by default and restarting via LaunchChild; r=mhowell!
This patch causes Firefox processes created via LaunchChild to start via the
launcher process.

While this extra hop through the launcher process takes longer than if we were
to simply make LaunchChild use the same code as the launcher process itself,
I do not want to simply export LauncherProcessMain from firefox.exe, as that
would be too easy to hook into and mess with.

Another option would be to host a second copy of the launcher code inside
xul.dll, but that's less than ideal.

Anyway, until we get that figured out, I don't think it's too big a deal to
have this extra hop in place. I don't think anybody has been clamoring for
faster restarts from the updater or the profile manager.

Depends on D4496

Differential Revision: https://phabricator.services.mozilla.com/D4497

--HG--
extra : moz-landing-system : lando
2018-08-28 22:30:39 +00:00
Kris Maglione 2dee0aae3c Bug 1484496: Part 4b - Add intrinsic type information to most nsSimpleEnumerators. r=froydnj
This allows JS callers to automatically get the correct types during
interation, without having to explicitly specify them.

Differential Revision: https://phabricator.services.mozilla.com/D3728

--HG--
extra : rebase_source : b708f382d8ea571d199c669bfed5b5a7ca9ffac4
extra : histedit_source : 7df6feb82088c8a5ca45dc28fe4d2b852c177fee
2018-08-18 21:06:32 -07:00
Landry Breuil aa545e34c8 Bug 1457092 - Implement sandboxing on OpenBSD. r=gcp, r=jld
Add StartOpenBSDSandbox method calling pledge() syscall,
and use it where we're sandboxing processes.

The pledge subsets are coming from two new prefs:
- security.sandbox.pledge.content for the content process
- security.sandbox.pledge.main for the main process

--HG--
extra : rebase_source : 60da70e2d335755fda6126a6b7de7aad41eebb7e
2018-08-23 07:35:00 -04:00
Dave Townsend b3c5fb9be4 Bug 1484846: Expose a unique hash for the application install directory. r=froydnj
Profile-per-install uses a hash of the install directory to identify different
installs of Firefox. This exposes the existing cityhash generated hash from
nsXREDirProvider and makes it available on all platforms.

Differential Revision: https://phabricator.services.mozilla.com/D3852

--HG--
extra : moz-landing-system : lando
2018-08-21 14:53:03 +00:00
Dave Townsend 186e21eefd Bug 1455707: Remove CanShowProfileManager(). r=froydnj
MozReview-Commit-ID: IXDSW8suEBd

--HG--
extra : rebase_source : a517542072e5327f05d16de8f7f99b1b12b862db
extra : source : 9fdd083f0acccbf31eb37e5e4f4cefa44e57bd41
2018-05-15 10:43:55 -07:00
Daosheng Mu 8ac5934ce1 Bug 1430038 - Part 1: Add VR process to the process list; r=kip, jimm
Summary: MozReview-Commit-ID: AWyFur2gLCQ

Tags: #secure-revision

Differential Revision: https://phabricator.services.mozilla.com/D2876

MozReview-Commit-ID: HHGDiXyaqnB

--HG--
extra : rebase_source : cbb94eb1aaca4ca385559c0e997b508a80121105
2018-06-22 16:30:14 -07:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
Brian Hackett ecd9c2fa25 Bug 1481009 Part 1 - Enable the crash reporter exception handler in recording, replaying, and middleman processes, r=gsvelto.
--HG--
extra : rebase_source : bf51ed95a0e06b6e5710700785e2c37c0636bc03
2018-08-13 20:45:59 +00:00
Cosmin Sabou ca86972424 Backed out 8 changesets (bug 1481009) for causing devtools crashes @XUL + 0x37bba19. a=backout
Backed out changeset 11ee868c5903 (bug 1481009)
Backed out changeset 4a0c7dd5e1ac (bug 1481009)
Backed out changeset 4e6908123a97 (bug 1481009)
Backed out changeset 6869ea5ebd32 (bug 1481009)
Backed out changeset 85eec9cfc3d9 (bug 1481009)
Backed out changeset f7f4127aa9d8 (bug 1481009)
Backed out changeset 58598aa3cf0c (bug 1481009)
Backed out changeset 1ec7f635f4f3 (bug 1481009)
2018-08-12 14:50:41 +03:00
Brian Hackett e154de75e8 Bug 1481009 Part 1 - Enable the crash reporter exception handler in recording, replaying, and middleman processes, r=gsvelto.
--HG--
extra : rebase_source : 64c2c540ce77ef9fed35318de38f718905214231
2018-08-08 16:43:56 +00:00
Gabriele Svelto 15adf94f4d Bug 1348273 - Convert crash annotations into a machine-readable list of constants; r=ted.mielczarek,njn,dholbert,mak,cpearce,mcmanus,froydnj,Dexter,jrmuizel,jchen,jimm,bz,surkov
This introduces the machinery needed to generate crash annotations from a YAML
file. The relevant C++ functions are updated to take a typed enum. JavaScript
calls are unaffected but they will throw if the string argument does not
correspond to one of the known entries in the C++ enum. The existing whitelists
and blacklists of annotations are also generated from the YAML file and all
duplicate code related to them has been consolidated. Once written out to the
.extra file the annotations are converted in string form and are no different
than the existing ones.

All existing annotations have been included in the list (and some obsolete ones
have been removed) and all call sites have been updated including tests where
appropriate.

--HG--
extra : source : 4f6c43f2830701ec5552e08e3f1b06fe6d045860
2018-07-05 15:42:11 +02:00
Masatoshi Kimura 3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Felipe Gomes 25e4f07d6c Bug 1470324 - Don't load enterprise policies in the content during startup. r=kmag
With this patch, EnterprisePoliciesContent.js will only be loaded whenever a check for isAllowed happens in content.

This patch also adds shortcuts to make sure that checks for about:blank, about:neterror and about:certerror are skipped

MozReview-Commit-ID: AdMrolJqouN

--HG--
extra : rebase_source : 0949427c78fe26743294c0c1b43844f0154003b7
2018-07-27 14:50:55 -03:00
Tiberius Oros 036999d0a9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-25 13:43:03 +03:00
Robert Bartlensky 48c813758b Bug 1476314: Fix errors reported by infer in toolkit/*. r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D2266

--HG--
extra : moz-landing-system : lando
2018-07-23 23:38:46 +00:00
Aaron Klotz afe18923e0 Bug 1477402: Wrap WaitForInputIdle with checks for ERROR_NOT_GUI_PROCESS failures; r=agashlin
widget/windows/WinUtils.h is getting unwieldy and contains a combination of
both header-only and non-header-only code. I thought I'd take the opportunity
with this patch to create a new file for self-contained, header-only utility
functions, with the hope that we can eventually migrate some stuff out of
WinUtils into WinHeaderOnlyUtils in the future.

--HG--
extra : rebase_source : 6c874f78fc7113d1f7011fcd57ad9d024edb6761
2018-07-20 15:54:08 -06:00
Brian Hackett 2e7e38ee57 Bug 1465477 Part 2 - Add --save-recordings option to the firefox command line, r=jimm.
--HG--
extra : rebase_source : 0ee3673b7006f38d13d1e652cdc92d81d277fb45
2018-07-23 21:52:10 +00:00
Kris Maglione 7aa3564a28 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : source : aa9a8f18e98f930a3d8359565eef02f3f6efc5f9
extra : absorb_source : 81a22ab26ee8017ac43321ff2c987d8096182d37
2018-07-23 17:41:06 -07:00
Brindusan Cristian 91a3707d5f Backed out 3 changesets (bug 1477579) for build bustages on xpcshell\selftest.py and crashtest failures on /components/nsComponentManager.cpp. CLOSED TREE
Backed out changeset aa9a8f18e98f (bug 1477579)
Backed out changeset 5fb0b7746a5d (bug 1477579)
Backed out changeset 8359f8fe4184 (bug 1477579)
2018-07-24 04:55:03 +03:00
Kris Maglione dfd38a6ac3 Bug 1477579: Part 3 - Avoid duplicating static strings in category manager entries. r=froydnj
Much like the component manager, many of the strings that we use for category
manager entries are statically allocated. There's no need to duplicate these
strings.

This patch changes the category manager APIs to take nsACStrings rather than
raw pointers, and to pass literal nsCStrings when we know we have a literal
string to begin with. When adding the category entry, it then skips making
copies of any strings with the LITERAL flag.

MozReview-Commit-ID: EJEcYSdNMWs
***
amend-catman

--HG--
extra : rebase_source : 4f70e7b296ecf3b52a4892c92155c7c163d424d2
2018-07-23 17:41:06 -07:00
Kris Maglione 07727ed247 Bug 1477129: Part 3 - Re-enable e10s on FreeBSD. r=froydnj
Backed out changeset 197fcba26a38

MozReview-Commit-ID: 4OOmP91hKXQ

--HG--
extra : rebase_source : 92d3e01734c6154261a8003fcc481c9d81f00c38
2018-07-19 18:18:27 -07:00
Brian Hackett 594c07513c Bug 1207696 Part 1e - Disable crash reporting when recording/replaying, r=billm.
--HG--
extra : rebase_source : 3535b0dbbdb2354a996fc0e9f0389213b796ee3a
2018-07-23 14:33:42 +00:00
Aaron Klotz ae68a9de15 Bug 1467798: Fix problems with inlining and paths in TestDllInterceptorCrossProcess; r=handyman 2018-07-04 14:12:36 -06:00
Brian Hackett 8a5d8c4df2 Bug 1466877 Part 2 - Child side changes for sandboxing, r=mccr8.
--HG--
extra : rebase_source : f4128fd36a0eb2d121fc43b0a3594e357c3fc07e
2018-07-22 11:54:55 +00:00
Brian Hackett 3354a96d8d Bug 1465287 Part 8 - Allow spawning recording/replaying child processes and saving recordings, r=jld,mrbkap.
--HG--
extra : rebase_source : 1da4b1a7e485cfdafb38318860546ce3d0552815
2018-07-22 11:52:42 +00:00
Brian Hackett b20882bec7 Bug 1465287 Part 5 - Initialize record/replay and middleman state, r=mccr8.
--HG--
extra : rebase_source : 81511f5560eeaede54d5b62e218877a105f4e07c
2018-07-22 11:50:28 +00:00
Brian Hackett b514fe6917 Bug 1207696 Part 10g - Initialize replay-specific and middleman state, r=billm.
--HG--
extra : rebase_source : b3e604d804f55c5704afc07b9e7edb8c3dd6d373
2018-07-22 11:40:24 +00:00
Jan Beich 7d61fe74ac Bug 1475970 - Disable e10s on FreeBSD by default due to kernel bug. r=froydnj
MozReview-Commit-ID: UqaO9sZWr

--HG--
extra : rebase_source : eab027f9fa60d7c6ad65f14c5793b2025cba9ef3
2018-07-19 18:43:40 +00:00
Gurzau Raul 78bf6cbd3a Backed out changeset 47b3297877fa (bug 1476314) for bustage at z:/build/build/src/config/rules.mk [nsAppRunner.obj] on a CLOSED TREE 2018-07-19 17:36:31 +03:00
Robert Bartlensky cc7457bf9e Bug 1476314: Fix errors reported by infer in toolkit/*. r=Ehsan
MozReview-Commit-ID: DUVbLo6f4G6

--HG--
extra : rebase_source : bc2ef3c84e0fe7966244585b137f2440e1e74d51
2018-07-17 17:27:49 +01:00
Robert Bartlensky 85ef2b4c49 Bug 1475282: Fix DEAD_STORE issues in ProfileReset. r=erahm
MozReview-Commit-ID: 45COqLBdEze

--HG--
extra : rebase_source : 915361d1464c751c693f091cc2926661d6dbfa59
2018-07-16 18:27:16 +01:00
Jan de Mooij 594a3aa6d4 Bug 1475177 - Change sendCommand xpcshell function to only accept plain JSFunction callbacks. r=evilpie 2018-07-16 14:02:16 +02:00
Kris Maglione b744713e4e Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : intermediate-source : 7c03b7dd00e9675f9ac045ed1ea733eb0486904f
extra : absorb_source : c79df6bd9ebbec3454fcca1a81cbfa540ad91a3e
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 544ff4257f38fae99a800276d06eb0d719882ca2
2018-07-13 11:06:58 -07:00
Kris Maglione f071708db7 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : intermediate-source : ff41551f5ff1b98b72ed771a6f2a3f66a8b79a57
extra : absorb_source : c9fe7423fcbb47655b05209b44fb02b69b272d07
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : b98b792791274f00a5e649c82dc25043cc1d699a
2018-07-02 15:01:25 -07:00
Brindusan Cristian fe91a8922e Backed out 13 changesets (bug 1471025) for reftest failures on variation-format-hint-1a.html; bc failures performance/browser_preferences_usage.js; wpt failures on format-specifiers-variations.html. CLOSED TREE
Backed out changeset 6b672d70f335 (bug 1471025)
Backed out changeset 200bec7e766a (bug 1471025)
Backed out changeset 6c72dc1bff88 (bug 1471025)
Backed out changeset 7f4cc96fae12 (bug 1471025)
Backed out changeset b4f9178f132d (bug 1471025)
Backed out changeset 8eff817d2f7e (bug 1471025)
Backed out changeset f9362cf1add4 (bug 1471025)
Backed out changeset ce379eaab179 (bug 1471025)
Backed out changeset 7c03b7dd00e9 (bug 1471025)
Backed out changeset ff41551f5ff1 (bug 1471025)
Backed out changeset 46a6f9d0773b (bug 1471025)
Backed out changeset 434106f1b75e (bug 1471025)
Backed out changeset c490838c8329 (bug 1471025)
2018-07-14 01:16:06 +03:00
Kris Maglione 92550be97d Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : source : 38f690f30e78764763bb012045073fa781efa691
extra : histedit_source : 2daf7386fbc9f9696c73168d6421139c5cefc5b4%2Ca0adf715f65281047915e678f8c054e5ec671de3
2018-07-13 11:06:58 -07:00
Kris Maglione 954d6a28ca Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : source : 4b7a8a35ed956159e2f443c6211164c0cbf3d926
extra : histedit_source : 01a1160ce1107d12e8b376d4512dedb0478e447c
2018-07-02 15:01:25 -07:00
Brindusan Cristian a68383b333 Backed out 12 changesets (bug 1471025) for build bustages on dom/ipc/ContentProcess.cpp. CLOSED TREE
Backed out changeset 398ccedc20dc (bug 1471025)
Backed out changeset 599895de063e (bug 1471025)
Backed out changeset dc7ec17179d1 (bug 1471025)
Backed out changeset 5051f15fc200 (bug 1471025)
Backed out changeset faef4df47b20 (bug 1471025)
Backed out changeset d344247b8706 (bug 1471025)
Backed out changeset 83d98ea5ebac (bug 1471025)
Backed out changeset 38f690f30e78 (bug 1471025)
Backed out changeset 4b7a8a35ed95 (bug 1471025)
Backed out changeset e3bbc87b71af (bug 1471025)
Backed out changeset 68bb03c63b3c (bug 1471025)
Backed out changeset 4a8fbb472c91 (bug 1471025)
2018-07-13 22:11:24 +03:00
Kris Maglione 6c6960d4c8 Bug 1471025: Part 3c - Also pass the shared preference map handle to Android content processes. r=jld
MozReview-Commit-ID: CTjDzVC9gcD

--HG--
extra : rebase_source : c06aa38ff4bc2bdfa09a4aae359e1f418727ce29
extra : absorb_source : c68cd5f0e8f52980d35432cf21e1fc5552542bf2
2018-07-13 11:06:58 -07:00
Kris Maglione de31493580 Bug 1471025: Part 3b - Refactor Android shared FD API to require fewer modifications per change. r=jld
Adding or removing an FD from this API currently requires changes in about a
half dozen places. Ignoring the Java side of things. This patch changes the
API to pass a struct, rather than additional arguments for each FD, so that
adding and removing FDs only requires changing one declaration, and the two
call sites that add and consume the FDs.

MozReview-Commit-ID: CToSEVp1oqP

--HG--
extra : rebase_source : 28e8c6075bacf5f610058227a9731aeadb50f320
extra : absorb_source : f63602a163ed19fb65e26640319750fdd9b92ad1
2018-07-02 15:01:25 -07:00
Christian Holler 2a3b6f8ca3 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 1065a2f3b10913ac574cf1187d717f21fc2994e6
extra : histedit_source : 3042e51e496e4e8593b367d89332a9199bf3999c
2018-06-27 11:19:00 +02:00
Coroiu Cristina 5416c68fa2 Backed out changeset 64f3290fac6e (bug 1471532) on reqest by decoder a=backout 2018-06-30 00:57:00 +03:00
Christian Holler bdf8e4d393 Bug 1471532 - Support Windows in ASan Nightly Reporter builds. r=froydnj
MozReview-Commit-ID: AK2dBOgoazY

--HG--
extra : rebase_source : 6ed99ce79180f2a6f2d54a0898cb02acbd6e9fb6
2018-06-27 11:19:00 +02:00
Felipe Gomes 29b9e465b8 Bug 1470956 - Remove the E10S_STATUS and E10S_BLOCKED_FROM_RUNNING telemetry probes. r=chutten 2018-06-27 00:28:16 -03:00
Honza Bambas eef37ac56e Bug 1413868. r=valentin 2018-06-07 13:56:16 -04:00
Adam Gashlin b8a8b3a714 Bug 1463560: Part 2: Re-add the -os-restarted arg when launching from profile manager. r=jimm
MozReview-Commit-ID: 85dQpYT5I9M

--HG--
extra : rebase_source : ba9519fde4a6b6762a328a211a23646c435e76f8
2018-05-27 12:22:42 -07:00
Adam Gashlin 325281069c Bug 1463560: Part 1: Re-add the -os-restarted arg when launching after an update. r=mhowell
MozReview-Commit-ID: 509GetTCBCF

--HG--
extra : rebase_source : 7efb75b292d59b35913b4b118594e193f2ceb76f
2018-05-27 12:22:05 -07:00
Martin Stransky 6591c05f40 Bug 1466473 - [Wayland] Run glxtest.cpp on X11 enabled builds, r=lsalzman
Run glxtest.cpp (async GL detection tool) on X11 enabled builds, detect GL setup
on GLX backend (X11 only builds) and also on Wayland enabled builds.

MozReview-Commit-ID: GbKjofV8NS2

--HG--
extra : rebase_source : b3cd7accac3cd4f5341ab87e339f2198a76428f1
2018-06-04 11:19:09 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Marco Castelluccio 946adaddaa Bug 1465739 - Don't crash when there are late writes in all coverage builds. r=froydnj
--HG--
extra : rebase_source : 214929e40b4275b7deed6dc1f51280e3b316fba2
2018-05-30 16:47:36 +02:00
Panos Astithas f041fb6e3c Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : f0da66755c92d2937f5fad1f5784f9a81829c951
2018-05-15 16:44:44 -07:00
Gurzau Raul bcd412f2a9 Backed out changeset 602bdd9d5a96 (bug 1461851) for linting failures on /checkouts/gecko/build/appini_header.py on a CLOSED TREE 2018-05-30 19:03:50 +03:00
Panos Astithas 9be1c58dd1 Bug 1461851 - Properly add the source URL in the profiler metadata. r=glandium
MozReview-Commit-ID: 53M4bGolmJk

--HG--
extra : rebase_source : 17c2f3922d04b1ee7e168837f4440bb1b0abc218
2018-05-15 16:44:44 -07:00
Martin Stransky 969b3897fc Bug 1465371 - [Wayland] Use DBus XRemote for wayland builds exclusively, r=jhorak
MozReview-Commit-ID: 4NqDtJVVc6X

--HG--
extra : rebase_source : b07159d3c590a4051d64a971e86d8fafd7608f6a
2018-05-30 12:26:51 +02:00
Adam Gashlin cdb01305b3 Bug 603903 - Part 1: add RegisterApplicationRestart r=jimm
MozReview-Commit-ID: Eb389ih7CIn

--HG--
extra : rebase_source : b8657950fb08b899528d3ac3720a31769b3e14ba
2018-05-15 15:37:45 -07:00
Adam Gashlin 22530d5691 Bug 1451366: Part 1 - Wait after launch from update and restart, r=mhowell, jimm 2018-05-14 14:43:36 -07:00
Marco Bonardo c67bc6cc9a Bug 1430023 - Get rid of some remaining localstore.rdf code. r=mossop
MozReview-Commit-ID: LqqSsb2h1Yv

--HG--
extra : rebase_source : 1a89abfbe75e17ed4be3a9fa52eef2d1db9f99bd
2018-05-09 10:49:35 +02:00
Jed Davis bfc90a5627 Bug 1401776 - Raise fd limit to 4096 on Unix. r=glandium,mcmanus
This is to accommodate non-networking fd usage (IPC transports, various
databases, .xpi files, etc.), so it's separate from Necko's existing
manipulation of the fd limit, which is tied into Necko's internal limits
on how many sockets it will try to poll at once.

Note that resource limits are inherited by child processes, so this needs
to be done only in the parent.

This patch also removes similar code used on Solaris and Mac OS X.  The
Mac case (bug 1036682) refers to fd use by graphics textures, which
shouldn't be consuming fds anymore (even transiently) as of bug 1161166.

MozReview-Commit-ID: 2uodrkW5sUn

--HG--
extra : rebase_source : 5306f4995000459b89bed048ecafba3c262bbbdf
2018-05-10 17:36:32 -06:00
Chris Pearce 5c6dee86ba Bug 1460055 - Make strimatch static to fix error with GCC about exception handling mangling. r=aklotz
MozReview-Commit-ID: CLBt2Siasdm

--HG--
extra : rebase_source : 3aa19882a6d6b6e227b6cec0cfb91ca5adb9db68
2018-05-09 09:35:03 +12:00
Aaron Klotz 415cd5e05e Bug 1454745: Skeletal bootstrap process; r=mhowell 2018-04-17 13:48:21 -06:00
Aaron Klotz 54b1b3b99d Bug 1457999: Part 1 - Move command line argument utils and safe mode checks into a common header file; r=jimm 2018-04-19 17:22:41 -06:00
Aaron Klotz 580a1a60b9 Bug 1457999: Backed out changeset 3b3a2ae3a6d3 due to Linux bustage; r=backout CLOSED TREE
--HG--
extra : histedit_source : 4cf63e65bd53e89ca9165d19642a9328c3eeeaa6
2018-05-07 11:22:14 -06:00
Aaron Klotz 9fc5eb0316 Bug 1457999: Part 1 - Move command line argument utils and safe mode checks into a common header file; r=jimm 2018-04-19 17:22:41 -06:00
Aaron Klotz 2cd522a2f4 Bug 1457999: Backed out changeset d838002f9a52 due to Linux preprocessor errors; r=backout CLOSED TREE
--HG--
extra : histedit_source : 0a31b8596f8525662a19f6221c605b19486baefc
2018-05-07 11:01:00 -06:00
Aaron Klotz d6661abc54 Bug 1457999: Part 1 - Move command line argument utils and safe mode checks into a common header file; r=jimm
--HG--
extra : rebase_source : 368d45d026ddc658ba732b6f58fcd976c48ff7d4
2018-04-19 17:22:41 -06:00
Mike Hommey ed54beeab0 Bug 1458161 - Hook rust OOM handler. r=froydnj
OOM rust crashes are currently not identified as such in crash reports
because rust libstd handles the OOMs and panics itself.

There are unstable ways to hook into this, which unfortunately are under
active changes in rust 1.27, but we're currently on 1.24 and 1.27 is not
released yet. The APIs didn't change between 1.24 and 1.26, so it's
fine-ish to use them as long as we limit their use to those versions.

As long as the Firefox versions we ship (as opposed to downstream) use
the "right" version of rust, we're good to go.

The APIs are in their phase of stabilization, so there shouldn't be too
many variants of the code to support.

--HG--
extra : rebase_source : 08a85aa102b24380b1f6764effffcc909ef3191b
2018-05-01 10:30:03 +09:00
Kris Maglione a259026c9d Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

acecb401b7/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY

--HG--
extra : rebase_source : a29c07530586dc18ba040f19215475ac20fcfb3b
2018-04-22 20:55:06 -07:00
Kris Maglione 86b3ec9863 Bug 1372694: Part 2 - Remove support for registering non-bootstrapped extension chrome. r=aswan
MozReview-Commit-ID: FpTfAHWpTnt

--HG--
extra : rebase_source : 0a22166f56a6316957b372f1f45b20822df0d784
extra : amend_source : 0a0d30a995fc032672cf5283627c55b3c26955ac
2018-04-20 17:00:29 -07:00
Aaron Klotz 1244a64ac7 Bug 1455110: Replace RegOpenKeyEx/RegQueryValueEx with RegGetValue; r=jimm 2018-04-18 14:52:02 -06:00
Aaron Klotz 5317435ec0 Bug 1432653: Refactor the DLL interceptor and parameterize its memory operations; r=handyman
MozReview-Commit-ID: EYxVsQ1kicy

--HG--
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherBase.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherDetour.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/interceptor/PatcherNopSpace.h
rename : xpcom/build/nsWindowsDllInterceptor.h => mozglue/misc/nsWindowsDllInterceptor.h
rename : toolkit/xre/test/win/TestDllInterceptor.cpp => mozglue/tests/interceptor/TestDllInterceptor.cpp
extra : amend_source : 84a7590b40a649f7321eb05feca4f9256ecc5d22
2018-04-09 13:37:52 -06:00
Honza Bambas 198d72916a Bug 1451686 - Allow also -MOZ_LOG/_FILE=value form of the logging arguments. r=erahm 2018-04-13 05:38:00 -04:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Bob Owen aaef814fdc Bug 1452090: Only enable handle verifier on 32-bit Nightly and debug builds. r=jimm
This also adds the ability to enable it using the environement variable
MOZ_ENABLE_HANDLE_VERIFIER.
2018-04-09 19:22:28 +01:00
Jed Davis 62855368de Bug 1323302 - Refuse to run under sudo or otherwise as root in a non-root user's session. r=glandium
MozReview-Commit-ID: EFq9hULWqA8

--HG--
extra : rebase_source : d5b18d4486074996689f72a59095fb2253903fa3
2018-03-30 18:17:24 -06:00
Honza Bambas 31c173ca8a Bug 1443892 - Add -MOZ_LOG and -MOZ_LOG_FILE command line arguments. r=erahm, r=nfroyd 2018-04-03 11:32:00 -04:00
David Major 9fe90429fc Bug 1447728 Part 2: browser_checkcfgstatus.js should only run on MSVC builds. r=tjr 2018-03-22 11:40:00 -04:00
Sylvestre Ledru fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Yuki Hiroshi 6f6e95b2d4 Bug 1440573 - Policy: Disable safe mode. r=jimm,felipe
This policy disables the safe-mode UI entry points. In addition, only on Windows when using GPO, it also disables entering Safe Mode by holding down the Shift Key
2018-03-15 23:06:22 -03:00
Brindusan Cristian ed15f7d5a4 Backed out changeset 83dffebb1536 (bug 1440573) for bc failures on browser_policy_disable_safemode.js CLOSED TREE 2018-03-16 05:15:39 +02:00
Yuki Hiroshi 22e8dbd8fb Bug 1440573 - Policy: Disable safe mode. r=jimm,felipe
This policy disables the safe-mode UI entry points. In addition, only on Windows when using GPO, it also disables entering Safe Mode by holding down the Shift Key
2018-03-15 23:06:22 -03:00
Andreea Pavel 8fa0b32c84 Merge mozilla-inbound to mozilla-cenral. a=merge 2018-03-13 19:01:32 +02:00
Narcis Beleuzu 298d1d55b5 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-13 12:36:54 +02:00
Andi-Bogdan Postelnicu e5c7d41e14 Bug 1226574 - prevnet null pointer dereference in nsXULAppInfo::GetServerURL. r=ted
MozReview-Commit-ID: CJvGISGnnqQ

--HG--
extra : rebase_source : 1d60157b6322f421ed1814178379c9fadad45e9f
2018-03-13 12:55:44 +02:00
Chris Manchester 7f9cffd5ea Bug 1298328 - Fix dependency between buildid.h and libxul, do not re-generate buildid.h for every developer build. r=ted
For automation builds, force buildid.h to be regenerated, and always
#include buildid.h in nsAppRunner.cpp. This will eliminate the mismatch at the
cost of re-linking libxul on every build.

For developer builds, always #include buildid.h in nsAppRunner.cpp, but do not
force buildid.h to be re-generated for incremental builds. This means we will
never have a mismatch between platform and application buildids, although
subsequent builds are no longer guaranteed to have a new buildid.

MozReview-Commit-ID: 19hvu8AQXgN

--HG--
extra : rebase_source : 9f4fd063f89b9b2165d5889fdaa8f83104c4411c
2018-03-09 13:49:55 -08:00
Nicholas Nethercote 68124009fc Bug 1438678 - Pass early prefs via shared memory instead of the command line. r=bobowen,jld,glandium.
This patch replaces the large -intPrefs/-boolPrefs/-stringPrefs flags with
a short-lived, anonymous, shared memory segment that is used to pass the early
prefs.

Removing the bloat from the command line is nice, but more important is the
fact that this will let us pass more prefs at content process start-up, which
will allow us to remove the early/late prefs split (bug 1436911).

Although this mechanism is only used for prefs, it's conceivable that it could
be used for other data that must be received very early by children, and for
which the command line isn't ideal.

Notable details:

- Much of the patch deals with the various platform-specific ways of passing
  handles/fds to children.

  - Linux and Mac: we use a fixed fd (8) in combination with the new
    GeckoChildProcessHost::AddFdToRemap() function (which ensures the child
    won't close the fd).

  - Android: like Linux and Mac, but the handles get passed via "parcels" and
    we use the new SetPrefsFd() function instead of the fixed fd.

  - Windows: there is no need to duplicate the handle because Windows handles
    are system-wide. But we do use the new
    GeckoChildProcessHost::AddHandleToShare() function to add it to the list of
    inheritable handles. We also ensure that list is processed on all paths
    (MOZ_SANDBOX with sandbox, MOZ_SANDBOX without sandbox, non-MOZ_SANDBOX) so
    that the handles are marked as inheritable. The handle is passed via the
    -prefsHandle flag.

  The -prefsLen flag is used on all platforms to indicate the size of the
  shared memory segment.

- The patch also moves the serialization/deserialization of the prefs in/out of
  the shared memory into libpref, which is a better spot for it. (This means
  Preferences::MustSendToContentProcesses() can be removed.)

MozReview-Commit-ID: 8fREEBiYFvc

--HG--
extra : rebase_source : 7e4c8ebdbcd7d74d6bd2ab3c9e75a6a17dbd8dfe
2018-02-16 17:54:16 +11:00
Kris Maglione bc31413f8e Bug 1422087: Follow-up: Add null check for when running from GTests. r=bustage CLOSED TREE
MozReview-Commit-ID: 4xLrAvk1f0C

--HG--
extra : rebase_source : 559d3897ab8fbf732ef0fa4f20f733aebc7c2539
2018-03-09 12:56:09 -08:00
Aaron Klotz 0b5fcae4d4 Bug 1424505: Backed out changeset 35129c889938 since it was speculative and didn't work. r=backout
--HG--
extra : rebase_source : 39f7e2c34ca70552db70823f73f6f126885c14a5
2018-03-09 13:35:37 -07:00
Kris Maglione 2faddce683 Bug 1422087: Purge startup caches after an incomplete startup. r=Mossop
Since we know that corrupt startup caches can and do cause startup crashes, we
should ideally purge them any time we detect that the last startup resulted in
a crash. The alternative is waiting until the users restart enough times to
trigger safe mode, and hope that they start in safe mode and then immediately
restart in normal mode. This is not a great user experience.

Unfortunately, the normal startup crash detection mechanism relies on
the preference service, which starts up far too late for us to make this
decision effectively.

To work around that, this patch adds a new startup crash detection mechanism
that creates an incomplete startup canary file which we remove at the end of
the startup crash detection window, or on any sort of graceful exit.

MozReview-Commit-ID: ALaLsyF4meg

--HG--
extra : rebase_source : c97f8a2cac2c30f8cc22b05a62058aef2ad07870
2018-03-05 15:19:07 -08:00
Kris Maglione e4b6dffc2a Bug 1443983: Part 2 - Remove remaining interpositions. r=mconley
MozReview-Commit-ID: AHwNsBB7OAQ

--HG--
extra : rebase_source : d25b9ce77529130b98b6199d9c9e06c3890a2f87
2018-03-07 18:10:24 -08:00
Aaron Klotz be55264842 Bug 1424505: Ensure at least one consistent reference to the COM MTA at all times on Windows 7; r=jimm
--HG--
extra : amend_source : ef3973fa9b6ab347a45036dd955dc95aa9b254e0
extra : histedit_source : 0a4cb94e56250c8485d8e3aeb6f0d06eafb4bd6e
2018-03-06 17:06:54 -07:00
Bogdan Tara 2680808115 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-07 12:07:19 +02:00
Jim Chen 5c88095f46 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 596f590443f727d1a79582202eed122f79ae85cf
2018-03-06 13:52:50 -05:00
Makoto Kato 897ea8c314 Bug 1438955 - Remove ImmReleaseContext hook. r=masayuki
--HG--
extra : rebase_source : 78eeb24aa1b89c634cb9da089b43c01bdd390906
2018-03-07 11:01:30 +09:00
Cosmin Sabou ed1b2a8736 Backed out 4 changesets (bug 1437167) for build bustages on nsUpdateDriver.cpp and WindowsMessageLoop.cpp on a CLOSED TREE.
Backed out changeset b98740e7c639 (bug 1437167)
Backed out changeset 4476e8f51fa6 (bug 1437167)
Backed out changeset c79dc40faa41 (bug 1437167)
Backed out changeset b608d2dcbb86 (bug 1437167)
2018-03-06 00:09:46 +02:00
Nika Layzell 801a4a8d1a Bug 1437167 - Part 3: Fix some platform-specific consumers of the Monitor::Wait APIs on a CLOSED TREE, a=bustage
MozReview-Commit-ID: FymGvwEtZRk
2018-03-05 16:31:18 -05:00
Gurzau Raul 185d1fcf42 Backed out 7 changesets (bug 1442255) for failing c1 tests on mochitest/test_browserElement_inproc_PurgeHistory.html
Backed out changeset 208c4c42f641 (bug 1442255)
Backed out changeset 6a794e14fceb (bug 1442255)
Backed out changeset 62d1c57c37b4 (bug 1442255)
Backed out changeset 5d0f72867f53 (bug 1442255)
Backed out changeset c3305648ad30 (bug 1442255)
Backed out changeset 08f906f3a0c8 (bug 1442255)
Backed out changeset d7a43e59a1b4 (bug 1442255)
2018-03-06 17:08:57 +02:00
Jim Chen 9b7b3f4565 Bug 1442255 - 7. Switch the order of fd arguments; r=jchen
Switch the order of the IPC FD argument and the crash FD argument in
e10s calls, because the IPC FD is the primary FD, and the crash FD
should be grouped with the crash annotation FD.

MozReview-Commit-ID: CAVyYAIIBPm

--HG--
extra : rebase_source : 02bf7337fa9a6d1194809c224acb4a2690fd87a3
2018-03-06 00:04:56 -05:00
Sebastian Hengst 7cb1beb438 Backed out changeset 855eb2e4c43d (bug 1434666) for bricking installation on Ubuntu 14.04 (bug 1441449). a=backout CLOSED TREE 2018-02-27 23:47:00 +02:00
Chris Peterson 6955347be6 Bug 1330529 - Part 4: Fold nsSetDllDirectory.h into nsWindowsMain.cpp. r=jimm
nsSetDllDirectory.h consists of just one function definition, SanitizeEnvironmentVariables, which is now only called from nsWindowsMain.cpp. nsSetDllDirectory.h used to define its namesake NS_SetDllDirectory, but the function was removed in bug 699247.

Also remove some #includes that are no longer necessary.

MozReview-Commit-ID: E8OsXycdfO8

--HG--
extra : rebase_source : d9e63a50a782ab1fb0fde24646a777b882860fb9
extra : histedit_source : 63c41846db2bb6a1def03c343e6f336373f1fba6
2018-02-13 00:52:44 -08:00
Chris Peterson 4c4286f348 Bug 1330529 - Part 3: Protect DLL loads in wmain instead of waiting until PluginProcessChild::Init. r=jimm
Removing #define XRE_DONT_PROTECT_DLL_LOAD from plugin-container.cpp and xpcshell.cpp allows the #included nsWindowsWMain.cpp to protect DLL loads much earlier in the plugin process startup.

MozReview-Commit-ID: HbgyfvljvFs

--HG--
extra : rebase_source : dccdabb2e5bee4472d5aef9400a58cb0e397c112
extra : histedit_source : da248fc6fbdf96f30979f3a0396aefcf4bfcd5d9
2018-02-02 22:53:34 -08:00
Masatoshi Kimura a7c8bc12b4 Bug 1428258 - Stop using GetNativePath in nsAppRunner.cpp. r=mossop
GetPersistentDescriptor is suitable for serialization purpose.

MozReview-Commit-ID: 5IZI843ovAv

--HG--
extra : rebase_source : 54b23ca5a821f744255835fc32bea46329393c93
extra : intermediate-source : 9351bf26b7dcdf773c801f2f512bbda312aced11
extra : source : c5fca307c00bc31d43f1ac9a1026cf37dff82162
2017-12-16 23:02:26 +09:00
Dave Townsend 4348b13e94 Bug 1438614: Remove unused createDefaultProfileForApp. r=florian
MozReview-Commit-ID: EPc9MT3jpki

--HG--
extra : rebase_source : 05df89203cb926eefe700d3c9aa5d0ba197b0bef
extra : source : c8d03605ff8b1165efc1db9507c6ee67fcd8bbdb
2017-11-08 08:36:51 -08:00
Dave Townsend 8be84744e2 Bug 1438615: profileCount should actually return the number of profiles. r=florian
MozReview-Commit-ID: 5GyndTCKCCZ

--HG--
extra : rebase_source : 59439e10a24879aab92b1ff961dd6b014dcdf8de
extra : source : 4dc53f86abc44d8eb0cc3dd7e17997123e9c185d
2017-11-08 08:56:37 -08:00
Arthur Edelstein 04e873a402 Bug 1434666 - Avoid path aliasing in AppendToLibPath r=rstrong
Previously, it was possible for AppendToLibPath to
fail to add the directory /A/B/C/ to LD_LIBRARY_PATH
if the directory /A/B/C/D/ was already present.

--HG--
extra : rebase_source : 516fb65a57afd97252ad35e52f906b54afdd1616
2018-02-12 21:46:00 +02:00
Alex Gaynor de20b74dc4 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto,rbarker
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 17ebcef3e9d24f3d4e7515e3fae95e65cef76a79
2017-11-27 14:37:34 -06:00
Aaron Klotz 7cd9b653d2 Bug 1436684: Disable cert annotation due to perf regressions; r=backout 2018-02-08 08:57:13 -07:00
Aaron Klotz 1beac92cc2 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : 2e3726d37356479aee81915caed04fe7af74c815
2018-01-30 15:08:03 -07:00
Aaron Klotz 0213e8a4b6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : f280fec92c867d0adbe7b82c0e829eeb10fce5a9
2018-01-30 14:23:10 -07:00
Andreea Pavel 93f2f80c9d Backed out 2 changesets (bug 1407693) for windows mingw32 bustages at /builds/worker/workspace/build/src/ipc/glue/GeckoChildProcessHost.cpp:1032 on a CLOSED TREE
Backed out changeset 9c3346021c21 (bug 1407693)
Backed out changeset f18e1e557cf6 (bug 1407693)
2018-02-07 21:42:47 +02:00
Alex Gaynor c190a71600 Bug 1407693 - Part 2 - when a child process crashes, write extra annotation data to a pre-opened file descriptor instead of creating a new file; r=gsvelto
This removes the need for the content process to have permissions to create new
files on macOS, allowing more aggressive sandboxing.

MozReview-Commit-ID: 8agL5jwxDSL

--HG--
extra : rebase_source : 215577cd5ced3994a4c3345377b3feedea07e886
2017-11-27 14:37:34 -06:00
Dorel Luca 112cc1ff6b Backed out 3 changesets (bug 1430857) for breaking tests on Windows Code Coverage builds a=backout
Backed out changeset a992887a6060 (bug 1430857)
Backed out changeset cc9b0ac5f66b (bug 1430857)
Backed out changeset 4bdd6d82f993 (bug 1430857)
2018-02-07 15:02:58 +02:00
Aaron Klotz e398eaca79 Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : f86c1a6fd2a44f21a71e7a7418267b3b0d5feeec
2018-01-30 15:08:03 -07:00
Aaron Klotz 200eb77750 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : 3a5b4a6f0412311f0b9080a2b3b3a31e45d15b75
2018-01-30 14:23:10 -07:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Gurzau Raul c104d865cc Backed out 2 changesets (bug 1430857) for build bustage on a CLOSED TREE
Backed out changeset b12ea04f9c5a (bug 1430857)
Backed out changeset 6b88557d1e50 (bug 1430857)
2018-02-06 23:27:33 +02:00
Aaron Klotz 5f9a96be9c Bug 1430857: Part 2 - Add cert annotations to Windows crash reports; r=mhowell
MozReview-Commit-ID: 270iURVhNRu

This patch builds upon the existing DLL services functionality:

1) We add code to obtain the name of the subject from the cert used to sign a
   binary (if present). This code is added inside mozglue because in the future
   we will be using this code from the DLL blocklist, which is also located
   there.
2) We add annotation functionality that registers itself for DLL load events
   and updates crash reporter annotations as new libraries are loaded. It also
   annotates any existing libraries that are also in memory at the time that the
   CertAnnotator is first instantiated. This all happens off main thread, with
   the exception of actually making the annotation when in a child process.

--HG--
extra : rebase_source : e032ee8c4cf71e5225b51797443764549f4bbe56
2018-01-30 15:08:03 -07:00
Aaron Klotz eb3453b4d6 Bug 1430857: Part 1 - Refactor DllServices to make it possible to obtain them from anywhere in Gecko; r=jimm
MozReview-Commit-ID: GfWata0eCc5

--HG--
extra : rebase_source : d8d2ec74e7f452cb1e8b5430f4445f3b0fc9181a
2018-01-30 14:23:10 -07:00
Tom Ritter 95a129a4b3 Bug 1435009 Do not run the CFG test on ccov builds r=mconley
MozReview-Commit-ID: 6NLG3JYMmPH

--HG--
extra : rebase_source : 6091d24d1c86aff9ccaaffcb004f06d9a0f758eb
2018-02-05 10:31:15 -06:00
Gian-Carlo Pascutto 6520179659 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=jld
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 8435b8e39d9723c52b0176a7686895185136aa6e
extra : histedit_source : 50c41172788fddead6357f1d566d0e48de8c90d6
2018-01-09 16:29:40 +01:00
Tom Ritter 6d070e11bd Bug 1235982 Add CFG to firefox.exe and mozglue, and a mochitest to ensure a crash r=glandium,mconley
MozReview-Commit-ID: EYKgDyGtw8m

--HG--
extra : rebase_source : 76166d4fca452674d0a442778290e40106ce339c
2018-01-25 12:15:40 -06:00
arthur.iakab c4dd80eca3 Merge mozilla-central to autoland 2018-01-31 00:41:58 +02:00
Tom Ritter 41a1a6c9b0 Bug 1433971 Clean up Assertions.h with respect to Unused Attributes r=froydnj
In Bug 1393538 I renamed MOZ_STATIC_ASSERT_UNUSED_ATTRIBUTE to MOZ_UNUSED_ATTRIBUTE,
moved it out of it's #define depth, and used it in toolkit. I also orphaned a
comment.

This was wrong. MOZ_UNUSED_ATTRIBUTE was basically identical to MOZ_MAYBE_UNUSED
which exists in Attributes.h (because it is an attribute, not an assertion.)

Undo that wrong thing: restore MOZ_STATIC_ASSERT_UNUSED_ATTRIBUTE to the correct
place, have toolkit use the correct macro, and remove MOZ_UNUSED_ATTRIBUTE.

MozReview-Commit-ID: 5BWWsXgbm9i

--HG--
extra : rebase_source : d07156068c877bf57d400bc6a71e115b7f1aef31
2018-01-29 11:36:19 -06:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Mike Hommey 478ce5d0b3 Bug 1432395 - Rename valgrind suppressions files to something more generic. r=froydnj
The MACHTYPE bash variable is an odd thing that returns e.g.
x86_64-redhat-linux-gnu on a CentOS system, but x86_64-pc-linux-gnu
on a Debian system, and possibly something different on other distros.

mach valgrind-test is the only place actually relying on MACHTYPE.
Others rely on information from python modules. Uniformize that, and use
the more generic 'pc' rather than 'redhat'.

--HG--
rename : build/valgrind/i386-redhat-linux-gnu.sup => build/valgrind/i386-pc-linux-gnu.sup
rename : build/valgrind/x86_64-redhat-linux-gnu.sup => build/valgrind/x86_64-pc-linux-gnu.sup
extra : rebase_source : ad94ce69e8094d2b9ddae97a3d261945886c0a61
2018-01-27 10:22:56 +09:00
David Parks fe1e4877bc Bug 1382251: Part 10 - Add nsWindowsDllInterceptor tests for the new functions; r=aklotz
Adds tests for the DLL interception of the SSL APIs included in the previous patch.
2017-11-06 10:45:13 -08:00
David Parks 93bbbac8e4 Bug 1382251: Part 6 - Start/stop new top-level brokering actors on their own threads; r=jld
The FunctionBroker actors allow the NPAPI process (child) to run methods on the main process (parent).  Both the parent and the child run dedicated threads for this task -- this is a top-level protocol.
2017-11-06 10:29:15 -08:00
Tom Ritter 5a600ec834 Bug 1431797 Fix capitalization in mozilla files so the sandbox can compile on MinGW r=bobowen
This patch also adds the capitalization patch file to the chromium patches

MozReview-Commit-ID: BzAkEtCKAi4

--HG--
extra : rebase_source : 8f24d2b855e721f354f12b0d3fca5783cc66702e
2018-01-24 14:27:21 -06:00
Dorel Luca 30b5be6d16 Merge mozilla-inbound to mozilla-central r=merge a=merge 2018-01-23 19:46:03 +02:00
Christian Holler 8e72e4cc2f Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:

* Various JS_STANDALONE checks to exclude parts that cannot be included in
  those builds.

* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
  FuzzerRunner classes and use them for AFL as well. Previously, AFL was
  piggy-backing on gtests which was kind of an ugly solution anyway (besides
  that it can't work in JS). Now more code like registry and harness is
  shared between the two and they follow almost the same call paths and entry
  points. AFL macros in FuzzingInterface have been rewritten accordingly.
  This also required name changes in various places. Furthermore, this unifies
  the way, the fuzzing target is selected, using the FUZZER environment
  variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
  you a deprecation warning because I know some people are using this already
  and need time to switch). Previously, AFL target had to be selected using
  GTEST_FILTER, so this is also much better now.

* I had to split up FuzzingInterface* such that the STREAM parts are in a
  separate set of files FuzzingInterfaceStream* because they use nsStringStream
  which is not allowed to be included into the JS engine even in a full browser
  build (error: "Using XPCOM strings is limited to code linked into libxul.").
  I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
  and make it static because otherwise, would have to make not only separate
  files but also separate libraries to statically link to the JS engine, which
  seemed overkill for a single small function. The streaming equivalent of the
  function is still in a cpp file.

* LibFuzzerRegister functions are now unique by appending the module name to
  avoid redefinition errors.

MozReview-Commit-ID: 44zWCdglnHr

--HG--
extra : rebase_source : fe07c557032fd33257eb701190becfaf85ab79d0
2018-01-17 15:20:35 +01:00
Coroiu Cristina faa2f8c7da Backed out 2 changesets (bug 1431090) for Bf bustage at src/tools/fuzzing/interface/harness/FuzzerTestHarness.h
Backed out changeset 2e98bda3f397 (bug 1431090)
Backed out changeset eb6acc9e44ad (bug 1431090)

--HG--
rename : tools/fuzzing/registry/FuzzerRegistry.cpp => tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.cpp
rename : tools/fuzzing/registry/FuzzerRegistry.h => tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.h
rename : tools/fuzzing/interface/harness/FuzzerRunner.cpp => tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.cpp
rename : tools/fuzzing/interface/harness/FuzzerRunner.h => tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.h
rename : tools/fuzzing/interface/harness/FuzzerTestHarness.h => tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h
rename : tools/fuzzing/interface/harness/moz.build => tools/fuzzing/libfuzzer/harness/moz.build
2018-01-23 13:49:26 +02:00
Christian Holler 4ce6f81fee Bug 1431090 - Prepare tools/fuzzing/ to be used with JS_STANDALONE. r=froydnj
This patch adjusts tools/fuzzing/ in such a way that the relevant parts can be
reused in the JS engine. Changes in detail include:

* Various JS_STANDALONE checks to exclude parts that cannot be included in
  those builds.

* Turn LibFuzzerRegistry and LibFuzzerRunner into generic FuzzerRegistry and
  FuzzerRunner classes and use them for AFL as well. Previously, AFL was
  piggy-backing on gtests which was kind of an ugly solution anyway (besides
  that it can't work in JS). Now more code like registry and harness is
  shared between the two and they follow almost the same call paths and entry
  points. AFL macros in FuzzingInterface have been rewritten accordingly.
  This also required name changes in various places. Furthermore, this unifies
  the way, the fuzzing target is selected, using the FUZZER environment
  variable rather than LIBFUZZER (using LIBFUZZER in browser builds will give
  you a deprecation warning because I know some people are using this already
  and need time to switch). Previously, AFL target had to be selected using
  GTEST_FILTER, so this is also much better now.

* I had to split up FuzzingInterface* such that the STREAM parts are in a
  separate set of files FuzzingInterfaceStream* because they use nsStringStream
  which is not allowed to be included into the JS engine even in a full browser
  build (error: "Using XPCOM strings is limited to code linked into libxul.").
  I also had to pull FuzzingInterface.cpp (the RAW part only) into the header
  and make it static because otherwise, would have to make not only separate
  files but also separate libraries to statically link to the JS engine, which
  seemed overkill for a single small function. The streaming equivalent of the
  function is still in a cpp file.

* LibFuzzerRegister functions are now unique by appending the module name to
  avoid redefinition errors.

MozReview-Commit-ID: 44zWCdglnHr

--HG--
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.cpp => tools/fuzzing/interface/harness/FuzzerRunner.cpp
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRunner.h => tools/fuzzing/interface/harness/FuzzerRunner.h
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerTestHarness.h => tools/fuzzing/interface/harness/FuzzerTestHarness.h
rename : tools/fuzzing/libfuzzer/harness/moz.build => tools/fuzzing/interface/harness/moz.build
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.cpp => tools/fuzzing/registry/FuzzerRegistry.cpp
rename : tools/fuzzing/libfuzzer/harness/LibFuzzerRegistry.h => tools/fuzzing/registry/FuzzerRegistry.h
extra : rebase_source : 7d0511ca0591dbf4d099376011402e063a79ee3b
2018-01-17 15:20:35 +01:00
Martin Stransky c9f2884bb5 Bug 1432158 - Update comment for gdk_disable_multidevice() call on Wayland backend, r=jhorak
MozReview-Commit-ID: QaCVmUbxNg

--HG--
extra : rebase_source : e636b831bfb9580003b7a8f8c3afd92a1274aa65
2018-01-22 15:52:17 +01:00
Jonathan Watt eec7e0d104 Bug 1432285 - Implement an nsPrintingPromptService::GetSingleton method and make XPCOM use that. r=bobowen
MozReview-Commit-ID: AsiAnJrxKlB
2018-01-16 11:47:19 +00:00
Gurzau Raul 9801931bda Merge inbound to mozilla-central. a=merge 2018-01-23 02:21:47 +02:00
Felipe Gomes fcb1b42e8d Bug 1419102 - Implement the Enterprise Policies feature to provide enterprise users with easier control and setup of deployments of Firefox. r=Mossop
This feature is currently disabled behind a pref, but this pref will be removed when we're green to release it.

MozReview-Commit-ID: 3ZH2UJVdtC0

--HG--
rename : browser/components/newtab/tests/browser/.eslintrc.js => browser/components/enterprisepolicies/tests/browser/.eslintrc.js
2018-01-22 17:01:48 -02:00
Jed Davis 5161a86c36 Bug 1401062 - Delete the old namespace/chroot code and reorganize sandbox init. r=gcp
This is mostly deletion, except for SandboxEarlyInit.  The unshare()
parts are going away, and the "unexpected threads" workaround can go away
along with them, but the signal broadcast setup still needs to happen
early so we can prevent blocking the signal.

So, SandboxEarlyInit's contract changes slightly from "call before
any other threads exist" to "before any threads that might block all
signals", and everything that can be deferred to immedately before
sandbox startup is.  As a result, some getenv()s change to PR_GetEnv
because there can be threads, and there is now an NSPR dependency.
(This may mean that mozglue can no longer interpose symbols in NSPR,
because libmozsandbox is preloaded, but I don't think we're doing that.)

MozReview-Commit-ID: 7e9u0qBNOqn

--HG--
extra : rebase_source : 1a8442f7e0e26231ecf01b19078433d1b5b2763c
2017-08-31 20:38:25 -06:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Sylvestre Ledru 424664ff30 Bug 1278282 - Remove the 'MOZ_WIDGET_GTK == 2' defines r=karlt,lsalzman
MozReview-Commit-ID: 3v8D600g8St

--HG--
extra : rebase_source : 34ea6f9868c1b322076c24daa75dc33e27b6704e
2018-01-10 08:52:04 +01:00
Sylvestre Ledru eabcdd21b2 Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman
MozReview-Commit-ID: Bo0m7n078oh

--HG--
extra : rebase_source : 1874ac3e0abca65b821b5d04a6610a5cbb63fe24
2018-01-09 11:51:07 +01:00
Csoregi Natalia d07dee65a2 Backed out 6 changesets (bug 1386404) for failing /webdriver/test/ tests on Linux. r=backout on a CLOSED TREE
Backed out changeset be1441859e8b (bug 1386404)
Backed out changeset 8dca7ef74c4a (bug 1386404)
Backed out changeset b7ca6ae185f2 (bug 1386404)
Backed out changeset 2c007d385ce4 (bug 1386404)
Backed out changeset fbe717b9a664 (bug 1386404)
Backed out changeset 14f1fbe5263a (bug 1386404)
2018-01-10 14:08:51 +02:00
Gian-Carlo Pascutto 1a580a77b4 Bug 1386404 - Enable content-process specific tmpdir on Linux. r=haik,jld
MozReview-Commit-ID: 6Hijq0to9MG

--HG--
extra : rebase_source : 7ff43ffe52f32ebbc7c866428e0d1d64dd05cbcb
2018-01-09 16:29:40 +01:00