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

313 Коммитов

Автор SHA1 Сообщение Дата
Ted Campbell 57f49debb6 Bug 1511672 - Fix dependent base lookups in AsyncInvoker.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D13633

--HG--
extra : moz-landing-system : lando
2018-12-06 16:34:17 +00: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
Gabriele Svelto 566f669d07 Bug 1509450 - Remove unnecessary inclusions of ContentParent.h and ContentChild.h r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D12728

--HG--
extra : moz-landing-system : lando
2018-11-26 14:49:44 +00:00
Aaron Klotz c084ff85e4 Bug 1508468: Convert launcher process to use mozilla::Result for error propagation; r=mhowell
This patch does a couple of things:

* I added a new class, |WindowsError| to WinHeaderOnlyUtils. The idea here is
  to encapsulate as much of the Windows error gamut as possible into one class.
  Since Win32 errors and NTSTATUS codes may both be encoded as HRESULTs, I
  used the latter type to store the error. It also contains functions for
  converting between the various error code formats, as well as stringification
  via FormatMessage.

* I added |LauncherError| which also includes file and line number information,
  which I believe will be important for launcher process failure diagnostics.
  (Instantiation of LauncherErrors obviously must be done via macros to capture
  __FILE__ and __LINE__).

* I then converted all of the launcher process code (and its few depenencies) to
  utilize this new functionality via the new |LauncherResult| type.

* If we detect an error in one of the top-level launcher process functions, we
  pass it to |HandleLauncherError| for processing. This function currently just
  throws up a |MessageBox| like the previous code did, with the intention of
  enhancing that further in the future.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 23:49:36 +00:00
Narcis Beleuzu b18d13eb15 Backed out changeset be8383028bc0 (bug 1508468) for windows build bustage
--HG--
extra : rebase_source : b86532be5abaafa05a3b96a99bff5eccecbb3b20
2018-11-21 01:30:52 +02:00
Aaron Klotz 6be5837934 Bug 1508468: Convert launcher process to use mozilla::Result for error propagation; r=mhowell
This patch does a couple of things:

* I added a new class, |WindowsError| to WinHeaderOnlyUtils. The idea here is
  to encapsulate as much of the Windows error gamut as possible into one class.
  Since Win32 errors and NTSTATUS codes may both be encoded as HRESULTs, I
  used the latter type to store the error. It also contains functions for
  converting between the various error code formats, as well as stringification
  via FormatMessage.

* I added |LauncherError| which also includes file and line number information,
  which I believe will be important for launcher process failure diagnostics.
  (Instantiation of LauncherErrors obviously must be done via macros to capture
  __FILE__ and __LINE__).

* I then converted all of the launcher process code (and its few depenencies) to
  utilize this new functionality via the new |LauncherResult| type.

* If we detect an error in one of the top-level launcher process functions, we
  pass it to |HandleLauncherError| for processing. This function currently just
  throws up a |MessageBox| like the previous code did, with the intention of
  enhancing that further in the future.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 22:12:53 +00:00
Brindusan Cristian 26aca84b41 Backed out changeset 0ff2e89a1819 (bug 1508468) for windows build bustages on ntstatus.h. CLOSED TREE 2018-11-20 23:08:11 +02:00
Aaron Klotz 5bc6718181 Bug 1508468: Convert launcher process to use mozilla::Result for error propagation; r=mhowell
This patch does a couple of things:

* I added a new class, |WindowsError| to WinHeaderOnlyUtils. The idea here is
  to encapsulate as much of the Windows error gamut as possible into one class.
  Since Win32 errors and NTSTATUS codes may both be encoded as HRESULTs, I
  used the latter type to store the error. It also contains functions for
  converting between the various error code formats, as well as stringification
  via FormatMessage.

* I added |LauncherError| which also includes file and line number information,
  which I believe will be important for launcher process failure diagnostics.
  (Instantiation of LauncherErrors obviously must be done via macros to capture
  __FILE__ and __LINE__).

* I then converted all of the launcher process code (and its few depenencies) to
  utilize this new functionality via the new |LauncherResult| type.

* If we detect an error in one of the top-level launcher process functions, we
  pass it to |HandleLauncherError| for processing. This function currently just
  throws up a |MessageBox| like the previous code did, with the intention of
  enhancing that further in the future.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 20:27:06 +00:00
Narcis Beleuzu 6d1ee7c9fd Backed out changeset 5660a1cd0e25 (bug 1508468) for Windows MinGW bustages. CLOSED TREE 2018-11-20 21:39:10 +02:00
Aaron Klotz 4ea282427e Bug 1508468: Convert launcher process to use mozilla::Result for error propagation; r=mhowell
This patch does a couple of things:

* I added a new class, |WindowsError| to WinHeaderOnlyUtils. The idea here is
  to encapsulate as much of the Windows error gamut as possible into one class.
  Since Win32 errors and NTSTATUS codes may both be encoded as HRESULTs, I
  used the latter type to store the error. It also contains functions for
  converting between the various error code formats, as well as stringification
  via FormatMessage.

