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

5043 Коммитов

Автор SHA1 Сообщение Дата
Steve Fink 6d01bcfb5b Bug 1732161 - Remove unused ccType from ShouldMergeZones r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D127012
2021-10-04 23:06:07 +00:00
Steve Fink 92a3ab7479 Bug 1732161 - Pass through explicit ccIsManual to reduce usage of ccType r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D127011
2021-10-04 23:06:07 +00:00
Narcis Beleuzu 3437927335 Backed out changeset 656210ea1124 (bug 1729918) for Bp-hybrid bustages on AvailableMemoryWatcher.cpp . CLOSED TREE 2021-10-04 17:46:18 +03:00
Toshihito Kikuchi b214f47578 Bug 1729918 - Annotate the user interaction state. r=haik
This patch adds a crash annotation named *LastInteractionDuration*, that indicates
the length of the user interaction duration if the crash happen when the user is
inactive.

Differential Revision: https://phabricator.services.mozilla.com/D125718
2021-10-04 13:21:23 +00:00
Marian-Vasile Laza fc8b433cc4 Backed out changeset cda6b6fe842a (bug 1729918) for causing buid bustages. CLOSED TREE 2021-10-04 11:21:01 +03:00
Toshihito Kikuchi 00b6865582 Bug 1729918 - Annotate the user interaction state. r=haik
This patch adds a crash annotation named *LastInteractionDuration*, that indicates
the length of the user interaction duration if the crash happen when the user is
inactive.

Differential Revision: https://phabricator.services.mozilla.com/D125718
2021-10-04 07:01:46 +00:00
Mike Hommey 0679fea995 Bug 1733308 - Fix non-unified builds errors in xpcom/base. r=xpcom-reviewers,mccr8
objdir/dist/include/mozilla/DeferredFinalize.h:30:1: error: unknown type name 'MOZ_NEVER_INLINE'
objdir/dist/include/mozilla/dom/BindingUtils.h:2776:5: error: no matching function for call to 'DeferredFinalize'
xpcom/base/AvailableMemoryTracker.cpp:55,40:: error: expected class name
xpcom/base/AvailableMemoryTracker.cpp:59,3:: error: 'AddRef' marked 'override' but does not override any member functions
xpcom/base/AvailableMemoryTracker.cpp:59,3:: error: 'QueryInterface' marked 'override' but does not override any member functions
xpcom/base/AvailableMemoryTracker.cpp:59,3:: error: 'Release' marked 'override' but does not override any member functions
xpcom/base/AvailableMemoryTracker.cpp:61,29:: error: unknown type name 'nsIHandleReportCallback'
xpcom/base/AvailableMemoryTracker.cpp:65,37:: error: use of undeclared identifier 'KIND_OTHER'
xpcom/base/AvailableMemoryTracker.cpp:65,49:: error: use of undeclared identifier 'UNITS_COUNT_CUMULATIVE'
xpcom/base/AvailableMemoryTracker.cpp:77,1:: error: invalid application of 'sizeof' to an incomplete type 'const QITableEntry []'
xpcom/base/AvailableMemoryTracker.cpp:77,1:: error: static_cast from '(anonymous namespace)::LowEventsReporter *' to 'nsISupports *', which are not related by inheritance, is not allowed
xpcom/base/AvailableMemoryTracker.cpp:77,38:: error: unknown type name 'nsIMemoryReporter'
xpcom/base/AvailableMemoryTracker.cpp:77,38:: error: use of undeclared identifier 'nsIMemoryReporter'
xpcom/base/AvailableMemoryTracker.cpp:187,3:: error: use of undeclared identifier 'RegisterLowMemoryEventsPhysicalDistinguishedAmount'
xpcom/base/AvailableMemoryWatcherWin.cpp:31,47:: error: base class has incomplete type
xpcom/base/AvailableMemoryWatcherWin.cpp:37,3:: error: unknown type name 'NS_DECL_NSIOBSERVER'
xpcom/base/AvailableMemoryWatcherWin.cpp:38,3:: error: 'virtual' can only appear on non-static member functions
xpcom/base/AvailableMemoryWatcherWin.cpp:38,3:: error: expected ';' at end of declaration list
xpcom/base/AvailableMemoryWatcherWin.cpp:38,3:: error: static_assert failed due to requirement 'std::is_convertible<mozilla::nsAvailableMemoryWatcher *, nsINamed *>::value' "nsITimerCallback implementations must also implement nsINamed"
xpcom/base/AvailableMemoryWatcherWin.cpp:39,3:: error: must use 'enum' tag to refer to type 'nsresult' in this scope
xpcom/base/AvailableMemoryWatcherWin.cpp:42,3:: error: must use 'enum' tag to refer to type 'nsresult' in this scope
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: cannot initialize object parameter of type 'mozilla::nsAvailableMemoryWatcherBase' with an expression of type 'mozilla::nsAvailableMemoryWatcher'
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: invalid application of 'sizeof' to an incomplete type 'const QITableEntry []'
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: must use 'enum' tag to refer to type 'nsresult' in this scope
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: static_cast from 'mozilla::nsAvailableMemoryWatcher *' to 'nsINamed *', which are not related by inheritance, is not allowed
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: static_cast from 'mozilla::nsAvailableMemoryWatcher *' to 'nsIObserver *', which are not related by inheritance, is not allowed
xpcom/base/AvailableMemoryWatcherWin.cpp:102,1:: error: static_cast from 'mozilla::nsAvailableMemoryWatcher *' to 'nsITimerCallback *', which are not related by inheritance, is not allowed
xpcom/base/AvailableMemoryWatcherWin.cpp:103,59:: error: 'nsIObserver' does not refer to a value
xpcom/base/AvailableMemoryWatcherWin.cpp:103,59:: error: incomplete type 'nsIObserver' named in nested name specifier
xpcom/base/AvailableMemoryWatcherWin.cpp:140,45:: error: cannot initialize a parameter of type 'nsIObserver *' with an rvalue of type 'mozilla::nsAvailableMemoryWatcher *'
xpcom/base/AvailableMemoryWatcherWin.cpp:140,5:: error: must use 'enum' tag to refer to type 'nsresult' in this scope
xpcom/base/CycleCollectedJSRuntime.cpp:1605,7:: error: use of undeclared identifier 'PR_GetEnv'
xpcom/base/CycleCollectedJSRuntime.cpp:1605:7: error: use of undeclared identifier 'PR_GetEnv'
xpcom/base/DeferredFinalize.cpp:12,15:: error: out-of-line definition of 'DeferredFinalize' does not match any declaration in namespace 'mozilla'
xpcom/base/DeferredFinalize.cpp:12:15: error: out-of-line definition of 'DeferredFinalize' does not match any declaration in namespace 'mozilla'
xpcom/base/MemoryTelemetry.cpp:48,27:: error: unused variable 'kTotalMemoryCollectorTimeout' [-Werror,-Wunused-const-variable]
xpcom/base/MemoryTelemetry.cpp:48:27: error: unused variable 'kTotalMemoryCollectorTimeout' [-Werror,-Wunused-const-variable]
xpcom/base/nsErrorService.cpp:42,21:: error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions]
xpcom/base/nsErrorService.cpp:42,21:: error: use of undeclared identifier 'MakeUnique'; did you mean 'mozilla::MakeUnique'?
xpcom/base/nsErrorService.cpp:42:21: error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions]
xpcom/base/nsErrorService.cpp:42:21: error: use of undeclared identifier 'MakeUnique'; did you mean 'mozilla::MakeUnique'?
xpcom/base/nsMacPreferencesReader.mm:20:12: error: implicit instantiation of undefined template 'nsTSubstring<char16_t>'
xpcom/base/nsMacPreferencesReader.mm:24:60: error: use of undeclared identifier 'NSString'
xpcom/base/nsMacPreferencesReader.mm:24:69: error: expected expression
xpcom/base/nsMacPreferencesReader.mm:26:48: error: unknown type name 'NSArray'
xpcom/base/nsMacPreferencesReader.mm:28:30: error: use of undeclared identifier 'NSString'
xpcom/base/nsMacPreferencesReader.mm:29:30: error: no matching function for call to 'MakeStringSpan'
xpcom/base/nsMacPreferencesReader.mm:29:51: error: instance method '-UTF8String' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
xpcom/base/nsMacPreferencesReader.mm:30:22: error: instance method '-isKindOfClass:' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
xpcom/base/nsMacPreferencesReader.mm:30:37: error: receiver type 'int (*)(int)' is not 'id' or interface pointer, consider casting it to 'id' [-Werror,-Wreceiver-expr]
xpcom/base/nsMacPreferencesReader.mm:30:37: error: use of undeclared identifier 'NSNumber'; did you mean 'isnumber'?
xpcom/base/nsMacPreferencesReader.mm:30:46: error: instance method '-class' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
xpcom/base/nsMacPreferencesReader.mm:31:27: error: cannot initialize a parameter of type 'int64_t' (aka 'long long') with an rvalue of type 'id'
xpcom/base/nsMacPreferencesReader.mm:31:33: error: instance method '-longLongValue' not found (return type defaults to 'id') [-Werror,-Wobjc-method-access]
xpcom/base/nsMacPreferencesReader.mm:32:37: error: use of undeclared identifier 'NSArray'
xpcom/base/nsMacPreferencesReader.mm:34:7: error: no matching function for call to 'EvaluateArray'
xpcom/base/nsMacPreferencesReader.mm:36:37: error: use of undeclared identifier 'NSDictionary'
xpcom/base/nsMacPreferencesReader.mm:38:7: error: no matching function for call to 'EvaluateDict'
xpcom/base/nsMacPreferencesReader.mm:44:60: error: use of undeclared identifier 'NSString'
xpcom/base/nsMacPreferencesReader.mm:44:69: error: expected expression
xpcom/base/nsSystemInfo.cpp:415,35:: error: no template named 'NotNull'; did you mean 'NonNull'?
xpcom/base/nsSystemInfo.cpp:419,25:: error: member reference type 'NonNull<IWSCProductList *>' is not a pointer; did you mean to use '.'?
xpcom/base/nsSystemInfo.cpp:419,27:: error: no member named 'get_Count' in 'mozilla::dom::NonNull<IWSCProductList *>'
xpcom/base/nsSystemInfo.cpp:426,19:: error: member reference type 'NonNull<IWSCProductList *>' is not a pointer; did you mean to use '.'?
xpcom/base/nsSystemInfo.cpp:426,21:: error: no member named 'get_Item' in 'mozilla::dom::NonNull<IWSCProductList *>'
xpcom/base/nsSystemInfo.cpp:484,17:: error: use of undeclared identifier 'ArrayLength'; did you mean 'mozilla::ArrayLength'?
xpcom/base/nsSystemInfo.cpp:484,47:: error: use of undeclared identifier 'ArrayLength'; did you mean 'mozilla::ArrayLength'?
xpcom/base/nsSystemInfo.cpp:487,36:: error: use of undeclared identifier 'ArrayLength'; did you mean 'mozilla::ArrayLength'?
xpcom/base/nsSystemInfo.cpp:500,10:: error: no matching function for call to 'EnumWSCProductList'
xpcom/base/nsSystemInfo.cpp:500,46:: error: use of undeclared identifier 'WrapNotNull'; did you mean 'mozilla::WrapNotNull'?
xpcom/base/nsTraceRefcnt.cpp:313,32:: error: use of undeclared identifier 'MakeUnique'
xpcom/base/nsTraceRefcnt.cpp:313:32: error: use of undeclared identifier 'MakeUnique'
xpcom/base/nsTraceRefcnt.cpp:461,19:: error: no matching member function for call to 'WithEntryHandle'
xpcom/base/nsTraceRefcnt.cpp:461:19: error: no matching member function for call to 'WithEntryHandle'
xpcom/base/nsTraceRefcnt.cpp:468,33:: error: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Werror,-Wc++20-extensions]
xpcom/base/nsTraceRefcnt.cpp:468,33:: error: use of undeclared identifier 'MakeUnique'
xpcom/base/nsTraceRefcnt.cpp:468:33: error: use of undeclared identifier 'MakeUnique'
xpcom/base/nsTraceRefcnt.cpp:736,20:: error: use of undeclared identifier '_write'

