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

2212 Коммитов

Автор SHA1 Сообщение Дата
Mike Hommey 9c0fcac97c Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses, and the updater, for which we keep using vsnprintf.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-03-10 23:52:40 +00:00
Mike Hommey e47bda795b Bug 1690167 - Add support for the hh length modifier in Printf.cpp. r=nika,Gankra
Test cases from TestIntegerPrintfMacros will cover this in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D103729
2021-03-10 23:52:40 +00:00
Mike Hommey c7936d817c Bug 1690167 - Add support for the j length modifier in Printf.cpp. r=Gankra
Test cases from TestIntegerPrintfMacros will cover this in an upcoming commit.

Differential Revision: https://phabricator.services.mozilla.com/D105080
2021-03-10 23:52:39 +00:00
Mike Hommey 3e40e0ce40 Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-03-10 23:52:39 +00:00
Agi Sferro 9ec0facdaa Bug 1694481 - Remove unused methods in GeckoLoader. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106181
2021-03-10 22:43:08 +00:00
Agi Sferro 71dbca3068 Bug 1694481 - Remove unused NativeZip. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106180
2021-03-10 22:43:07 +00:00
Agi Sferro b39485034a Bug 1694481 - Remove unused DirectBufferAllocator. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D106179
2021-03-10 22:43:07 +00:00
Doug Thayer 6a24f1709b Bug 1696556 - Always run earlyBlankFirstPaint if we showed skele UI r=emalysz
This code is important for transitioning between the skeleton UI code and the
full-featured browser window code. Additionally, the original logic of disabling
when not on the default theme no longer applies, because it was intended to
eliminate white flashes in dark mode. However, with the skeleton UI, those
white flashes no longer occur.

Differential Revision: https://phabricator.services.mozilla.com/D107293
2021-03-09 18:37:53 +00:00
Bob Owen 86def8279e Bug 1546156: Don't forcibly load user32 when win32k lockdown is enabled. r=aklotz
Differential Revision: https://phabricator.services.mozilla.com/D107498
2021-03-09 08:35:07 +00:00
Doug Thayer e2fa1effe1 Bug 1696568 - Ensure skeleton UI window is always consumed if created r=emalysz
If we error out in, say, DrawSkeletonUI, the window we created will be orphaned
and left to sit there indefinitely. This patch fixes that by separating the
error from the consume result.

Differential Revision: https://phabricator.services.mozilla.com/D107301
2021-03-08 21:26:06 +00:00
Toshihito Kikuchi f5928c8e7c Bug 1692908 - Block AVerMedia's virtual camera module. r=gcp
Differential Revision: https://phabricator.services.mozilla.com/D106636
2021-02-26 22:06:19 +00:00
Aaron Klotz 004362bf3e Bug 1690384: Propagate error information up through XPCOMGlueLoad and GetBootstrap; r=glandium
We know that some GV installations (particularly but not exlcusively Focus) are
failing to load `libxul.so` during early Gecko bootstrapping. Unfortunately
a boolean pass/fail result is not giving us sufficient information to be able to
properly troubleshoot this problem.

This patch adds `mozilla::Result`-based return values to `XPCOMGlueLoad` and
`GetBootstrap` in an effort to produce more actionable information about these
failures.

We include either a `nsresult` or, if the failure is rooted in a dynamic linker
failure, appropriate platform-specific error information:

* On Unix-based platforms, a `UniqueFreePtr<char>` containing the string from `dlerror(3)`;
* On Windows, the Win32 `DWORD` error code from `GetLastError()`.

For non-Android platforms, I updated them to handle the new return type, but
otherwise did not make any further changes.

For Android, we include the error information in the message string that we pass
into the Java `Exception` that is subsequently thrown.

Differential Revision: https://phabricator.services.mozilla.com/D104263
2021-02-23 23:25:22 +00:00
Gerald Squelart 96f3fabfcb Bug 1693037 - Fix non-MOZ_GECKO_PROFILER builds - r=florian
No code changes.

Build issues were found by renaming `MOZ_GECKO_PROFILER` to something else in toolkit/moz.configure, in both unified and non-unified builds, on all supported platforms.

Also updated some profiler-related comments.