* I added |LauncherError| which also includes file and line number information,
  which I believe will be important for launcher process failure diagnostics.
  (Instantiation of LauncherErrors obviously must be done via macros to capture
  __FILE__ and __LINE__).

* I then converted all of the launcher process code (and its few depenencies) to
  utilize this new functionality via the new |LauncherResult| type.

* If we detect an error in one of the top-level launcher process functions, we
  pass it to |HandleLauncherError| for processing. This function currently just
  throws up a |MessageBox| like the previous code did, with the intention of
  enhancing that further in the future.

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

--HG--
extra : moz-landing-system : lando
2018-11-20 18:06:23 +00:00
Noemi Erli 06a8cd8e3c Backed out changeset bee1c344cb47 (bug 1491909) for failures in browser/components/extensions/test/xpcshell/test_ext_geckoProfiler_control.js 2018-10-24 04:23:13 +03:00
Denis Palmeiro fc930ad16f Bug 1491909 - Add an AllocPolicy to mozilla::JSONWriter r=jwalden,mstange
JSONWriter currently calls new and delete indirectly through mozilla::MakeUnique to allocate a buffer.  Becuase of this, the methods of this class cannot be invoked within Spidermonkey due to https://searchfox.org/mozilla-central/source/config/check_vanilla_allocations.py#6-14.  Therefore, JSONWriter needs an AllocPolicy template parameter so that the allocation and deallocation routines can be changed to match the JS AllocPolicy when invoked within SpiderMonkey.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:31 +00: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
Jean-Yves Avenard aace4e2e6a Bug 1496758 - Fix few compilation warnings in ipc code. r=handyman,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D7918

--HG--
extra : moz-landing-system : lando
2018-10-10 04:31:35 +00:00
Aaron Klotz ab58dd7f8b Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:56:10 +00:00
Aaron Klotz 816df62731 Bug 1489317: Part 2 - Improvements to mscom::AgileReference; r=froydnj
This patch adds the definitions of the RefPtr constructor and operator=.
It also refactors some stuff in AgileReference to make these objects easier
to use. Since it's just a bunch of C++ goop, I figured that you'd be fine to
review this. Let me know if you want to add a reviewer who is more familiar
with the COM nuances.

Depends on D5317

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

--HG--
extra : moz-landing-system : lando
2018-09-12 18:55:39 +00:00
Cosmin Sabou ee876fb168 Backed out 4 changesets (bug 1489317) for causing multiple windows tests timeouts. CLOSED TREE
Backed out changeset e35a9b02675b (bug 1489317)
Backed out changeset 7528056ab631 (bug 1489317)
Backed out changeset d5d432fd2433 (bug 1489317)
Backed out changeset fddf77dc2f9d (bug 1489317)
2018-09-11 09:22:37 +03:00
Aaron Klotz a29e528ede Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

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

--HG--
extra : source : 07b44bee061cf080e70e6872f5f15e22e23819e0
2018-09-10 22:59:07 +00:00
Aaron Klotz 10240bba07 Bug 1489317: Part 2 - Improvements to mscom::AgileReference; r=froydnj
This patch adds the definitions of the RefPtr constructor and operator=.
It also refactors some stuff in AgileReference to make these objects easier
to use. Since it's just a bunch of C++ goop, I figured that you'd be fine to
review this. Let me know if you want to add a reviewer who is more familiar
with the COM nuances.

Depends on D5317

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

--HG--
extra : source : 62b404e59c325af23d9133a5e18cc7cc477cafdd
2018-09-10 22:58:36 +00:00
Ciure Andrei 7a6f7c263a Backed out 4 changesets (bug 1489317) for windows test failures CLOSED TREE
Backed out changeset 07b44bee061c (bug 1489317)
Backed out changeset b340f5acb7b5 (bug 1489317)
Backed out changeset 62b404e59c32 (bug 1489317)
Backed out changeset 2787fb454f40 (bug 1489317)
2018-09-11 04:22:44 +03:00
Aaron Klotz e30084f558 Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

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

--HG--
extra : moz-landing-system : lando
2018-09-10 22:59:07 +00:00
Aaron Klotz 061e78aa6f Bug 1489317: Part 2 - Improvements to mscom::AgileReference; r=froydnj
This patch adds the definitions of the RefPtr constructor and operator=.
It also refactors some stuff in AgileReference to make these objects easier
to use. Since it's just a bunch of C++ goop, I figured that you'd be fine to
review this. Let me know if you want to add a reviewer who is more familiar
with the COM nuances.

Depends on D5317

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