Differential Revision: https://phabricator.services.mozilla.com/D127036
2021-10-01 01:49:16 +00:00
Jon Coppeard be7071699c Bug 1730534 - Part 5: Add some basic unit tests for JSHolderMap r=mccr8
Depends on D125431

Differential Revision: https://phabricator.services.mozilla.com/D126668
2021-09-27 16:41:53 +00:00
Jon Coppeard c39e62c312 Bug 1730534 - Part 4: Assert that there's only one JSHolderMap::Iter at any time r=mccr8
This iterator can update the map for removed items so it's not safe to have
more than one live at any one time.

Differential Revision: https://phabricator.services.mozilla.com/D125431
2021-09-27 16:41:53 +00:00
Jon Coppeard 8b44ca7ab5 Bug 1730534 - Part 3: Add an iterator for JSHolderMap r=mccr8
This adds an iterator over JSHolderMap and replaces use of the ForEach method
with it.

Differential Revision: https://phabricator.services.mozilla.com/D125429
2021-09-27 16:41:52 +00:00
Jon Coppeard 283daa1966 Bug 1730534 - Part 2: Add an iterator for JSHolderMap's EntryVector r=mccr8
This replaces use of the ForEach method that takes an EntryVector with an iterator.

Differential Revision: https://phabricator.services.mozilla.com/D125427
2021-09-27 16:41:52 +00:00
Jon Coppeard 94744c89a1 Bug 1731432 - Fix marking of gray roots during compacting GC r=sfink
There's a pretty serious bug in bug 1730140 which is that the check for whether
to trace a zone's gray roots only checks whether it is being marked gray, but
we also need to mark these roots when compacting. This only affects GCs when
we're not collecting the atoms zone though because we mark everything in that
case.

So this is a plausible culprit for the crashes here, which would have been
hidden by bug 1728273 since that made all compacting GCs full GCs.

Differential Revision: https://phabricator.services.mozilla.com/D126509
2021-09-23 15:06:43 +00:00
owlishDeveloper 800e6ffa5d Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-23 01:41:47 +00:00
Noemi Erli 50d4e6c878 Backed out changeset 890d147bad1d (bug 1697866) for causing bustages in WindowGlobalParent.cpp CLOSED TREE 2021-09-23 01:20:43 +03:00
owlishDeveloper 7acebc65af Bug 1697866 - Add HTTPS-only specific error code and pass it to GeckoView, to handle HTTPS-only specific errors correctly r=agi,JulianWels,nika,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D120914
2021-09-22 18:30:39 +00:00
criss b11064abde Merge autoland to mozilla-central. a=merge 2021-09-20 19:11:05 +03:00
Marian-Vasile Laza 248c0cd8b6 Backed out 4 changesets (bug 1730534) for conflicts with backout of bug 1536061. a=backout
Backed out changeset fc881c57d119 (bug 1730534)
Backed out changeset 0f72a8c5f8c5 (bug 1730534)
Backed out changeset 007cbeea4325 (bug 1730534)
Backed out changeset 83d53ed76e0f (bug 1730534)
2021-09-20 13:21:23 +03:00
Marian-Vasile Laza 77d39d312e Backed out 3 changesets (bug 1536061) for conflicts with backout of bug 1730534 a=backout.
Backed out changeset 248ec4a96a70 (bug 1536061)
Backed out changeset 8c9135ac1d10 (bug 1536061)
Backed out changeset 08cdd990b675 (bug 1536061)
2021-09-20 13:20:17 +03:00
Bob Owen 972b41f513 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-20 10:09:01 +00:00
Marian-Vasile Laza 2dcd85644c Backed out changeset a445650b1858 (bug 1730534) for conflicts with backout of Bug 1536061. a=backout 2021-09-20 12:33:23 +03:00
Jon Coppeard 7bec5103e3 Bug 1730534 - Fix release mode assertions so they actually happen in release builds r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D125983
2021-09-17 16:40:54 +00:00
Jon Coppeard 000664fce5 Bug 1536061 - Support tracing gray roots incrementally in the cycle collector r=mccr8
This stores the iterator state between slices to allow us to trace these
incrementally.

