Commit graph

657 commits

Author SHA1 Message Date
Henrik Skupin
342a8631b8 Bug 1726465 - Don't enable Marionette in new Firefox processes launched by browser-chrome shell tests. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D145933
2022-05-10 15:08:17 +00:00
criss
70783e1c31 Backed out 8 changesets (bug 1726465) for causing failures on browser_preferences_usage.js. CLOSED TREE
Backed out changeset 4b57310622a0 (bug 1726465)
Backed out changeset 0c6c4a15621a (bug 1726465)
Backed out changeset 081a0f91e0a7 (bug 1726465)
Backed out changeset 60bceb18ff57 (bug 1726465)
Backed out changeset f241655ea876 (bug 1726465)
Backed out changeset 7bc0a3aeb254 (bug 1726465)
Backed out changeset b2f7c710daef (bug 1726465)
Backed out changeset e9b90fd1b4ec (bug 1726465)
2022-05-10 13:59:54 +03:00
Henrik Skupin
a6fa7f62e0 Bug 1726465 - Don't enable Marionette in new Firefox processes launched by browser-chrome shell tests. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D145933
2022-05-10 09:04:03 +00:00
Ben Hearsum
81cdef5cba Bug 1767589: check for S_FALSE where appropriate in PinCurrentAppToTaskbar r=rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D145652
2022-05-09 13:53:46 +00:00
Emilio Cobos Álvarez
a0a64c2947 Bug 1767889 - Set both picture-uri and picture-uri-dark when setting desktop background in GSettings. r=stransky
Clean up a bit the code while at it.

Differential Revision: https://phabricator.services.mozilla.com/D145559
2022-05-09 13:38:38 +00:00
Barret Rennie
6ed45f92e8 Bug 1766434 - Make checking for and pinning app to taskbar async on Windows r=bhearsum
Previously `nsIWindowsShellService::{Check,}PinCurrrentAppToTaskbar` was doing
main thread IO. They have been replaced with async versions that do their work
on a background thread.

Differential Revision: https://phabricator.services.mozilla.com/D145244
2022-05-05 18:48:44 +00:00
Iulian Moraru
0b40fe389e Backed out changeset 9dd640f33e1b (bug 1766434) for causing assertion failures on ServoUtils.h. CLOSED TREE 2022-05-04 02:54:33 +03:00
Barret Rennie
a12040d47d Bug 1766434 - Do not run nsIWindowsShellService::CheckPinCurrentAppToTaskbar on main thread in ShellService.jsm r=bhearsum
`nsIWindowsShellService::CheckPinCurrentAppToTaskbar` does IO which we want to
move off of the main thread. There is now an async version,
`CheckPinCurrentAppToTaskbarAsync`, that runs the IO on a background thread and
returns a promise, which we now use in ShellService.jsm.

Differential Revision: https://phabricator.services.mozilla.com/D145244
2022-05-03 20:50:09 +00:00
Mike Hommey
2d6c8fdbc6 Bug 1766561 - Adjust UTF-16 string formatting. r=nika
With MOZ_FORMAT_PRINTF annotations, the compiler expects a wchar_t*, and
it won't automatically consider char16ptr_t to be compatible with that.

While handling strings, there's one case of formatting that doesn't need
to use %S at all.