--HG--
extra : moz-landing-system : lando
2018-09-10 22:58:36 +00:00
Ciure Andrei 66949099e9 Backed out 4 changesets (bug 1489317) for causing Windows test failures CLOSED TREE
Backed out changeset 8cf95604ce94 (bug 1489317)
Backed out changeset 9d444f92b939 (bug 1489317)
Backed out changeset e0535e0450c8 (bug 1489317)
Backed out changeset 0f8554d82b32 (bug 1489317)
2018-09-11 00:50:10 +03:00
Aaron Klotz c603f63fc2 Bug 1489317: Part 4 - Add asssertion that COM is initialized on the thread that is resolving an agile reference; r=mhowell
Depends on D5321

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

--HG--
extra : moz-landing-system : lando
2018-09-10 20:03:24 +00:00
Aaron Klotz 6ba5f572f3 Bug 1489317: Part 2 - Improvements to mscom::AgileReference; r=froydnj
This patch adds the definitions of the RefPtr constructor and operator=.
It also refactors some stuff in AgileReference to make these objects easier
to use. Since it's just a bunch of C++ goop, I figured that you'd be fine to
review this. Let me know if you want to add a reviewer who is more familiar
with the COM nuances.

Depends on D5317

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

--HG--
extra : moz-landing-system : lando
2018-09-10 20:03:10 +00:00
Gerald Squelart 3627ef71ac Bug 1488701 - Remove misleading std::move's - r=froydnj
Doing std::move when returning/assigning a local or temporary object is
preventing the compiler from performing copy elision.

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

--HG--
extra : moz-landing-system : lando
2018-09-06 08:28:34 +00:00
Dorel Luca bfb495d592 Backed out changeset 2e439c0a6934 (bug 1488701) for build bustage. CLOSED TREE 2018-09-05 15:09:37 +03:00
Gerald Squelart 87eed890a4 Bug 1488701 - Remove misleading std::move's - r=froydnj
Doing std::move when returning/assigning a local or temporary object is
preventing the compiler from performing copy elision.

In the case of UniquePtr, it's easier to `return MakeUnique<T>(...)` instead of
the move verbose `UniquePtr<T> r(new T(...)); return r;`

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