Differential Revision: https://phabricator.services.mozilla.com/D125559
2021-09-17 10:00:12 +00:00
Jon Coppeard 113dc2399c Bug 1536061 - Change the gray root trace hook to allow gray roots to be marked incrementally r=sfink,mccr8
This adds a slice budget parameter and boolean return value to indicate whether tracing has finished.

Differential Revision: https://phabricator.services.mozilla.com/D125558
2021-09-17 10:00:11 +00:00
Jon Coppeard 950a08f68d Bug 1730534 - Part 4: Assert that there's only one JSHolderMap::Iter at any time r=mccr8
This iterator can update the map for removed items so it's not safe to have
more than one live at any one time.

Differential Revision: https://phabricator.services.mozilla.com/D125431
2021-09-17 06:33:09 +00:00
Jon Coppeard 7f6acff109 Bug 1730534 - Part 3: Add an iterator for JSHolderMap r=mccr8
This adds an iterator over JSHolderMap and replaces use of the ForEach method
with it.

Differential Revision: https://phabricator.services.mozilla.com/D125429
2021-09-17 06:33:09 +00:00
Jon Coppeard 91dff4dbce Bug 1730534 - Part 2: Add an iterator for JSHolderMap's EntryVector r=mccr8
This replaces use of the ForEach method that takes an EntryVector with an iterator.

Differential Revision: https://phabricator.services.mozilla.com/D125427
2021-09-17 06:33:08 +00:00
Valentin Gosu 72c414923b Bug 1730494 - Add error codes for COOP and COEP errors r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D125671
2021-09-16 08:31:04 +00:00
Marian-Vasile Laza 1cf4af94e5 Backed out 7 changesets (bug 1546154) for causing build bustages on ContentProcess.cpp. CLOSED TREE
Backed out changeset 0bd777eee249 (bug 1546154)
Backed out changeset 611812ee62a2 (bug 1546154)
Backed out changeset cef0aa18a3ab (bug 1546154)
Backed out changeset cfda47fb0a46 (bug 1546154)
Backed out changeset f3e005f5fedc (bug 1546154)
Backed out changeset 7f50fca0c2cd (bug 1546154)
Backed out changeset bbb0b25450f5 (bug 1546154)
2021-09-15 14:12:55 +03:00
Bob Owen 8b6ae95727 Bug 1546154 p3: Explicitly load COM functions from combase.dll to prevent ole32 loading. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D124931
2021-09-15 10:21:04 +00:00
Jens Stutte 87de42e070 Bug 1726813: Ensure AppShutdown remains in sync with shutdown notifications in the parent process. r=xpcom-reviewers,nika,dom-worker-reviewers,asuth
The goal here is to ensure we can always rely on `AppShutdown::GetShutdownPhase` to be in sync with the "real" application status, mainly this was needed for xpcshell tests to not break if we add assertions on our shutdown state on some global singletons.

We keep the existing observer notification topics but force them (on the parent process) to be issued through the new `advanceShutdownPhase` function of the startup service using the `ShutdownPhase` enum. This way we can synchronize `AppShutdown`'s internal status accordingly.

Some further notes:

  # The `MOZ_ASSERT(AppShutdown::IsNoOrLegalShutdownTopic(aTopic));` in `NotifyObservers` helped a lot to identify missing cases. I think we should keep it in order to stay safe.
  # Introducing the `cenum IDLShutdownPhase` helps to keep the knowledge about the mapping from shutdown phases to observer topics exclusively inside AppShutdown.cpp. Still callers must know what they do in order to choose a proper phase, of course.
  # However we must be aware that `AppShutdown` this way can be kept in sync with the shutdown notifications only in the parent process and that `GetCurrentShutdownPhase` might not give the correct result in child processes. We might want to file a follow up bug that adds some asserts to avoid improper use of `AppShutdown` functions in child processes (but I do not want to make this patch bigger as needed to solve the blocking dependency for bug 1697972).
  # The socket process is one example of a child process that "overloads" shutdown topics. I was wondering if it is the right call to use the very same topic names here to request shutdown to the socket process or if it should have its own topics. Those topics triggered the assert and thus I had to disable it for child processes, for now.
  # This goes together with the more general approach to define process type specific shutdown phases (and hence mappings to topics) as drafted very roughly in bug 1697745.
  # This patch seemed to trigger a known intermittent more often, thus the change here in `ServiceWorkerManager`.

Differential Revision: https://phabricator.services.mozilla.com/D124350
2021-09-15 07:25:29 +00:00
Chris Peterson c9530ebe28 Bug 1729598 - Replace MOZ_MUST_USE_TYPE with [[nodiscard]]. r=static-analysis-reviewers,andi
Differential Revision: https://phabricator.services.mozilla.com/D125504
2021-09-15 05:10:51 +00:00
Jon Coppeard fe43168478 Bug 1730140 - Remove the gray root buffer and mark gray roots after the start of collection r=sfink,mccr8
This removes gray root buffering from the first marking slice and traces the
gray roots directly in a later slice. This relies on Heap<T> read barriers
being sufficient to ensure correctness.

This is conservative in that it makes no effort to skip tracing roots added
after the start of GC. It also doesn't trace roots removed after the start of
GC, but this is OK because barriers ensure marking of any observed values.

The gray root tracing callback will be called once per sweep group, which means
we will trace all zone holders and xpconnect gray roots for every group rather
than just once. This should not be a problem in practice as we expect the
number of zones and hence zone groups to decrease with fission.

On the plus side we no longer have to do a virtual dispatch per root traced
(for the buffering tracer), allocate memory for the buffer, or trace each root
twice.

Note that this doesn't make the gray root marking itself incremental yet.

Differential Revision: https://phabricator.services.mozilla.com/D125188
2021-09-14 07:49:39 +00:00
Julian Seward 0dbf2be8a0 Bug 1723945 - nsSystemInfo.cpp: On non-x86_{32,64} Linux, CollectProcessInfo can silently fail and insert junk data into the process. r=nika.
This doesn't happen on any P1 platforms.  It affects all non-x86/x86_64
Linuxes though, in this example, aarch64-linux.  It causes Valgrind runs on
aarch64-linux to report hundreds of errors.  In short, attempts to read
various fields from /proc/cpuinfo fail, because `CollectProcessInfo()` assumes
that it is looking at a /proc/cpuinfo file from a x86_{32,64} target, but its
format is very different on non x86 targets.  Unfortunately the parsing fails,
but the failure is not detected, resulting in the uninitialised fields being
treated as if they contained real data.

The simple fix here is just to give default values for these fields.