Differential Revision: https://phabricator.services.mozilla.com/D105375
2021-02-17 22:36:28 +00:00
Andreea Pavel 64289058b6 Backed out 5 changesets (bug 1690167) for failing xpcshell at bootstrapSvc.js on a CLOSED TREE
Backed out changeset d28c0f11743f (bug 1690167)
Backed out changeset 3b2bebed9128 (bug 1690167)
Backed out changeset 7e925e90a251 (bug 1690167)
Backed out changeset f85934a2b7ad (bug 1690167)
Backed out changeset 6d83474e81bb (bug 1690167)
2021-02-17 07:10:58 +02:00
Mike Hommey 622b111f9e Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-16 21:20:04 +00:00
Mike Hommey 34cf11e754 Bug 1690167 - Add support for the hh length modifier in Printf.cpp. r=nika,Gankra
Test cases from TestIntegerPrintfMacros will cover this in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D103729
2021-02-16 21:20:04 +00:00
Mike Hommey 7912f64d75 Bug 1690167 - Add support for the j length modifier in Printf.cpp. r=Gankra
Test cases from TestIntegerPrintfMacros will cover this in an upcoming commit.

Differential Revision: https://phabricator.services.mozilla.com/D105080
2021-02-16 21:20:04 +00:00
Mike Hommey 900d63959b Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-02-16 21:20:03 +00:00
Florian Quèze 2df72b6edb Bug 1691092 - When capturing a marker stack, stop when the PROFILER category is encountered, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D104248
2021-02-16 19:04:03 +00:00
Florian Quèze 7f356c706e Bug 1691092 - add PROFILER category to make profiler overhead very visible, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D104242
2021-02-16 19:04:02 +00:00
Gerald Squelart 811250c823 Bug 1691589 - Extract profiler label APIs into separate headers - r=florian
New headers BaseProfilerLabels.h and ProfilerLabels.h now contain all label-related APIs.

These files were hg-copied from the main headers, to preserve history, and then non-label content was removed from the main headers.
The "RAII" macros were moved to these *ProfilerLabels.h headers, because that's the most-common header in which they're needed. Meta-bug 1681416 will probably move these again as needed.

Differential Revision: https://phabricator.services.mozilla.com/D104587
2021-02-16 04:44:19 +00:00
Gerald Squelart 9cc158ebf3 Bug 1691589 - Don't include main profiler headers from markers headers - r=florian
{Base,}ProfilerMarkers.h can now rely on {Base,}ProfilerState.h (and just one function forward declaration), so they don't need to include {Base,Gecko}Profiler.h anymore.
Thanks to that, {Base,Gecko}Profiler.h can now include {Base,}ProfilerMarkers.h at the top.

Also, BaseProfilingStack.h should not include BaseProfiler.h (include loop, can cause failures) not algorithm (not used).

***
roll up into 2nd patch

Differential Revision: https://phabricator.services.mozilla.com/D104969
2021-02-16 04:44:18 +00:00
Gerald Squelart 1e76096bd5 Bug 1691589 - Extract profiler state APIs into separate headers - r=florian
New headers BaseProfilerState.h and ProfilerState.h now contain most state-reading APIs.

These files were hg-copied from the main headers, to preserve history, and then chosen declarations were kept only in the relevant header.
This is needed in a following patch, where new headers *ProfilerLabels.h use `profiler_is_active()`.

Differential Revision: https://phabricator.services.mozilla.com/D104968
2021-02-16 04:44:17 +00:00
Makoto Kato c0bbdf3d86 Bug 1644737 - Remove NativeCrypto in mozglue. r=mhoye,geckoview-reviewers,agi
NativeCrypto code was used by Firefox sync in Fennec. But since Fennec code
is gone, no one seems to use this.

Differential Revision: https://phabricator.services.mozilla.com/D101458
2021-02-15 05:59:14 +00:00
Mihai Alexandru Michis 9154148880 Backed out 4 changesets (bug 1690167) for causing cppunit failures in TestIntegerPrintfMacros.
CLOSED TREE

Backed out changeset 27dee66eba83 (bug 1690167)
Backed out changeset cfffb092a39f (bug 1690167)
Backed out changeset 87b2a2a66fd9 (bug 1690167)
Backed out changeset cac4879f50b4 (bug 1690167)
2021-02-13 00:07:00 +02:00
Mihai Alexandru Michis 02e7dbde25 Bug 1690167 - Fix windows bustages. a=bustage-fix
CLOSED TREE
2021-02-12 23:00:44 +02:00
Mike Hommey 47675f5460 Bug 1690167 - Change VsprintfLiteral/SprintfLiteral to rely on PrintfTarget. r=nika,Gankra,firefox-build-system-reviewers,mhentges
Instead of snprintf.