Differential Revision: https://phabricator.services.mozilla.com/D144919
2022-05-03 20:49:09 +00:00
Mike Hommey
028ad1b883 Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 09:14:12 +00:00
Norisz Fay
6e06e2da92 Backed out 4 changesets (bug 1766377) for causing mochitest failures on HyperTextAccessible.cpp CLOSED TREE
Backed out changeset 6335511477a4 (bug 1766377)
Backed out changeset e8108d6fab9f (bug 1766377)
Backed out changeset 80d16d55c490 (bug 1766377)
Backed out changeset 1a6583d6e52e (bug 1766377)
2022-04-29 07:35:11 +03:00
Mike Hommey
9cd056be1e Bug 1766377 - Fix remaining sign-compare warnings in Windows builds. r=rkraesig,gsvelto,media-playback-reviewers,gfx-reviewers,bryce,sotaro
browser/components/shell/WindowsUserChoice.cpp(233,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int j = 0; j < DWORDS_PER_BLOCK; ++j) {
                    ~ ^ ~~~~~~~~~~~~~~~~
browser/components/shell/WindowsUserChoice.cpp(388,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(exts); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1225,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(shortcutCSIDLs); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
browser/components/shell/nsWindowsShellService.cpp(1492,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(folders); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~
dom/media/platforms/wmf/MFTDecoder.cpp(85,23): error: comparison of integers of different signs: 'int' and 'UINT32' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 1; i < actsNum; i++) {
                    ~ ^ ~~~~~~~
gfx/2d/Factory.cpp(1276,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int y = 0; y < height; y++) {
                  ~ ^ ~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1096,36): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
        swapDesc.BufferDesc.Height == mSize.height) ||
        ~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/CompositorD3D11.cpp(1095,35): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
  if (((swapDesc.BufferDesc.Width == mSize.width &&
        ~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1278,30): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
          currentDesc.Height != mSize.height ||
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~
gfx/layers/d3d11/TextureD3D11.cpp(1277,29): error: comparison of integers of different signs: 'UINT' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
      if (currentDesc.Width != mSize.width ||
          ~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~
gfx/layers/ipc/ContentCompositorBridgeParent.cpp(248,19): error: comparison of integers of different signs: 'const uint32_t' (aka 'const unsigned int') and 'int32_t' (aka 'int') [-Werror,-Wsign-compare]
  if (sequenceNum == status.sequenceNumber() && !dm->HasDeviceReset()) {
      ~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(129,21): error: comparison of integers of different signs: 'int' and 'unsigned int' [-Werror,-Wsign-compare]
    if (resultColor != 0xffffff00) {
        ~~~~~~~~~~~ ^  ~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(154,23): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
    for (int i = 0; i < PR_ARRAY_SIZE(checkModules); i += 1) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
gfx/thebes/D3D11Checks.cpp(409,14): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'UINT' (aka 'unsigned int') [-Werror,-Wsign-compare]
  if (vendor != desc.VendorId) {
      ~~~~~~ ^  ~~~~~~~~~~~~~
gfx/thebes/gfxDWriteFontList.cpp(1248,39): error: comparison of integers of different signs: 'unsigned int' and 'int' [-Werror,-Wsign-compare]
        addFamily(names[index], index != sysLocIndex);
                                ~~~~~ ^  ~~~~~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(121,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < aLength; ++i) {
                  ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(132,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
intl/lwbrk/nsUniscribeBreaker.cpp(138,23): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
    for (int i = 0; i < aLength; ++i) {
                    ~ ^ ~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(319,26): error: comparison of integers of different signs: 'std::basic_string<char>::size_type' (aka 'unsigned long long') and 'int' [-Werror,-Wsign-compare]
    while (line.length() > whitespace &&
           ~~~~~~~~~~~~~ ^ ~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1003,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 1; i < noPlaceholderSpans.length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
mozglue/misc/PreXULSkeletonUI.cpp(1708,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < dataLen / (2 * sizeof(double)); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
security/sandbox/chromium-shim/sandbox/win/permissionsService.cpp(40,16): error: comparison of integers of different signs: 'int' and 'const std::basic_string<wchar_t>::size_type' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
  if (slashIdx != std::wstring::npos) {
      ~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~
toolkit/components/aboutthirdparty/tests/gtest/TestAboutThirdParty.cpp(107,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kDirectoriesUnsorted); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/breakpad-client/windows/crash_generation/crash_generation_server.cc(957,23): error: comparison of integers of different signs: 'int' and 'const size_t' (aka 'const unsigned long long') [-Werror,-Wsign-compare]
    for (int i = 0; i < kExceptionAppMemoryRegions; i++) {
                    ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(373,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(671,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(controls) / sizeof(controls[0]); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/crashreporter/client/crashreporter_win.cpp(1048,21): error: comparison of integers of different signs: 'int' and 'unsigned long long' [-Werror,-Wsign-compare]
  for (int i = 0; i < sizeof(kDefaultAttachedBottom) / sizeof(UINT); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/mozapps/defaultagent/SetDefaultBrowser.cpp(248,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < mozilla::ArrayLength(associations); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/system/windowsproxy/ProxyUtils.cpp(27,36): error: comparison of integers of different signs: 'const int' and 'nsTArray_base::size_type' (aka 'unsigned long long') [-Werror,-Wsign-compare]
                             if (i < addr.Length()) {
                                 ~ ^ ~~~~~~~~~~~~~
toolkit/xre/dllservices/mozglue/interceptor/Arm64.h(178,28): error: comparison of integers of different signs: 'int32_t' (aka 'int') and 'unsigned int' [-Werror,-Wsign-compare]
  if (signbits && signbits != 0xFE000000) {
                  ~~~~~~~~ ^  ~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<unsigned int, int>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(35,5): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<unsigned int, int, nullptr>' requested here
    EXPECT_EQ(mCounters.Count(), N);
    ^
obj-build/dist/include/gtest/gtest.h(1842,54): note: expanded from macro 'EXPECT_EQ'
  EXPECT_PRED_FORMAT2(::testing::internal::EqHelper::Compare, val1, val2)
                                                     ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(210,28): note: in instantiation of function template specialization 'ModuleLoadCounter::Remains<1>' requested here
    EXPECT_TRUE(waitForOne.Remains({kTestModules[0]}, {0}));
                           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(139,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(151,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(164,21): error: comparison of integers of different signs: 'int' and 'size_t' (aka 'unsigned long long') [-Werror,-Wsign-compare]
  for (int i = 0; i < ArrayLength(kExpectedArgsW); ++i) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
obj-build/dist/include/gtest/gtest.h(1354,11): error: comparison of integers of different signs: 'const int' and 'const unsigned long long' [-Werror,-Wsign-compare]
  if (lhs == rhs) {
      ~~~ ^  ~~~
obj-build/dist/include/gtest/gtest.h(1373,12): note: in instantiation of function template specialization 'testing::internal::CmpHelperEQ<int, unsigned long long>' requested here
    return CmpHelperEQ(lhs_expression, rhs_expression, lhs, rhs);
           ^
toolkit/xre/test/gtest/TestAssembleCommandLineWin.cpp(138,3): note: in instantiation of function template specialization 'testing::internal::EqHelper::Compare<int, unsigned long long, nullptr>' requested here
  EXPECT_EQ(len, ArrayLength(kExpectedArgsW));
  ^
widget/windows/TSFTextStore.cpp(3455,28): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
          range.mEndOffset == end - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
widget/windows/TSFTextStore.cpp(3454,30): error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'long' [-Werror,-Wsign-compare]
      if (range.mStartOffset == start - mComposition->StartOffset() &&
          ~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
xpfe/appshell/AppWindow.cpp(1900,21): error: comparison of integers of different signs: 'int' and 'uint32_t' (aka 'unsigned int') [-Werror,-Wsign-compare]
  for (int i = 0; i < toolbarSprings->Length(); i++) {
                  ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~

Differential Revision: https://phabricator.services.mozilla.com/D144695
2022-04-29 00:43:32 +00:00
Ben Hearsum
f251e7d5e6 Bug 1766510: fix windows 7 taskbar pinning code in mingw builds r=rkraesig
Differential Revision: https://phabricator.services.mozilla.com/D144826
2022-04-27 19:51:18 +00:00
Ben Hearsum
6f3f6a30ea Bug 1763573: avoid loading CLSID_SHELL when getting a handle on an IShellDispatch to pin to taskbar on Windows 7 r=rkraesig
It is believed that loading this COM interface is causing crashes by bringing in shell extension DLLS. This patch retrieves it through alternate means (the same way that ShellExecuteByExplorer does already).

It also fixes BSTR handling and does some general cleanup that was requested (and needed).

Differential Revision: https://phabricator.services.mozilla.com/D143776
2022-04-26 19:26:08 +00:00
Serge Guelton
04d40614bd Bug 1764407 - Cleanup toolkit/components/remote/ includes r=sylvestre
Differential Revision: https://phabricator.services.mozilla.com/D143530
2022-04-20 11:13:20 +00:00
Ben Hearsum
759064881f Bug 1763573: temporarily disable Windows 7 taskbar pinning to determine whether or not it's causing crashes r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D143719
2022-04-14 16:26:34 +00:00
Gijs Kruitbosch
8e67201171 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 16:16:42 +00:00
Norisz Fay
acdd6851cd Backed out 2 changesets (bug 1753696) for causing multiple dt and bc failures CLOSED TREE
Backed out changeset 67fd9edfbcea (bug 1753696)
Backed out changeset a9d957ea887b (bug 1753696)
2022-03-30 12:17:55 +03:00
Gijs Kruitbosch
27039e2946 Bug 1753696 - Automatic rewrite: replace add_task(setup with add_setup in browser mochitest, r=Standard8,webcompat-reviewers,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D141437
2022-03-30 08:18:51 +00:00
Nick Alexander
5e7cb798df Bug 1762100 - Part 3: Expect and use FirefoxPDF-.... r=bhearsum
This does two things.  First, it expects the special
FirefoxPDF-... ProgID to be available for UserChoice.  We could manage
without it for a while, but eventually we expect set-to-default to
include PDFs.  When that is the case, if it doesn't exist, something
has gone very wrong, and we'd like to find that out (via our existing
telemetry, which reports "missing" ProgIDs).

Second, it arranges to use the new FirefoxPDF-... ProgID when
setting-to-default.

Differential Revision: https://phabricator.services.mozilla.com/D142303
2022-03-30 03:42:00 +00:00
Nick Alexander
823f7095f3 Bug 1762100 - Part 1: Accommodate arbitrary ProgID roots in set-default-browser-user-choice. r=bhearsum
This anticipates separating the FirefoxPDF-... handler from the
FirefoxHTML-... handler.

Differential Revision: https://phabricator.services.mozilla.com/D142301
2022-03-30 03:41:59 +00:00
Nick Alexander
27f0477631 Bug 1761504 - Add setDefaultPDFHandlerOnlyReplaceBrowsers Nimbus feature. r=bhearsum
When enabled, this feature restricts the existing
`setDefaultPDFHandler` Nimbus feature to only set Firefox as the
default PDF handler when the existing handler is a known browser.

Depends on D142147

Differential Revision: https://phabricator.services.mozilla.com/D142148
2022-03-29 03:57:00 +00:00
Nick Alexander
e55ce25a0a Bug 1746527 - Make browser/components/shell/test/browser_setDefaultPDFHandler.js Windows 10+. r=bhearsum
Differential Revision: https://phabricator.services.mozilla.com/D142147
2022-03-27 04:01:59 +00:00
Emilio Cobos Álvarez
9ddc42292b Bug 1760839 - Use more automatic memory management in GTK code. r=stransky
This fixes a couple potential leaks (e.g., see the UPowerClient changes,
we weren't freeing all the devices properly).

Differential Revision: https://phabricator.services.mozilla.com/D141775
2022-03-23 16:14:34 +00:00
Ben Hearsum
654d60a687 Bug 1751038: Add Telemetry to identify sessions started through Private Browsing shortcuts r=nalexander
Two new things here:
1) We append "Private" to the existing shortcut classification if it is likely to be a Private Browsing shortcut. (To help maintain the goal of avoiding I/O this is done by looking at the filename rather than inspecting the shortcut args.)
2) A totally new `is_taskbar_pinned_private` to report whether or not a Private Browsing shortcut is pinned to the Taskbar.

Differential Revision: https://phabricator.services.mozilla.com/D140653
2022-03-17 16:33:35 +00:00
Ben Hearsum
0f0cc651ae Bug 1750991: Add support for pinning to taskbar in Windows 7 & 8 through WindowsShellService. r=mhowell
I ended up refactoring the Windows version specific parts into their own functions, which I think makes this a bit nicer to read.

Differential Revision: https://phabricator.services.mozilla.com/D139183
2022-03-17 16:33:34 +00:00
Ben Hearsum
ad43698e49 Bug 1750991: Automatically create shortcut if it's not already present when pinning to the Windows Taskbar. r=mhowell
There's some general improvements to CreateShortcut here: writing them out to a log, setting the working directory, allowing the icon to be customized. To support the shortcuts log, I had to restrict how shortcut locations are specified to be a KNOWNFOLDERID -- I couldn't think of any other way to make sure we accurately record them. Notably, this code has been unused since the Site Specific Browsing work was backed out - so there's no existing callers to worry about breaking.

This patch also enhances the pin to taskbar code to automatically create a shortcut if none exist (this is how we'll want things to work for the Private Browsing shortcuts, and it seemed like a generally useful thing to do).

Differential Revision: https://phabricator.services.mozilla.com/D138197
2022-03-17 16:33:34 +00:00
Ben Hearsum
4a06eb3f49 Bug 1750991: Add support for pinning a a Private Browsing mode shortcut to the Taskbar. r=mhowell
The bulk of this is wiring in a Private Browsing flag in the places that need it, and using some of the recently added WinTaskbar code to grab the correct AUMID. Beyond that, the notable parts are:
* The interface difference between isCurrentAppPinnedToTaskbarAsync and the other changed methods. I was hoping to use the Private Browsing flag everywhere, but doing so in code that run in a separate thread ended up crashing due to the Preferences usage in WinTaskbar (https://searchfox.org/mozilla-central/rev/9d66919569655a8fae9b431550241c058fa85b8a/widget/windows/WinTaskbar.cpp#216)
* The new string for the Private Browsing shortcut. The exact string may change, so it's hardcoded for now.
* Checking the AUMID of shortcuts when looking for a match (to make sure Private Browsing doesn't pick up non-private, and visa versa)
* Some fixes for tests of ShellService.jsm -- I honestly have no idea how these ever passed on Linux.

Differential Revision: https://phabricator.services.mozilla.com/D138196
2022-03-17 16:33:34 +00:00
Ben Hearsum
5da50d1a7c Bug 1750991: Add helper for writing to a new shortcuts log in ProgramData. r=mhowell
These new shortcut logs are named with App name + User SID, which should almost certainly be writeable (unless someone manually created one with a different account for some reason).

Differential Revision: https://phabricator.services.mozilla.com/D138195
2022-03-17 16:33:33 +00:00
Emilio Cobos Álvarez
74c4e590a6 Bug 1757209 - Don't hardcode snap instance name. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139761
2022-02-28 15:07:16 +00:00
Emilio Cobos Álvarez
8e7fb6594f Bug 1756083 - Remove useless ifdef. r=stransky
We never compile nsGNOMEShellService without MOZ_WIDGET_GTK.

Depends on D139474

Differential Revision: https://phabricator.services.mozilla.com/D139475
2022-02-23 13:59:33 +00:00
Emilio Cobos Álvarez
0422925d7e Bug 1756083 - Cleanup snap name handling and enable portal when running under either flatpak or snap. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D139474
2022-02-23 13:59:33 +00:00
Noemi Erli
cfc7069bc4 Backed out changeset e6e6714aa40a (bug 1516290) for causing valgrind failures 2022-01-23 18:20:28 +02:00
Emilio Cobos Álvarez
2dfce95b86 Bug 1516290 - Check for default browser using xdg-settings before trying to use the protocol handler. r=stransky
This seems worth doing regardless of whether we do D136076.

Differential Revision: https://phabricator.services.mozilla.com/D136623
2022-01-23 13:41:12 +00:00
Mark Banner
4f4dd2fbae Bug 1750974 - Extend our ESLint import-globals-from function to support absolute directories. r=Gijs,mossop
Differential Revision: https://phabricator.services.mozilla.com/D136368
2022-01-20 14:15:34 +00:00
Toshihito Kikuchi
916fbe8459 Bug 1743427 - Enable pre-spawn CIG for socket process. r=bobowen
Since socket process can be launched before `GeckoDependentInitialize`,
we cache the install directory in `InitSignedPolicyRulesToBypassCig`
instead of using `sBinDir`.

This patch moves `GetInstallDirectory` to WinHeaderOnlyUtils.h to reuse
and removes `WinUtils::GetModuleFullPath` that is unused.

Differential Revision: https://phabricator.services.mozilla.com/D133596
2021-12-27 02:40:14 +00:00
Mike Hommey
fce6eb7d83 Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-23 20:29:07 +00:00
Cristian Tuns
e1e31e01f2 Backed out 2 changesets (bug 1747165) for causing nightly blockers(bustages) a=backout
Backed out changeset 4b1ab0915c94 (bug 1747165)
Backed out changeset 96043d814772 (bug 1747165)
2021-12-23 08:00:54 -05:00
Mike Hommey
b55194a16f Bug 1747165 - Replace TK_FLAGS/TK_LIBS with MOZ_GTK3_FLAGS/MOZ_GTK3_LIBS. r=firefox-build-system-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D134464
2021-12-22 23:56:24 +00:00
Toshihito Kikuchi
5bb452d7f6 Bug 1743783 - Ignore extra command options when taking a screenshot. r=mossop
`HeadlessShell.handleCmdLineArgs` needs to skip arguments starting with a hyphen
to search for a URL.

This patch also fixes a problem that `nsNativeAppSupportWin::CheckConsole` did
not remove processed command options.

Differential Revision: https://phabricator.services.mozilla.com/D132987
2021-12-16 16:16:16 +00:00
Barret Rennie
9e1cd98548 Bug 1745355 - Remove osfile.jsm from browser/components/shell r=bdahl
Differential Revision: https://phabricator.services.mozilla.com/D133514
2021-12-14 21:00:28 +00:00
Nick Alexander
93c6fe08a4 Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-12 03:52:57 +00:00
Nick Alexander
91010d4d41 Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-12 03:52:56 +00:00
Butkovits Atila
5c71755e40 Backed out 3 changesets (bug 1743914) for causing failures at browser_setDefaultPDFHandler.js. CLOSED TREE
Backed out changeset 01e19b8ec15b (bug 1743914)
Backed out changeset c46d66869d03 (bug 1743914)
Backed out changeset 57d0f8824e35 (bug 1743914)
2021-12-11 10:48:19 +02:00
Nick Alexander
7ed0417539 Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-11 06:25:57 +00:00
Nick Alexander
2b59a70e77 Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-11 06:25:57 +00:00
Narcis Beleuzu
66356e92dc Backed out 3 changesets (bug 1743914) for bc failures on browser_setDefaultPDFHandler.js
Backed out changeset 088401e43bd4 (bug 1743914)
Backed out changeset 7cb74ac80d41 (bug 1743914)
Backed out changeset 20713ede0c08 (bug 1743914)
2021-12-11 03:28:02 +02:00
Nick Alexander
5f31cda44e Bug 1743914 - Part 3: Telemetry for when Firefox is the default handler. r=chutten,mhowell
This only records whether Firefox is the default PDF handler for now.
But it will accommodate additional file types and protocols in the
future, should they be desired.

This is Windows 10+ only, since we really only care about PDF handling
defaults where Edgium is the OS default.

Differential Revision: https://phabricator.services.mozilla.com/D132659
2021-12-11 00:02:40 +00:00
Nick Alexander
530bcdf73a Bug 1743914 - Part 2: Allow to experiment with setting Firefox as default PDF handler on Windows 10+. r=mhowell,Mardak
This adds a `setDefaultPDFHandler` that extends the existing
`setDefaultBrowserUserChoice` to also set Firefox as the default PDF
handler when setting Firefox as the default browser.  (Since this uses
User Choice, it's Windows 10+ only.)

Differential Revision: https://phabricator.services.mozilla.com/D132660
2021-12-11 00:02:39 +00:00
Andrei Oprea
ef300c52d4 Bug 1738286 - New schema and enrollment flow for rollouts r=k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D129835
2021-12-09 17:58:18 +00:00