--HG--
extra : moz-landing-system : lando
2018-09-05 11:41:07 +00:00
Nathan Froyd 5c033bee02 Bug 1486039 - use a more-portable idiom for pausing in SpinEvent::Wait; r=aklotz
YieldProcessor is apparently defined to do the same thing on x86 as our
custom macros, but includes implementations for non-x86 processors.
2018-08-28 09:27:57 -04:00
Aaron Klotz 9777f6b196 Bug 1484758: Add WinBuiltinAnyPackageSid to parent process COM ACL; r=mhowell
--HG--
extra : amend_source : f7792014b45f8963926d014c34c58a0d7b8d8d95
2018-08-20 11:03:45 -06: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
Noemi Erli 23c8a3a9f3 Backed out changeset 1e9ecba54e7b (bug 1348273) for failing on widget/tests/test_bug1123480.xul 2018-08-04 12:39:40 +03:00
Gabriele Svelto 50ba13cce4 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 functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code 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 (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : b4f0d4bf83c64851028c271d3fab3ebcb6fbcd3e
2018-07-05 15:42:11 +02:00
Coroiu Cristina 1ba19a32ac Backed out changeset 86471a18672f (bug 1348273) for ESlint failure at toolkit/modules/WebNavigationChild.jsm
--HG--
extra : rebase_source : e0c94f49ddc1f1b119b72c06fccc1b4363b9d340
2018-08-03 22:48:51 +03:00
Masatoshi Kimura 2661405f4c Bug 1479779 - Reduce clang-cl warnings from ipc/mscom/. r=aklotz
--HG--
extra : source : cc62c7bb49ef7261bfe261a7c88a52728d7889ea
extra : intermediate-source : 13d3cca02ea72befac4d306722eaae2d0ab1a90c
2018-07-31 22:04:58 +09:00
Gabriele Svelto eff24befbd 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 functions are updated to take a typed enum (in C++) and an
integer constant (in JavaScript). A JavaScript wrapper around the crash
reporter service is provided to hold the constants. The existing whitelists
and blacklists of annotations are also generated from the YAML file and the
existing duplicate code 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 (and some obsolete ones removed)
and all call sites have been updated including tests.

--HG--
extra : rebase_source : f0e8d229581ac5c0daa0e0454cb258746108e28d
2018-07-05 15:42:11 +02:00
Cosmin Sabou de8c2bd891 Backed out changeset 5950c9d63c3b (bug 1090497) for build bustages on several files. CLOSED TREE 2018-08-02 19:59:53 +03:00
Masatoshi Kimura feea19030c Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : a62521fdc66def4e4d5d7bf52e68365a786b5c55
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Brian Hackett 4be736018d Bug 1207696 Part 4b - Make recording optional in mozilla mutexes and monitors, r=froydnj.
--HG--
extra : rebase_source : c00f199b38c6bdd47ed1793edf2ce90fbf2ff420
2018-07-21 14:22:54 +00:00
James Teh f9e7e0747a Bug 1474007: Null check to prevent crash when ipc::mscom::GetInitialInterceptorForIID fails after PublishTarget. r=aklotz
PublishTarget calls Unlock on our LiveSetAutolock.
It's possible for GetInitialInterceptorForIID to fail after this point.
This will cause the failure cleanup code to run, which tries to call Unlock again.
However, the previous call to Unlock set mLiveSet to null, and Unlock previously didn't handle this case.
Now, unlock is a no-op (in release builds) if it's already been called.

MozReview-Commit-ID: 15ffXR6nKqc

--HG--
extra : rebase_source : bf072824f15f5574dd8afbedef82b795086d5fff
2018-07-09 10:24:20 +10:00
Nathan Froyd b07d6639b8 Bug 1472806 - fix missing typename warning in COMPtrHolder.h; r=aklotz
MSVC permits the missing `typename` as an extension, whereas clang-cl warns.
This is easy to fix, so let's fix the warning noise.
2018-07-03 17:04:26 -04:00
Nathan Froyd 0b0f08aedb Bug 1472806 - fix -Wpessimizing-move warnings in Interceptor.cpp; r=aklotz
There's no need to invoke std::move here, because Get() is already
returning a temporary that can be moved into the RefPtr.
2018-07-03 17:04:27 -04:00
James Teh d4ef733244 Bug 1472137 - Prevent mutex reentry in mscom::Interceptor::Create if GetInitialInterceptorForIID fails. r=aklotz
If GetInitialInterceptorForIID fails, the live set lock is not released in most cases, but the newly created Interceptor will be destroyed.
The Interceptor's destructor tries to acquire the live set lock again, but that causes a deadlock, since reentry is no longer allowed for a mutex after bug 1364624.
GetInitialInterceptorForIID now ensures the live set lock is always released  on failure, thus preventing the deadlock.

MozReview-Commit-ID: z0Q7JLnJXQ

--HG--
extra : amend_source : 0b9837e5500754b5782e72337fc59b7904c5e29c
2018-07-02 15:17:12 +10:00
Doug Thayer 10ff9c706f Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : dd000a05bfc2da40c586644d33ca4508fa5330f6
2018-04-29 18:21:20 -07:00
Cosmin Sabou 0f45148664 Backed out changeset 531593bacc4e (bug 1448040) for Android build bustages on HangAnnotations.h. CLOSED TREE
--HG--
extra : rebase_source : ea3618023c548a8ca6ca14749633c194606af52f
2018-06-07 19:22:31 +03:00
Doug Thayer 87bf13e093 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : 59e4a6ced7d14d2a01c0b79e944078ea84cae523
2018-04-29 18:21:20 -07:00
Emilio Cobos Álvarez 1e9c395548 Bug 1466168: Remove mozilla::Forward in favor of std::forward. r=froydnj
Same approach as the other bug, mostly replacing automatically by removing
'using mozilla::Forward;' and then:

  s/mozilla::Forward/std::forward/
  s/Forward</std::forward</

The only file that required manual fixup was TestTreeTraversal.cpp, which had
a class called TestNodeForward with template parameters :)

MozReview-Commit-ID: A88qFG5AccP
2018-06-02 09:33:26 +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
Dorel Luca d54a3b06aa Backed out changeset da12c077747f (bug 1448040) for Android build bustage on build/src/obj-firefox/dist/include/mozilla/HangAnnotations.h. CLOSED TREE
--HG--
extra : amend_source : 683201b5a47af3cb7fdcb7426c65f1c9ed713186
2018-05-25 20:13:26 +03:00
Doug Thayer 9765bdd0e0 Bug 1448040 - Remove HangMonitor/ChromeHangs r=Nika
Fairly straightforward, just a blanket removal. Haven't heard
anything on dev-platform or fx-data-dev regarding this removal,
so I think it's likely safe to remove on Nightly, and we can
revert if anyone makes a fuss.

As part of removing the HangMonitor, I renamed a few things and
reorganized the namespaces to not depend on a HangMonitor
namespace. Hopefully this doesn't produce too much noise in the
diff, it just seemed appropriate to move everything around
rather than keep dangling vestiges of the old system.

MozReview-Commit-ID: 8C8NFnOP5GU

--HG--
extra : rebase_source : a8840bd26f4b01b756ffa72345ababb625048550
2018-04-29 18:21:20 -07:00
Aaron Klotz d0a001f04f Bug 1459085: Prevent mutex reentry in mscom::Interceptor::GetInterceptorForIID; r=Jamie 2018-05-03 22:57:11 -06:00
Aaron Klotz 0850bc3ec5 Bug 1451511: Add cross-process function hooking to DLL interceptor; r=handyman
--HG--
rename : ipc/mscom/DynamicallyLinkedFunctionPtr.h => mozglue/misc/DynamicallyLinkedFunctionPtr.h
extra : amend_source : 1eea43cda6e05f722f0b1373535d9ceabac18661
2018-04-04 16:31:43 -06:00
James Teh fe6f1b3bf1 Bug 1429665: ipc::mscom::SpinEvent: Only spin for a short time, falling back to an event thereafter. r=aklotz
We want to spin for faster response, but we only want to spin for a very short time.
If we're waiting for a while, we don't want to be burning CPU for the entire time.
Therefore, only spin for 30 ms, then fall back to waiting on an event.