Because some standalone code uses those functions directly or indirectly,
and PrintfTarget lives in mozglue, they now need to depend on mozglue
instead of mfbt. Except logalloc/replay, which cherry-picks what it
uses.

Differential Revision: https://phabricator.services.mozilla.com/D103730
2021-02-12 20:21:50 +00:00
Mike Hommey 8207cffcad Bug 1690167 - Add support for the hh length modifier in Printf.cpp. r=nika,Gankra
Test cases from TestIntegerPrintfMacros will cover this in the next commit.

Differential Revision: https://phabricator.services.mozilla.com/D103729
2021-02-12 20:21:49 +00:00
Mike Hommey 6c2fd9938a Bug 1690167 - Move Sprintf.h and IntegerPrintfMacros.h next to Printf.h. r=jwalden
Which means they move from MFBT to mozglue.

Differential Revision: https://phabricator.services.mozilla.com/D103728
2021-02-12 20:21:49 +00:00
Markus Stange 8bee4d97d7 Bug 1691121 - Use a more modern way to obtain the thread ID on macOS. r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D104261
2021-02-09 22:39:19 +00:00
Gerald Squelart f3afaa1ce8 Bug 1691504 - ProfileBufferCollector now provides the main profiler buffer's range start - r=canaltinova
ProfileBufferCollector::SamplePositionInBuffer() and BufferRangeStart() need to provide indices in the same main buffer, because they will be used to discard old data (at some previous `SamplePositionInBuffer`) once the `BufferRangeStart` indicates that it is not referenced by the profiler anymore.

Because the periodic sampler uses a local buffer (to avoid allocations and locks), we need to record the special location from the main profiler buffer in ProfileBufferCollector.

Differential Revision: https://phabricator.services.mozilla.com/D104497
2021-02-09 12:21:32 +00:00
Gerald Squelart 3cfdbccd99 Bug 1691353 - Fixed non-MOZ_GECKO_PROFILER build around StackCaptureOptions - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D104500
2021-02-09 12:00:58 +00:00
Alexis Beingessner b4afded0ed Bug 1683439 - Remove suppression for fixed issue. r=KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D104051
2021-02-05 17:22:06 +00:00
Doug Thayer 38b58e62b2 Bug 1690925 - Don't animate the skeleton UI if we're in a fast startup r=mconley,emalysz
This avoids paying a cost for animating the skeleton UI for faster startups.
Slow startups don't seem to be affected, given the data available. This is
likely due to slow startups being dominated by IO.

Differential Revision: https://phabricator.services.mozilla.com/D104118
2021-02-05 16:43:02 +00:00
Mike Hommey 34b72664d0 Bug 1598533 - Add support for %t modifier in PrintfTarget. r=nika,Gankra
Differential Revision: https://phabricator.services.mozilla.com/D103731
2021-02-02 20:16:55 +00:00
Florian Quèze d520574f5c Bug 1690375 - Record markers with partial stacks for flushing pending notifications and marking a style flush as needed, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D103844
2021-02-04 15:13:21 +00:00
Yaron Tausky e50c13a6ff Bug 1682928 - Remove TSan suppression r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D103048
2021-02-04 14:34:56 +00:00
smolnar 5618a307a4 Backed out 5 changesets (bug 1682928) for causing failures in test_eventsourceservice_worker. CLOSED TREE
Backed out changeset d07913a1ae00 (bug 1682928)
Backed out changeset 693d9056779c (bug 1682928)
Backed out changeset 44de49551bc9 (bug 1682928)
Backed out changeset 2fae6d457441 (bug 1682928)
Backed out changeset 5c41e69bed76 (bug 1682928)
2021-02-03 16:59:53 +02:00
Yaron Tausky c316e37e66 Bug 1682928 - Remove TSan suppression r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D103048
2021-02-02 16:02:50 +00:00
Alexis Beingessner 744cc705b3 Bug 1674835 - remove supression for fixed issue. r=decoder
Differential Revision: https://phabricator.services.mozilla.com/D103046
2021-02-02 16:03:14 +00:00
Mike Hommey afe55d2f87 Bug 1689279 - Fix clang-tidy warnings in Printf.cpp. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D103264
2021-02-02 21:18:06 +00:00
Mike Hommey 88b97ce29a Bug 1686831 - Use double-conversion for mozilla::PrintfTarget::cvt_f. r=nika
This makes mozilla::PrintfTarget consistent across all locales (not
printing e.g. "," instead of "." for the decimal point in floats in some
locales)