Differential Revision: https://phabricator.services.mozilla.com/D123189
2021-09-13 09:43:36 +00:00
Nicklas Boman e07e317034 Bug 1308103 - Replace PL_strcmp/PL_strncmp with strcmp/strncmp in xpcom/ and parser/htmlparser/ r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D123879
2021-09-09 19:36:10 +00:00
Florian Quèze 998adb18ea Bug 1728760 - require all nsITimerCallback native implementations to also implement nsINamed, r=smaug.
Differential Revision: https://phabricator.services.mozilla.com/D124349
2021-09-07 08:01:18 +00:00
Bryce Seager van Dyk 6a1ee36ee9 Bug 1729011 - Change dead link to MDN in nsCOMPtr.h to reference source docs. r=xpcom-reviewers,mccr8 DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D124461
2021-09-03 15:14:01 +00:00
Nazım Can Altınova a38b25b295 Bug 1728544 - Make the MarkerSchema::Format enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124241
2021-09-03 14:30:10 +00:00
Nazım Can Altınova ddae0f7cd6 Bug 1728544 - Make the MarkerSchema::Location enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124240
2021-09-03 14:30:09 +00:00
Florian Quèze c76671a979 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-31 13:41:45 +00:00
Sandor Molnar c235ffd64c Backed out 3 changesets (bug 1727137, bug 1727517, bug 1727756) for causing build bustages. CLOSED TREE
Backed out changeset 8796b374824b (bug 1727756)
Backed out changeset 49d136788ebd (bug 1727517)
Backed out changeset 092525a3d26a (bug 1727137)
2021-08-30 19:39:16 +03:00
Florian Quèze 48ad00f6e2 Bug 1727137 - Require IdleRunnable instances to have a name, r=bas.
Differential Revision: https://phabricator.services.mozilla.com/D123357
2021-08-30 16:09:49 +00:00
Andi-Bogdan Postelnicu 2fc4f70e9b Bug 1725145 - Preparation for the hybrid build env. r=necko-reviewers,firefox-build-system-reviewers,valentin,glandium
Automatically generated path that adds flag `REQUIRES_UNIFIED_BUILD = True` to `moz.build`
when the module governed by the build config file is not buildable outside on the unified environment.

This needs to be done in order to have a hybrid build system that adds the possibility of combing
unified build components with ones that are built outside of the unified eco system.

Differential Revision: https://phabricator.services.mozilla.com/D122345
2021-08-25 10:46:17 +00:00
Kagami Sascha Rosylight eddf271c1f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 10:54:11 +00:00
Iulian Moraru a16afaadfe Backed out changeset d21b3f88a2b4 (bug 1726648) for causing build bustages. CLOSED TREE 2021-08-23 04:12:02 +03:00
Kagami Sascha Rosylight 0c5086660f Bug 1726648 - Add a helper to trim brackets from nsID r=mccr8,smaug
Differential Revision: https://phabricator.services.mozilla.com/D123163
2021-08-23 00:35:40 +00:00
Nicklas Boman a13038925c Bug 1308094 - Remove PL_strdup and PL_strfree from BloatEntry r=xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D122149
2021-08-17 19:34:32 +00:00
Olli Pettay 5beba99004 Bug 1724777, optimize suppressed MicroTask handling, r=mccr8
The test is in theory racy, but trying to limit the cases when it might behave badly
by running it on opt desktop builds only. Without the patch the 'period' check takes over 400ms locally and with the
patch 1-3ms.

The changes are just trying to optimize execution, not change the behavior.
Use of SuppressedMicroTasks is perhaps a bit odd, but it helps keeping
SavedMicroTaskQueue and similar code simple.

Differential Revision: https://phabricator.services.mozilla.com/D122290
2021-08-12 16:01:08 +00:00
Haik Aftandilian 0e54896e07 Bug 1723604 - Patch 2 - Include memory_watcher data in Mac event pings r=mac-reviewers,bradwerth
Record duration of memory pressure periods in event pings using the support added in bug 1715858.

Differential Revision: https://phabricator.services.mozilla.com/D121795
2021-08-05 06:07:39 +00:00
Haik Aftandilian f54ac2b7c4 Bug 1723604 - Patch 1 - Refactor the MacMemoryPressureLevel enum into a basic class r=mac-reviewers,bradwerth
Differential Revision: https://phabricator.services.mozilla.com/D121794
2021-08-05 06:07:39 +00:00
Molly Howell a0c6decba2 Bug 1709969 Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Differential Revision: https://phabricator.services.mozilla.com/D117244
2021-07-30 19:09:47 +00:00
Sandor Molnar 1aa5913c7d Backed out 3 changesets (bug 1709969) for causing xpc failures in test_select_profile_package. CLOSED TREE
Backed out changeset 17ed7ca86998 (bug 1709969)
Backed out changeset a6b917838765 (bug 1709969)
Backed out changeset 6a80559a4055 (bug 1709969)
2021-07-30 21:26:09 +03:00
Molly Howell ba09a654e2 Bug 1709969 Part 3 - Migrate from an existing profile when creating the dedicated profile for a Windows app package. r=mossop,agashlin
Differential Revision: https://phabricator.services.mozilla.com/D117244
2021-07-30 17:34:26 +00:00
Haik Aftandilian 66b55bf012 Bug 1714382 - Include the Mac memory pressure state in crash reports r=spohl,KrisWright
Subscribe to memory pressure events on macOS and add crash report annotations to parent and content process crash reports that can be used to determine if the system was under memory pressure at the time of the crash.

Include the memory pressure level reported via the DISPATCH_SOURCE_TYPE_MEMORYPRESSURE dispatch with timestamps of transitions, the memory pressure level as read from the kern.memorystatus_vm_pressure_level sysctl, and a measurement of the percentage of available memory in the system read from the kern.memorystatus_level sysctl.

Differential Revision: https://phabricator.services.mozilla.com/D116725
2021-07-27 16:17:43 +00:00
Iulian Moraru ee9e1dd7c0 Backed out changeset 4f0fe70a0e34 (bug 1714382) for causing assertion failures on nsCycleCollector.cpp. CLOSED TREE 2021-07-27 02:48:53 +03:00
Haik Aftandilian b00b0d585c Bug 1714382 - Include the Mac memory pressure state in crash reports r=spohl,KrisWright
Subscribe to memory pressure events on macOS and add crash report annotations to parent and content process crash reports that can be used to determine if the system was under memory pressure at the time of the crash.

Include the memory pressure level reported via the DISPATCH_SOURCE_TYPE_MEMORYPRESSURE dispatch with timestamps of transitions, the memory pressure level as read from the kern.memorystatus_vm_pressure_level sysctl, and a measurement of the percentage of available memory in the system read from the kern.memorystatus_level sysctl.

Differential Revision: https://phabricator.services.mozilla.com/D116725
2021-07-26 22:52:33 +00:00
Toshihito Kikuchi 7237c89b3d Bug 1715858 - Part3. Add a new category memory_watcher to the event ping. r=KrisWright
The new event is recoreded when we detect the system's memory is no longer low.
Each event object contains three numbers:

  1) how many times a tab was unloaded during the low-memory situation
  2) how many memory-pressure events were dispatched during the low-memory
     situation
  3) how long we were in the low-memory situation in seconds

These need to be collected as the event ping because the memory situation
may repeatedly be switched between low-memory and high-memory.  We want to
collect it every time the memory situation gets back to normal.  If we collect
it as the main ping (like Histogram), all numbers are summed up and we cannot
evaluate each low-memory period.

Differential Revision: https://phabricator.services.mozilla.com/D120021
2021-07-22 21:15:01 +00:00
Toshihito Kikuchi 5b5b5faee4 Bug 1720503 - Start a timer when the physical memory is low but the commit space is not low. r=haik,KrisWright
When the physical memory is low, Windows OS triggers the memory notification callback,
but we don't take any action if the commit space is not low because it is not the case
of a potential OOM crash.  The problem is in that case, we unregister the wait handle
and exit from the callback.  This means we lose a way to watch memory after that.

The proposed fix is to start a timer before exiting the callback.  We could re-register
the callback, but it could be triggered too quickly if the low-physical-but-high-commit-space
situation lasts long.  After the timer starts, the first timer handler (interval: 10 sec)
checks the commit space again, and if the commit space is still not low at that time,
we re-register the callback and stop the timer.