MozReview-Commit-ID: ErAIwpsIqYz

--HG--
extra : rebase_source : b6ac024adb7853456fd06c4385cf32184c8aeca2
2018-01-15 14:51:19 +10:00
James Teh 1d688c5a0d Bug 1411685: Remove another accessibility related diagnostic crash on Nightly. r=aklotz
I missed this one in bug 1431404.
This condition is rare and does indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing this as a result of this crash, so it causes user pain without any gain to us.

MozReview-Commit-ID: GncQGeZckrV

--HG--
extra : rebase_source : b6670005d53bc6d0009f0b8b142c2ab837b7d2e7
2018-03-23 15:21:56 -04:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
James Teh a26d4b939e Bug 1434822 part 2: mscom: Add a function to disconnect all remote clients associated with a given target. r=aklotz
Because Interceptors disable COM garbage collection to improve performance, they never receive Release calls from remote clients.
If the object can be shut down while clients still hold a reference, this function can be used to force COM to disconnect all remote connections (using CoDisconnectObject) and thus release the associated references to the Interceptor, its target and any objects associated with the HandlerProvider.
A HandlerProvider::DisconnectHandlerRemotes method also had to be added to allow HandlerProviders to disconnect clients for their own objects.

MozReview-Commit-ID: JaxEkOtrP1M

--HG--
extra : rebase_source : bc7a4ab79458eaaddcef8df74ff4d6f685fbfdce
extra : histedit_source : 087f17f09a0c0e1c8e3b5f6d9690f331c15f0b95
2018-02-19 16:08:57 +10:00
James Teh 16bde7a2f5 Bug 1434822 part 1: Disable COM ping functionality for our parent process instead of for external processes. r=aklotz
MozReview-Commit-ID: 2ayfzIxh8Lo

--HG--
extra : rebase_source : 59e0d9d4a15bd6b714600558bebda4e2add08201
extra : histedit_source : d068b57d9706d4b0cc3e32e7e575f441f3e23a9c
2018-02-01 15:42:24 +10:00
James Teh a6bf63dc6e Bug 1442523: mscom::Interceptor: Don't dispatch QI calls to the main thread while creating a marshaler. r=aklotz
COM queries for special interfaces such as IFastRundown when creating a marshaler.
We don't want these being dispatched to the main thread, since this would cause a deadlock on mStdMarshalMutex if the main thread is also querying for IMarshal.

MozReview-Commit-ID: EQcN8Zhewjh

--HG--
extra : rebase_source : 40c39edce139f66fdb43b539b1d6fb0acb00d755
2018-03-06 17:08:15 +10:00
James Teh 4e593a1e00 Bug 1440257: Ensure that mscom::MainThreadInvoker gets cleaned up very soon after it finishes executing. r=aklotz
MainThreadInvoker queues both a Gecko runnable and an APC to the main thread to deal with different ways in which the main thread can block.
However, the main thread doesn't check for APCs very often any more.
This means that the APC's reference to the SyncRunnable doesn't get cleaned up for a long time, thus leaking memory.
To work around this, we:
1. Queue an APC wich does the actual work.
2. Post a Gecko runnable (which always runs).
If the APC hasn't run, the Gecko runnable runs it.
Otherwise, it does nothing.

MozReview-Commit-ID: L0P4rMBnlaZ

--HG--
extra : rebase_source : 3af871cf59e94818963e15881217218ef2b42b6c
2018-02-23 10:44:07 +10:00
Bogdan Tara 3c059709aa Backed out changeset c055d7b57071 (bug 1434822) for causing 1442523. a=backout 2018-03-02 11:27:55 +02:00
Bogdan Tara 3cadf78110 Backed out changeset 54526e7c7b6c (bug 1434822) for causing 1442523. a=backout 2018-03-02 11:27:35 +02:00
James Teh 6fc08ce5ed Bug 1434822 part 2: mscom: Add a function to disconnect all remote clients associated with a given target. r=aklotz
Because Interceptors disable COM garbage collection to improve performance, they never receive Release calls from remote clients.
If the object can be shut down while clients still hold a reference, this function can be used to force COM to disconnect all remote connections (using CoDisconnectObject) and thus release the associated references to the Interceptor, its target and any objects associated with the HandlerProvider.
A HandlerProvider::DisconnectHandlerRemotes method also had to be added to allow HandlerProviders to disconnect clients for their own objects.