This implementation passes all the glibc tests in stdio-common/tfformat.c
except two tests because of the difference in how values like e.g 0.25 are
rounded. Printf in glibc and on MacOS, as well as Rust std::fmt, round to
nearest, ties to even. Double-conversion, as well as printf on Windows
and conversion functions in ECMAScript round to nearest, ties away from
zero.

The standard for printf says rounding is implementation-defined so
either way is technically correct.

Differential Revision: https://phabricator.services.mozilla.com/D102699
2021-01-29 04:25:54 +00:00
Mike Hommey 2b96dd066d Bug 1686831 - Allow double-conversion's ToFixed to handle ±DBL_MAX. r=nika
While at this point PrintfTarget doesn't use double-conversion, add a
test that it can (and thus will) handle the largest double output possible
with the default %f precision.

Differential Revision: https://phabricator.services.mozilla.com/D103431
2021-01-29 16:54:03 +00:00
Mike Hommey 38fa1ea7bd Bug 1686831 - Add some more double formatting tests. r=nika
Patch sent upstream. https://sourceware.org/bugzilla/show_bug.cgi?id=27245

Differential Revision: https://phabricator.services.mozilla.com/D103135
2021-01-28 09:48:40 +00:00
Mike Hommey 63d408918e Bug 1686831 - Hook glibc printf tests in TestPrintf.cpp. r=nika,mhoye
It is worth noting that some of these tests fail on Windows for rounding
difference reasons (see later commit from this bug for more details),
and on both Windows and mac for differences in formatting for INFINITY
and NAN. All the tests pass on Linux (since the underlying printf is
currently glibc's).

Differential Revision: https://phabricator.services.mozilla.com/D103133
2021-01-29 06:05:45 +00:00
Mike Hommey c90777d4bf Bug 1686831 - Still apply fillers when no numbers are printed. r=Gankra
The standard for printf says that for integers, the result of converting
zero with an explicit precision of zero shall be no characters. But
flags and width still need to apply.

Differential Revision: https://phabricator.services.mozilla.com/D102696
2021-01-28 09:48:50 +00:00
Mike Hommey 89da5c6b52 Bug 1686831 - Add support for %F and %G, and properly support %n$E. r=nika,Gankra
%F and %G are the same as %f and %g, but using caps for the exponent
indicator, and for "inf"/"nan" for infinity and NaN.

%n$E is the same as %E, but taking the nth argument.

Differential Revision: https://phabricator.services.mozilla.com/D102695
2021-01-28 09:48:43 +00:00
Mike Hommey 8cbd8f2b09 Bug 1686831 - Print out the expected and actual results when failing in TestPrintf. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D103132
2021-01-29 06:03:27 +00:00
Mike Hommey 6779b992a5 Bug 1686831 - Import glibc printf test cases verbatim. r=mhoye
Differential Revision: https://phabricator.services.mozilla.com/D103131
2021-01-28 09:48:53 +00:00
Csoregi Natalia 8db3ebb5da Backed out 9 changesets (bug 1686831) for sanitizer failures on nsTSubstring.cpp. CLOSED TREE
Backed out changeset 0e03d508c8d4 (bug 1686831)
Backed out changeset cf6dd6eab427 (bug 1686831)
Backed out changeset 308000f1e14b (bug 1686831)
Backed out changeset c4d470be0184 (bug 1686831)
Backed out changeset 9751918b1ccb (bug 1686831)
Backed out changeset dd9b7e71dcfb (bug 1686831)
Backed out changeset 486a184530a7 (bug 1686831)
Backed out changeset b64d3e89bf68 (bug 1686831)
Backed out changeset dcc6396e455a (bug 1686831)
2021-01-28 09:55:28 +02:00