One tricky situation we need to consider is we don't actually start the timer while
the user is inactive.  In that case, we mark the flag `mNeedToRestartTimerOnUserInteracting`
and start the timer when the user becomes active later.  With that, `OnHighMemory` can
be executed even when we didn't in the low-memory situation.  So we need to check another
flag `mUnderMemoryPressure` and record the telemetry and send a memory-pressure-stop event
only when we were in the low-memory situation.

Differential Revision: https://phabricator.services.mozilla.com/D120022
2021-07-22 01:35:43 +00:00
Emilio Cobos Álvarez 08dccdd536 Bug 1721347 - Add OS theme info to about:support. r=Gijs,fluent-reviewers
I'm not sure what information would be useful in other OSes, so ifdef
the row for GTK for now, but I made this trivial to show in Windows /
macOS / Android as soon as they return useful information.

Differential Revision: https://phabricator.services.mozilla.com/D120331
2021-07-20 20:09:09 +00:00
Florian Quèze 292c1a1f60 Bug 1720368 - Remove MOZ_GECKO_PROFILER ifdefs around profiler_init and profiler_shutdown calls, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D119809
2021-07-15 22:04:23 +00:00
Tom Ritter 1b9b6b72db Bug 1666222: Cut over a ton of NowUnfuzzed calls -> Now 4/5 r=smaug,extension-reviewers,zombie
With Fuzzyfox removed, Now() does what NowUnfuzzed() did.

Differential Revision: https://phabricator.services.mozilla.com/D119639
2021-07-14 18:18:17 +00:00
Tooru Fujisawa cc92ef732d Bug 1708448 - Move property and element functions into js/public/PropertyAndElement.h. r=nbp
Differential Revision: https://phabricator.services.mozilla.com/D119619
2021-07-13 11:52:42 +00:00
Jan de Mooij 59f8590115 Bug 1719795 part 5 - Change JSCLASS_PRIVATE_IS_NSISUPPORTS JSClasses to use a reserved slot instead. r=mccr8,jonco
This is a step towards removing object private slots.

Classes with JSCLASS_PRIVATE_IS_NSISUPPORTS now use JSCLASS_SLOT0_IS_NSISUPPORTS
instead. For most classes this means we need to add an extra reserved slot and remove
the private slot.

Global objects (SimpleGlobalObject and the XPConnect BackstagePass and Sandbox globals)
however can use the JSCLASS_GLOBAL_APPLICATION_SLOTS already there. These slots were
only used for WebIDL DOM globals until now.

Differential Revision: https://phabricator.services.mozilla.com/D119502
2021-07-13 09:31:34 +00:00
Adam Gashlin 0e4dea8f8d Bug 1709131 - Report whether the current process has a package identity. r=mhowell
Differential Revision: https://phabricator.services.mozilla.com/D114427
2021-07-12 19:08:10 +00:00
Toshihito Kikuchi 67f9ed45ff Bug 1701368 - Part7: Add GTest to test nsAvailableMemoryWatcher. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D117675
2021-07-06 22:31:00 +00:00
Toshihito Kikuchi ee072f14eb Bug 1701368 - Part6: Tab unloading precedes memory pressure events. r=gsvelto
This is the main part to address bug 1701368.

Before this patch, `nsAvailableMemoryWatcher` directly broadcasted a memory-pressure
event when we enter into a low-memory situation and `TabUnloader` unloaded a tab in
response to the memory-pressure message.  We want to decouple `TabUnloader` from
memory-pressure listeners because unloading a tab may solve a low-memory situation
alone.

With this patch, if `nsAvailableMemoryWatcher` detects a low-memory situation,
it invokes `TabUnloader` synchronously via an XPCOM interface.  If `TabUnloader`
unloads a tab, we don't do any further action.  If there is no discardable tab,
`TabUnloader` notifies back `nsAvailableMemoryWatcher` via another XPCOM interface,
so that `nsAvailableMemoryWatcher` can notify of a memory-pressure event.

Differential Revision: https://phabricator.services.mozilla.com/D117673
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi 02f0a6ddd5 Bug 1701368 - Part5: Convert nsAvailableMemoryWatcher to an XPCOM object. r=gsvelto
This patch introduces an XPCOM object which is represented by the single instance of
`nsAvailableMemoryWatcherBase` so that `nsAvailableMemoryWatcher` can synchronously
access `TabUnloader`.

We currently implement a watcher class for Windows only.  For other platforms, what
we need to do is to define a class inherinting `nsAvailableMemoryWatcherBase` and
a simple factory method `CreateAvailableMemoryWatcher()` returning an instance of
that class.

Differential Revision: https://phabricator.services.mozilla.com/D118393
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi b2ce1b976f Bug 1701368 - Part4: Make the nsAvailableMemoryWatcher timer commit-space driven. r=gsvelto
This patch removes dependency on the available physical memory.
With this patch, `nsAvailableMemoryWatcher` triggers `OnLowMemory` when the available
commit space is low, and triggers `OnHighMemory` when the available commit space is
no longer low.

The key part of this change is the `if` block in `nsAvailableMemoryWatcher::Notify`,
where we use a single condition `IsCommitSpaceLow()` to declare either Low or High.

After this change, `OnLowMemory` is called not only in the main thread but also in
a worker thread.  So `StartPollingIfUserInteracting` also needs a lock to protect
`mPolling`.

Differential Revision: https://phabricator.services.mozilla.com/D117672
2021-07-06 22:30:59 +00:00
Toshihito Kikuchi b3df452cb8 Bug 1701368 - Part3: Remove the MemPressure_Ongoing request. r=gsvelto
We had `NS_DispatchMemoryPressure` and `NS_DispatchEventualMemoryPressure`
to dispatch a memory-pressure event which took `MemPressure_New` and
`MemPressure_Ongoing` to translate into "low-memory" and "low-memory-ongoing"
message respectively.

With that model, we could end up sending a wrong message if somebody
called the API with `MemPressure_Ongoing` without sending `MemPressure_New`.
To avoid that, this patch removes `MemPressure_Ongoing` and makes
the API decide whether it should dispatch a "new" event or "ongoing" event.

Differential Revision: https://phabricator.services.mozilla.com/D119122
2021-07-06 22:30:58 +00:00
Toshihito Kikuchi 6ba57254e3 Bug 1701368 - Part2: Clean up nsAvailableMemoryWatcher. r=gsvelto
1. Use `nsAutoHandle` instead of a raw `HANDLE`
2. Add a dtor with `MOZ_ASSERT`
3. Prevent double init
4. Cache `nsAvailableMemoryWatcher::mObserverSvc`

Differential Revision: https://phabricator.services.mozilla.com/D117670
2021-07-06 22:30:58 +00:00
Toshihito Kikuchi 44c4164368 Bug 1701368 - Part1: Extract nsAvailableMemoryWatcher as AvailableMemoryWatcherWin.cpp. r=gsvelto
This patch splits `nsAvailableMemoryWatcher` into 1) an nsISupports-derived class
`nsAvailableMemoryWatcherBase` and 2) a platform-specific class `nsAvailableMemoryWatcher`,
taking out the 2) part as a new file AvailableMemoryWatcherWin.cpp without any change.

Test cases for `nsAvailableMemoryWatcher` will be added by a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117669
2021-07-06 22:30:57 +00:00
Butkovits Atila 785829138d Backed out 7 changesets (bug 1701368) for causing build bustages on TestMemoryPressure.cpp. CLOSED TREE
Backed out changeset 3be9f410b666 (bug 1701368)
Backed out changeset 907317341862 (bug 1701368)
Backed out changeset 38fb1e114a53 (bug 1701368)
Backed out changeset f3a475931a13 (bug 1701368)
Backed out changeset 98046adfc310 (bug 1701368)
Backed out changeset d773413513cf (bug 1701368)
Backed out changeset feca7daa9c96 (bug 1701368)
2021-07-07 00:21:34 +03:00
Toshihito Kikuchi 7868eaa3d1 Bug 1701368 - Part7: Add GTest to test nsAvailableMemoryWatcher. r=gsvelto
Differential Revision: https://phabricator.services.mozilla.com/D117675
2021-07-06 18:59:10 +00:00
Toshihito Kikuchi 37bb76635c Bug 1701368 - Part6: Tab unloading precedes memory pressure events. r=gsvelto
This is the main part to address bug 1701368.