MozReview-Commit-ID: JaxEkOtrP1M

--HG--
extra : rebase_source : 2262af8fc3cb1aec8d9c8fc2762f3d61e188cb37
2018-02-19 16:08:57 +10:00
James Teh 5f27445039 Bug 1434822 part 1: Disable COM ping functionality for our parent process instead of for external processes. r=aklotz
MozReview-Commit-ID: 2ayfzIxh8Lo

--HG--
extra : rebase_source : 2ff14410152493c5bcaa4f0e34aa0a67d66a78ed
2018-02-01 15:42:24 +10:00
James Teh b51649c9a4 Bug 1440564: mscom::StructToStream: Free the buffer when destroying the instance. r=aklotz
You'd think that MesHandleFree would free the buffer, since it was created by RPC, but it doesn't.
Therefore, we must free it ourselves using midl_user_free.

MozReview-Commit-ID: 9KzWTngFEEq

--HG--
extra : rebase_source : 6bee3903f619ec1cb1569ebf1df2ddef9da6b901
2018-02-23 20:00:30 +10:00
James Teh 752cda7b26 Bug 1433046: mscom::Interceptor: Don't destroy an aggregated interceptor before releasing its interface. r=aklotz
When an object is aggregated, doing a QI to anything other than IUnknown on the inner object AddRefs the outer object.
Thus, before releasing our reference to the inner IUnknown (and thus destroying it), we *must* release any references to interfaces queried from it.
Otherwise, any pointers to interfaces of the inner object would be invalidated.

MozReview-Commit-ID: KXsA8Sagx6G

--HG--
extra : rebase_source : f1dca4ee71f2ed49c8ba19c12862f2b4f9881fca
2018-02-08 15:53:20 +10:00
James Teh d557fc0b1d Bug 1431404: Remove some accessibility related diagnostic crashes on Nightly. r=aklotz
These conditions are rare and do indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing these as a result of these crashes, so they cause user pain without any gain to us.

MozReview-Commit-ID: D9U4et3Bg7d

--HG--
extra : rebase_source : a81263a0ef97a8ed87129d15ef30ded3005e740c
2018-02-09 15:28:13 +10:00
Andreea Pavel 3d2179915d Backed out changeset e68169412c0b (bug 1431404) for failing mochitest browser chrome at browser/base/content/test/general/browser_datachoices_notification.js on a CLOSED TREE 2018-02-13 03:28:44 +02:00
James Teh 3f381e616f Bug 1431404: Remove some accessibility related diagnostic crashes on Nightly. r=aklotz
These conditions are rare and do indicate a problem which breaks accessibility.
However, we aren't getting any closer to diagnosing these as a result of these crashes, so they cause user pain without any gain to us.

MozReview-Commit-ID: D9U4et3Bg7d

--HG--
extra : rebase_source : a81263a0ef97a8ed87129d15ef30ded3005e740c
2018-02-09 15:28:13 +10:00
Aaron Klotz 1559fd3d00 Bug 1433046: Use WeakReferenceSupport::StabilizeRefCount instead of regular kung-fu death grips when aggregating; r=Jamie
This fix is completely speculative, but I have strong reason to believe that
we are having lifetime issues, and that refcount stabilization might be coming
into play.

The situation is this:

Suppose we're aggregating an object, so we pass |this| as the outer IUnknown.
The inner object might perform AddRef() and Release() on |this| during its
initialization.

But if we're in the process of creating the outer object, that refcount might
not yet have been incremented by 1, so the inner object's invocation of the
outer object's Release() could trigger a deletion.

The way around this is to temporarily bump the refcount when aggregating another
object. The key, though, is to not do this via AddRef() and Release(), but by
direct maniuplation of the refcount variable, so that we don't trigger any of
the self-deletion stuff.

MozReview-Commit-ID: 3WA2AJvb6jY

--HG--
extra : rebase_source : ab05a52760541a4ab11f1245a5ddeae938998047
2018-01-25 13:45:21 -07:00
Sebastian Hengst 78d2a3c1db Merge mozilla-central to mozilla-inbound 2018-01-24 14:24:05 +02:00
Aaron Klotz 1baadb6673 Bug 1404482: Remove crash report annotation that was being made before the crash reporter initialized; r=Jamie
MozReview-Commit-ID: 2Nn0Bzxrvd2

--HG--
extra : rebase_source : 9d967f226ec34c76bbcee00bf7632e45822da5f6
2018-01-23 12:06:58 -07:00
Aaron Klotz 37fc167ff3 Bug 1428759: Remove mutual exclusion from WeakReferenceSupport interface queries; r=Jamie
--HG--
extra : rebase_source : 1626509510d4f6018381b3f183ca40f2085f46d5
2018-01-12 14:17:18 -07: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
Aaron Klotz 3263c3ac00 Bug 1414421: Change some diagnostic asserts in mscom to stop firing on dev edition; r=Jamie
MozReview-Commit-ID: JfKevpNIiRT