Before this patch, `nsAvailableMemoryWatcher` directly broadcasted a memory-pressure
event when we enter into a low-memory situation and `TabUnloader` unloaded a tab in
response to the memory-pressure message.  We want to decouple `TabUnloader` from
memory-pressure listeners because unloading a tab may solve a low-memory situation
alone.

With this patch, if `nsAvailableMemoryWatcher` detects a low-memory situation,
it invokes `TabUnloader` synchronously via an XPCOM interface.  If `TabUnloader`
unloads a tab, we don't do any further action.  If there is no discardable tab,
`TabUnloader` notifies back `nsAvailableMemoryWatcher` via another XPCOM interface,
so that `nsAvailableMemoryWatcher` can notify of a memory-pressure event.

Differential Revision: https://phabricator.services.mozilla.com/D117673
2021-07-06 18:59:10 +00:00
Toshihito Kikuchi 42a8a18b8f Bug 1701368 - Part5: Convert nsAvailableMemoryWatcher to an XPCOM object. r=gsvelto
This patch introduces an XPCOM object which is represented by the single instance of
`nsAvailableMemoryWatcherBase` so that `nsAvailableMemoryWatcher` can synchronously
access `TabUnloader`.

We currently implement a watcher class for Windows only.  For other platforms, what
we need to do is to define a class inherinting `nsAvailableMemoryWatcherBase` and
a simple factory method `CreateAvailableMemoryWatcher()` returning an instance of
that class.

Differential Revision: https://phabricator.services.mozilla.com/D118393
2021-07-06 18:59:09 +00:00
Toshihito Kikuchi 8388201ef2 Bug 1701368 - Part4: Make the nsAvailableMemoryWatcher timer commit-space driven. r=gsvelto
This patch removes dependency on the available physical memory.
With this patch, `nsAvailableMemoryWatcher` triggers `OnLowMemory` when the available
commit space is low, and triggers `OnHighMemory` when the available commit space is
no longer low.

The key part of this change is the `if` block in `nsAvailableMemoryWatcher::Notify`,
where we use a single condition `IsCommitSpaceLow()` to declare either Low or High.

After this change, `OnLowMemory` is called not only in the main thread but also in
a worker thread.  So `StartPollingIfUserInteracting` also needs a lock to protect
`mPolling`.

Differential Revision: https://phabricator.services.mozilla.com/D117672
2021-07-06 18:59:09 +00:00
Toshihito Kikuchi 238b1bf932 Bug 1701368 - Part3: Remove the MemPressure_Ongoing request. r=gsvelto
We had `NS_DispatchMemoryPressure` and `NS_DispatchEventualMemoryPressure`
to dispatch a memory-pressure event which took `MemPressure_New` and
`MemPressure_Ongoing` to translate into "low-memory" and "low-memory-ongoing"
message respectively.

With that model, we could end up sending a wrong message if somebody
called the API with `MemPressure_Ongoing` without sending `MemPressure_New`.
To avoid that, this patch removes `MemPressure_Ongoing` and makes
the API decide whether it should dispatch a "new" event or "ongoing" event.

Differential Revision: https://phabricator.services.mozilla.com/D119122
2021-07-06 18:59:08 +00:00
Toshihito Kikuchi 9f5d899015 Bug 1701368 - Part2: Clean up nsAvailableMemoryWatcher. r=gsvelto
1. Use `nsAutoHandle` instead of a raw `HANDLE`
2. Add a dtor with `MOZ_ASSERT`
3. Prevent double init
4. Cache `nsAvailableMemoryWatcher::mObserverSvc`

Differential Revision: https://phabricator.services.mozilla.com/D117670
2021-07-06 18:59:08 +00:00
Toshihito Kikuchi 9dd46ef933 Bug 1701368 - Part1: Extract nsAvailableMemoryWatcher as AvailableMemoryWatcherWin.cpp. r=gsvelto
This patch splits `nsAvailableMemoryWatcher` into 1) an nsISupports-derived class
`nsAvailableMemoryWatcherBase` and 2) a platform-specific class `nsAvailableMemoryWatcher`,
taking out the 2) part as a new file AvailableMemoryWatcherWin.cpp without any change.

Test cases for `nsAvailableMemoryWatcher` will be added by a subsequent patch.

Differential Revision: https://phabricator.services.mozilla.com/D117669
2021-07-06 18:59:07 +00:00
Florian Quèze cd399a71a2 Bug 1717991 - Remove ifdefs around code that adds profiler markers with custom marker schemas, r=gerald.
Differential Revision: https://phabricator.services.mozilla.com/D118680
2021-06-25 13:28:01 +00:00
Toshihito Kikuchi b293d8345b Bug 1718074 - Early return from the callback when the object was shut down. r=gsvelto
`nsAvailableMemoryWatcher::mTimer` was nullptr when `LowMemoryCallback()` tried to
initialize a timer via `OnLowMemory()`.  There are two possible reasons.

The first case is that NS_NewTimer() returned nullptr because the available memory was
already low when initializing `nsAvailableMemoryWatcher`.  In this case, we should not
register the callback.

The second case is the low-memory callback was queued while shutting down
`nsAvailableMemoryWatcher` (just before we unregiter the callback).  We do refcount
the object and use the mutex correctly, but we touch the nulled out member.  We should
make an early return if the object was shut down.

Differential Revision: https://phabricator.services.mozilla.com/D118745
2021-06-24 19:31:29 +00:00
R Aravind 4e0ddca83e Bug 1713525 - removed 'else' after 'return'. r=gerald
- added 'return true' for non null stream
- removed 'else' and 'return stream != nullptr'