--HG--
extra : rebase_source : 07b6ccd13b5ee589290b7b9e8069f9db5ceaf132
2017-11-29 14:50:17 -07:00
Gabriele Svelto ef3b2f88cc Bug 1402519 - Remove MOZ_CRASHREPORTER directives from ipc; r=billm
MozReview-Commit-ID: 4mDW7cJqHDn

--HG--
extra : rebase_source : 17c51ed796733d4a512e1d6f47273318dcc26b11
2017-10-10 12:06:35 +02:00
shindli fb855aa7ba Backed out 16 changesets (bug 1402519) for conflicts during merge r=backout on a CLOSED TREE
Backed out changeset 07fcf163241a (bug 1402519)
Backed out changeset c6d2ad45d8e2 (bug 1402519)
Backed out changeset 8a3caca61294 (bug 1402519)
Backed out changeset 01425eae2c48 (bug 1402519)
Backed out changeset cf298d3815de (bug 1402519)
Backed out changeset e1964f4389cd (bug 1402519)
Backed out changeset f405337f3569 (bug 1402519)
Backed out changeset a76356fd3359 (bug 1402519)
Backed out changeset d3bb350d1c34 (bug 1402519)
Backed out changeset 9d3bfd9f932c (bug 1402519)
Backed out changeset e3dd6e5b073f (bug 1402519)
Backed out changeset e801b0c00134 (bug 1402519)
Backed out changeset 8a4139fa5dca (bug 1402519)
Backed out changeset 8d01c14ac1ca (bug 1402519)
Backed out changeset 24e0dcd01898 (bug 1402519)
Backed out changeset f8fdf450613f (bug 1402519)
2017-11-23 00:11:44 +02:00
Gabriele Svelto f0b9eb9ff9 Bug 1402519 - Remove MOZ_CRASHREPORTER directives from ipc; r=billm
MozReview-Commit-ID: 4mDW7cJqHDn

--HG--
extra : rebase_source : a13301f4faea301cd528179790f2430171f59a48
2017-10-10 12:06:35 +02:00
James Teh 980e6321f7 Bug 1416986 part 1: Allow an mscom Handler to signal that it knows an interface is definitely not available. r=aklotz
If QueryHandlerInterface returns E_NOINTERFACE, the proxy will be queried for the interface.
However, the handler might know that the interface is definitely not available and could thus avoid a pointless cross-process call.
To facilitate this, the handler can now return S_FALSE to signal that the proxy should not be queried, thus immediately returning E_NOINTERFACE to the client.

MozReview-Commit-ID: 4RtBsA9BTOV

--HG--
extra : rebase_source : 4b0dcb16c469361c1944b24568ceb83fd0ac09c1
2017-11-15 09:59:44 +10:00
Aaron Klotz 1476d2ed85 Bug 1406827: Do not wrap an interface with a passthru proxy unless sandboxing is enabled and >= level 3; r=jimm
MozReview-Commit-ID: Gi1ch0IQtPj
2017-11-03 16:50:17 -06:00
Aaron Klotz 9eb89cbe15 Bug 1413287: Ensure that interceptors do not marshal a handler payload unless they are the outermost marshal request; r=Jamie
MozReview-Commit-ID: 2rDreOpdwvy

--HG--
extra : rebase_source : a38a5df54aab50cecfeedf4b2f51194e868f699d
2017-10-31 14:37:00 -06:00
NARCIS BELEUZU 0a208387ad Merge mozilla-central to autoland. r=merge a=merge on CLOSED TREE 2017-11-03 12:20:45 +02:00
Tom Ritter 433d959e05 Bug 1403358 Only reference ActivationContext if Acessibility is enabled r=aklotz
This also enables the crash reporter on the MinGW build, as this is the
only thing blocking that from working.

MozReview-Commit-ID: Hygd7UUQvwl

--HG--
extra : rebase_source : a4a12b8edaa5b1fba869d6f7c21fc8444be2d9d7
2017-10-26 15:09:50 -05:00
Aaron Klotz 6b2941a696 Update BUG_COMPONENT in ipc/mscom (no bug) DONTBUILD; r=me 2017-11-02 15:02:21 -06:00
Aaron Klotz d223c72b0e Bug 1411391: Ensure mscom::InterceptorLog covers time spent wrapping outparams in mscom::MainThreadHandoff; r=jimm
MozReview-Commit-ID: 8529IjAXZcb