Differential Revision: https://phabricator.services.mozilla.com/D118289
2021-06-21 15:33:01 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Gabriele Svelto 0c7c411099 Bug 1715026 - Properly transfer ownership of the memory pressure watcher to the memory resource callback r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D117051
2021-06-12 05:54:01 +00:00
Jon Coppeard 39dcc0ea21 Bug 1714561 - Allow single-zone JS holders to contain pointers into the atoms zone r=mccr8,sfink
Differential Revision: https://phabricator.services.mozilla.com/D116848
2021-06-07 15:19:29 +00:00
Edgar Chen c80e2f09d3 Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-06-01 13:10:48 +00:00
Edgar Chen 8effa3808d Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-06-01 13:10:48 +00:00
Edgar Chen b4a690870e Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-06-01 13:10:47 +00:00
Edgar Chen 2f19ad2de5 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-06-01 13:10:47 +00:00
Edgar Chen 79a3f4a3a1 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-06-01 13:10:46 +00:00
Edgar Chen bededd95ac Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-06-01 13:10:46 +00:00
Edgar Chen 7664189944 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-06-01 13:10:46 +00:00
Sandor Molnar 7b1d598d24 Backed out 7 changesets (bug 1712930) for causing damp failures. CLOSED TREE
Backed out changeset 4a03c8b2aa1a (bug 1712930)
Backed out changeset 311ccf17a01d (bug 1712930)
Backed out changeset c42f2270b5f8 (bug 1712930)
Backed out changeset b117c37b1e7e (bug 1712930)
Backed out changeset dd0ab5fc70a0 (bug 1712930)
Backed out changeset ab9bb2ee0c98 (bug 1712930)
Backed out changeset ec01575cb276 (bug 1712930)
2021-05-31 20:29:32 +03:00
Edgar Chen 529a31571f Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-05-31 12:57:18 +00:00
Edgar Chen bd505df613 Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-05-31 12:57:17 +00:00
Edgar Chen 71290465e8 Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-05-31 12:57:17 +00:00
Edgar Chen 8fdabf5210 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-05-31 12:57:16 +00:00
Edgar Chen fa6e0c0091 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-05-31 12:57:16 +00:00
Edgar Chen a55011f761 Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-05-31 12:57:16 +00:00
Edgar Chen b615b3fa01 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-31 12:57:15 +00:00
Toshihito Kikuchi 718f8615db Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 22:35:59 +00:00
Noemi Erli e1fde28a85 Backed out 7 changesets (bug 1712930) for causing Android mochitest failures in test_onerror_message.html
Backed out changeset 4b93e808e72f (bug 1712930)
Backed out changeset f1cb609c78a0 (bug 1712930)
Backed out changeset 36e48f6e43ae (bug 1712930)
Backed out changeset b2da173c9337 (bug 1712930)
Backed out changeset d2eb6df1ec5f (bug 1712930)
Backed out changeset 78e1d6847f0a (bug 1712930)
Backed out changeset 6f842a2bf026 (bug 1712930)
2021-05-29 01:30:47 +03:00
Edgar Chen 7b47184b2c Bug 1712930 - Part 7: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_BE_OPENED; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116081
2021-05-28 21:12:13 +00:00
Edgar Chen 18ac9679bb Bug 1712930 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_SENDING; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116080
2021-05-28 21:12:13 +00:00
Edgar Chen 5b4acdb4c5 Bug 1712930 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_RESPONSE_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116079
2021-05-28 21:12:12 +00:00
Edgar Chen a60d37c138 Bug 1712930 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_MUST_NOT_BE_LOADING_OR_DONE_OVERRIDE_MIME_TYPE; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116078
2021-05-28 21:12:12 +00:00
Edgar Chen 582f4e1fe3 Bug 1712930 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSEXML; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116077
2021-05-28 21:12:12 +00:00
Edgar Chen ffe19c6879 Bug 1712930 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_HAS_WRONG_RESPONSETYPE_FOR_RESPONSETEXT; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116076
2021-05-28 21:12:11 +00:00
Edgar Chen b070511ab0 Bug 1712930 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_XHR_CHUNKED_RESPONSETYPES_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D116075
2021-05-28 21:12:10 +00:00
Alexandru Michis 8fbcd44dc4 Backed out 9 changesets (bug 1695817) for causing bc failures in content/aboutThirdParty.js
CLOSED TREE

Backed out changeset 6b7f451e911e (bug 1695817)
Backed out changeset ad3ea67b3d70 (bug 1695817)
Backed out changeset b4f971059f3f (bug 1695817)
Backed out changeset 9c9a928d4a70 (bug 1695817)
Backed out changeset 4a9bcb38fddf (bug 1695817)
Backed out changeset 48c0eed38628 (bug 1695817)
Backed out changeset 7583675dccb1 (bug 1695817)
Backed out changeset e3f2bed63c33 (bug 1695817)
Backed out changeset 1c45ba4fba61 (bug 1695817)
2021-05-28 21:53:41 +03:00
Toshihito Kikuchi ad10c6f549 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 15:32:31 +00:00
Butkovits Atila 3735a33d14 Backed out 9 changesets (bug 1695817) for causing build bustages. CLOSED TREE
Backed out changeset 49be1caf6501 (bug 1695817)
Backed out changeset 30f1382d6058 (bug 1695817)
Backed out changeset ab9fa7f3b633 (bug 1695817)
Backed out changeset b03b122438cc (bug 1695817)
Backed out changeset 812a6bbfbe0e (bug 1695817)
Backed out changeset 3551230a7522 (bug 1695817)
Backed out changeset c7354b48fbee (bug 1695817)
Backed out changeset 4860450c2e23 (bug 1695817)
Backed out changeset 29dee289f866 (bug 1695817)
2021-05-28 07:52:30 +03:00
Toshihito Kikuchi 562f126952 Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-28 04:19:07 +00:00
Butkovits Atila 711401ea39 Backed out 9 changesets (bug 1695817) for causing failures at browser_all_files_referenced.js. CLOSED TREE
Backed out changeset df4086427aaf (bug 1695817)
Backed out changeset 119a24f8be08 (bug 1695817)
Backed out changeset fd277ae2a7b8 (bug 1695817)
Backed out changeset a2c86a645fa8 (bug 1695817)
Backed out changeset c73705233fc4 (bug 1695817)
Backed out changeset 0a80eea3c0fa (bug 1695817)
Backed out changeset 9af42c7a3ca7 (bug 1695817)
Backed out changeset a2d11a0849d5 (bug 1695817)
Backed out changeset ba3ddcc28cbf (bug 1695817)
2021-05-28 03:05:09 +03:00
Toshihito Kikuchi e8ef8d92ad Bug 1695817 - Part 6: Show name and publisher of an application owning a module. r=Gijs,fluent-reviewers,mhowell
This patch adds application info (Name and Publisher for now) in the
about:third-party page if a module is a part of an installed application,
which is registered in the registry and shown in Windows Control Panel.
To achieve this, we parse the registry to collect installed applications
in the background task.

Differential Revision: https://phabricator.services.mozilla.com/D109306
2021-05-27 21:14:14 +00:00
Peter Van der Beken 3956d16cb3 Bug 1712725 - Disallow using HoldJSObjects/DropJSObjects for non-nsISupports classes that don't have a CC participant. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D116018
2021-05-27 08:35:41 +00:00
Peter Van der Beken af93c19a09 Bug 1712725 - Pass the correct object to mozilla::DropJSObjects. r=mccr8
Various code was passing 'this' to mozilla::DropJSObjects in unlink, but that's
the CC participant. The right object to pass is 'tmp'. I also added static
asserts in mozilla::Hold/DropJSObjects to block this in the future.

Differential Revision: https://phabricator.services.mozilla.com/D115884
2021-05-27 08:35:40 +00:00
Toshihito Kikuchi 96cdb7c193 Bug 1712693 - Generate a memory report when we detect a low-memory situation. r=gsvelto
This patch reinstate the code to call `SaveMemoryReport` when we enter a low-memory
situation from a normal state, which was removed by bug 1586236.

Differential Revision: https://phabricator.services.mozilla.com/D115960
2021-05-26 17:12:25 +00:00
Gabriele Svelto 1bbc08dfb1 Bug 1712084 - Keep alive the available memory tracker during shutdown r=tkikuchi
Differential Revision: https://phabricator.services.mozilla.com/D115599
2021-05-26 13:15:27 +00:00
Edgar Chen eb9e50c536 Bug 1712861 - Get rid of NS_ERROR_DOM_INVALID_ACCESS_XHR_TIMEOUT_AND_RESPONSETYPE_UNSUPPORTED_FOR_SYNC; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D115946
2021-05-26 12:12:09 +00:00
Toshihito Kikuchi 0b6b4d9629 Bug 1711610 - Should not trigger the memory pressure event if the available commit space is not low. r=gsvelto
After bug 1586236, we use the memory resource notification object to detect a low
memory situation on Windows, which is signaled when the available physical memory
is low.  If the available physical memory is low, however, it's possible that there
is still commit space enough for the application to run.  In such a situation, we
don't want to make aggressive efforts to reduce memory usage.

This patch makes sure we send the memory pressure event (both New and Ongoing) only
when the available commit space is lower than the threshold value defined by the pref
"browser.low_commit_space_threshold_mb".  Its default value is set to 200MB
based on our telemetry data indicating ~60% of OOM crashes with <100MB, ~75% with <300MB.

To use the pref in `nsAvailableMemoryWatcher`, this patch moves the call to
`AvailableMemoryTracker::Init()` to `XRE_mainRun()`.  It was in `NS_InitXPCOM`
because the old initialization code hooked APIs and needed to be done while
the process has only one thread (bug 741540).  The current `AvailableMemoryTracker`
does not use hooks, so it doesn't have to be initialized that early.