--HG--
extra : rebase_source : 975d0ba8fc0358c2ddba5b935be967c4e78d919e
2017-10-23 16:55:26 -06:00
Sebastian Hengst 5c15da1f08 merge mozilla-inbound to mozilla-central. r=merge a=merge
--HG--
rename : testing/talos/tests/__init__.py => testing/talos/talos/unittests/__init__.py
rename : testing/talos/tests/browser_output.ts.txt => testing/talos/talos/unittests/browser_output.ts.txt
rename : testing/talos/tests/browser_output.tsvg.txt => testing/talos/talos/unittests/browser_output.tsvg.txt
rename : testing/talos/tests/profile.tgz => testing/talos/talos/unittests/profile.tgz
rename : testing/talos/tests/ps-Acj.out => testing/talos/talos/unittests/ps-Acj.out
rename : testing/talos/tests/test_talosconfig_browser_config.json => testing/talos/talos/unittests/test_talosconfig_browser_config.json
rename : testing/talos/tests/test_talosconfig_test_config.json => testing/talos/talos/unittests/test_talosconfig_test_config.json
rename : testing/talos/tests/xrestop_output.txt => testing/talos/talos/unittests/xrestop_output.txt
2017-10-27 12:45:34 +03:00
James Teh 73c24a66f6 Bug 1403180: Fix StripHandlerFromOBJREF for VT_DISPATCH on Windows 7. r=aklotz
StripHandlerFromOBJREF shortens the OBJREF by sizeof(CLSID), so it needs to seek the stream back after tweaking the OBJREF.
Previously, this was done using a relative seek.
Unfortunately, for some reason I can't fathom on Windows 7, this doesn't work when marshaling for VT_DISPATCH.
The Seek call succeeds, but either does nothing or sets the stream position to a garbage value.
Instead, we now use an absolute seek, which seems to behave.
This was breaking IAccessible::accNavigate and AccessibleChildren on Windows 7.
MozReview-Commit-ID: FEH93oiyP5R

--HG--
extra : rebase_source : b15db60da888b49cbd371bc5c8311577a2c7ece4
2017-10-23 15:37:24 +10:00
Aaron Klotz 5a394f86cf Bug 1411439: Pass reference to owning interceptor into HandlerProvider for payload creation; r=Jamie
MozReview-Commit-ID: GUW4DrsJEn

--HG--
extra : amend_source : 755ff37c8bc40de408f8668e9e44ebfd41bd9136
2017-10-24 17:48:51 -06:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Aaron Klotz eb3882c42d Bug 1409538: Add durations to MSCOM log; r=jimm
This patch adds two additional fields to each mscom log entry: The first is
the duration, in microseconds, of time spent in mscom overhead when executing
a call from the MTA on behalf of a remote client.

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

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

MozReview-Commit-ID: EhFieEPrhE5
2017-07-25 15:57:18 -06:00
Aaron Klotz 8f79c15fdb Bug 1409545: Add the ability to query a handler provider for the expected interface for an IUnknown outparam; r=jimm
MozReview-Commit-ID: 7eZ2giTfVG1

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

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

- GeckoProfiler.h can be #included unconditionally;

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

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

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

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Sebastian Hengst 5e0b457b10 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EVLGo1zCANb
2017-10-04 11:13:24 +02:00
Aaron Klotz aa44e53f36 Bug 1393600: Ensure that the handler sends a known interface to external clients; r=jimm
MozReview-Commit-ID: F5vxF2pB347
2017-09-24 14:32:36 -06:00
Aaron Klotz 35c65ef535 Bug 1393600: Prevent mismatches between the handler's expected interface and the one being provided by content; r=jimm
MozReview-Commit-ID: 4yQENc7i4LS
2017-09-21 16:53:56 -06:00
Tom Ritter 3b81e79e5a Bug 1405417 Add typename keyword in ipc/mscom/PassthruProxy.h to resolve ambiguity around member type r=aklotz
MozReview-Commit-ID: 6zEBdk8bKb9

--HG--
extra : rebase_source : 7e7c7a240abbe066d7f4e1d8b6619471b76c1c2d
2017-10-03 12:32:24 -05:00
Aaron Klotz f88fa2ef6c Bug 1399557: Add Environment to mscom::ProxyStream and define it for IAccessible; r=jimm
MozReview-Commit-ID: 4wBjnFW9GRa

--HG--
extra : rebase_source : 43308d5c1d926300be222cb59d4913f61cc6c060
2017-09-29 15:41:28 -06:00
Aaron Klotz da8dc618c4 Bug 1383501: Obtain and report the current activation context's manifest path; r=jimm
MozReview-Commit-ID: HJ1zNoEMzvS
2017-09-19 14:35:27 -06:00
Aaron Klotz 143a969b94 Bug 1399557: Follow-up: Add check for expected error code; r=bustage
--HG--
extra : rebase_source : bf2db1dc3f7869f360bd22557a793cc3f770aee7
extra : amend_source : 9fc98cc81cac846dcde68abad2ff1ab0c3f46dad
2017-09-20 14:40:41 -06:00
Aaron Klotz c0a1a84af9 Bug 1399557: Add diagnostic asserts to interceptor creation code; r=jimm
MozReview-Commit-ID: 9fJxHbxCmgh
2017-09-18 10:49:15 -06:00