Differential Revision: https://phabricator.services.mozilla.com/D115605
2021-05-24 21:29:46 +00:00
Agi Sferro 114966c6e0 Bug 1701269 - Remove mobile/android/base. r=nalexander,flod,owlish
Differential Revision: https://phabricator.services.mozilla.com/D109918
2021-05-20 22:03:03 +00:00
Edgar Chen 72168631b0 Bug 1710845 - Get rid of NS_ERROR_DOM_INVALID_EXPRESSION_ERR; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114967
2021-05-12 23:32:38 +00:00
Edgar Chen acf4edd8ea Bug 1710840 - Part 2: Get rid of NS_ERROR_DOM_SVG_WRONG_TYPE_ERR; r=smaug
Depends on D114964

Differential Revision: https://phabricator.services.mozilla.com/D114965
2021-05-12 23:32:38 +00:00
Edgar Chen c681831600 Bug 1710840 - Part 1: Get rid of NS_ERROR_DOM_SVG_MATRIX_NOT_INVERTABLE; r=smaug;
Differential Revision: https://phabricator.services.mozilla.com/D114964
2021-05-12 23:32:37 +00:00
Edgar Chen f10ffb593c Bug 1709217 - Part 6: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_VALUE; r=smaug
Depends on D114185

Differential Revision: https://phabricator.services.mozilla.com/D114186
2021-05-11 19:38:46 +00:00
Edgar Chen 22ee127c8b Bug 1709217 - Part 5: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_SUPPORTED; r=smaug
Depends on D114184

Differential Revision: https://phabricator.services.mozilla.com/D114185
2021-05-11 19:38:46 +00:00
Edgar Chen 0362d20990 Bug 1709217 - Part 4: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_STATE; r=smaug
Depends on D114183

Differential Revision: https://phabricator.services.mozilla.com/D114184
2021-05-11 19:38:45 +00:00
Edgar Chen d1ca0306a2 Bug 1709217 - Part 3: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_INDETERM; r=smaug
Depends on D114182

Differential Revision: https://phabricator.services.mozilla.com/D114183
2021-05-11 19:38:45 +00:00
Edgar Chen b6a7d80197 Bug 1709217 - Part 2: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_QUERY_COMMAND_ENABLED; r=smaug
Depends on D114181

Differential Revision: https://phabricator.services.mozilla.com/D114182
2021-05-11 19:38:44 +00:00
Edgar Chen 567d46362c Bug 1709217 - Part 1: Get rid of NS_ERROR_DOM_INVALID_STATE_DOCUMENT_EXEC_COMMAND; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114181
2021-05-11 19:38:44 +00:00
Edgar Chen f8605ff45d Bug 1709214 - Get rid of NS_ERROR_DOM_ANIM_MISSING_PROPS_ERR; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D114179
2021-05-10 12:20:17 +00:00
Andi-Bogdan Postelnicu eab549fd19 Bug 1519636 - Initial reformat of C/C++ code with clang-format version 12.0.0. r=sylvestre
clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D114211
2021-05-10 07:15:07 +00:00
Jon Coppeard 52d33f4288 Bug 1709849 - Replace use of JSGCInvocationKind with JS::GCOptions in the browser r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D114512
2021-05-07 07:39:50 +00:00
Jens Stutte f2f68509d3 Bug 1690326: Add mappings for ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL and remove error NS_ERROR_FILE_DISK_FULL in favor of existing NS_ERROR_FILE_NO_DEVICE_SPACE r=xpcom-reviewers,necko-reviewers,nika,valentin
Win32 errors ERROR_DEVICE_HARDWARE_ERROR, ERROR_DEVICE_NOT_CONNECTED, ERROR_DISK_FULL need a mapping.
NS_ERROR_FILE_DISK_FULL is duplicate to NS_ERROR_FILE_NO_DEVICE_SPACE
Drive by: RejectJSPromise lacked some NS_ERROR_* mappings

Differential Revision: https://phabricator.services.mozilla.com/D113974
2021-05-06 14:00:06 +00:00
Toshihito Kikuchi fee87c9b39 Bug 1705579 - Skip WinIOAutoObservation if TLS is not available. r=gerald,aklotz
We hook several file APIs to record I/O performance data.  Since TLS is not
allocated in ntdll's loader worker thread, however, if someone does a file
operation, we hit read AV because `WinIOAutoObservation` uses `nsString` and
a thread local variable.

Currently we can see this crash happens only when a DLL rule of AppLocker is
defined, but theoretically this can happen when any module loaded in a worker
thread does file operation in its entrypoint.

The proposed fix is to skip `WinIOAutoObservation` if TLS is not available.

Differential Revision: https://phabricator.services.mozilla.com/D113032
2021-05-05 17:00:09 +00:00
Steve Fink 600f475b8f Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-28 16:37:32 +00:00
Valentin Gosu de35210ee3 Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-28 09:33:46 +00:00
Cosmin Sabou 6be9f38faa Backed out changeset a89d4817a3cf (bug 1703374) for causing bustages and SliceBudget related crashes. CLOSED TREE 2021-04-27 02:09:01 +03:00
Steve Fink a559ffee38 Bug 1703374 - Provide SliceBudget users with more control of when and how often time checks happen r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D111008
2021-04-26 22:38:31 +00:00
Narcis Beleuzu 33cc31099d Backed out 8 changesets (bug 1574475, bug 1699222) for build bustages on moz.build . CLOSED TREE
Backed out changeset 6c2c039872b3 (bug 1574475)
Backed out changeset 8a2a04743c5f (bug 1699222)
Backed out changeset 9437c60798d6 (bug 1574475)
Backed out changeset 7ef1884ac11b (bug 1574475)
Backed out changeset ec8c237d5298 (bug 1574475)
Backed out changeset 4a760b3f5d53 (bug 1574475)
Backed out changeset b229b0eea1e7 (bug 1574475)
Backed out changeset 03d34a2f10a6 (bug 1574475)
2021-04-22 18:10:59 +03:00
Valentin Gosu db2d8bb0bc Bug 1574475 - Remove FTP error codes r=necko-reviewers,dragana
Differential Revision: https://phabricator.services.mozilla.com/D111249
2021-04-22 13:41:34 +00:00
Gerald Squelart d67d35f1e3 Bug 1704654 - Display MOZ_LOG markers in marker chart as well - r=canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D111742
2021-04-21 08:16:53 +00:00
Mike Hommey 6a41d8d7ad Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-16 04:06:02 +00:00
Doug Thayer 638904c1f1 Bug 1693180 - Ensure we show the skeleton UI when restarting FF r=emalysz
When restarting, we set the XRE_PROFILE_PATH env var. This normally would
prevent us from showing the skeleton UI. This patch just adds another env
var to indicate that we are restarting so the skeleton UI can know it's
safe to display.

Differential Revision: https://phabricator.services.mozilla.com/D111884
2021-04-15 21:31:15 +00:00
Butkovits Atila 8255e3083f Backed out changeset 5c6b15fcea71 (bug 1515229) for causing GTest failures. CLOSED TREE 2021-04-15 13:37:29 +03:00
Mike Hommey 2eacd46d46 Bug 1515229 - Make MozStackWalk/MozWalkTheStack frame skipping more reliable. r=gerald,nika,bobowen,jld
Differential Revision: https://phabricator.services.mozilla.com/D110899
2021-04-14 22:31:36 +00:00
Jens Stutte daaba5a9c6 Bug 1690326: Map Windows error 0x45D ERROR_IO_DEVICE to NS_ERROR_FILE_DEVICE_FAILURE r=janv,xpcom-reviewers,mccr8
Differential Revision: https://phabricator.services.mozilla.com/D112050
2021-04-14 17:29:39 +00:00
smolnar 22c6eb14ba Backed out changeset f7b0cdc3aeb0 (bug 1515229) for causing xpc failures in test_feature_stackwalking. CLOSED TREE 2021-04-14 12:25:37 +03:00