This patch:
- moves the AutoNestedEventLoopAnnotation into SpinEventLoopUntil.h
- introduces the motivated SpinEventLoopUntil
- maps remaining SpinEventLoopUntil instances to SpinEventLoopUntil with "Missing motivation."
- changes relevant uses in nsThread and nsThreadManager to the motivated SpinEventLoopUntil
- changes all uses with IgnoreAndContinue behavior to the motivated SpinEventLoopUntil
Differential Revision: https://phabricator.services.mozilla.com/D126714
Bug 1718629 did this for the maximize button. This patch does the same for minimize and close, which we are switching to for consistent tooltip styling.
Differential Revision: https://phabricator.services.mozilla.com/D125625
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
These changes were necessary for me to build successfully with this in my
mozconfig:
ac_add_options --enable-debug
ac_add_options --disable-unified-build
ac_add_options --enable-profiling
While I'm here, I removed a duplicate include in InputTaskManager.h, and made
nsThreadPool.cpp include its own header first, to match Gecko common practice.
Differential Revision: https://phabricator.services.mozilla.com/D127503
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
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
objdir/dist/include/mozilla/Queue.h:251:31: error: use of undeclared identifier 'moz_xcalloc'
xpcom/base/nsCOMPtr.h:436:5: error: static_assert failed due to requirement '1 < sizeof (TestForIID<nsIEventTarget>(nullptr))' "nsCOMPtr only works for types with IIDs. Either use RefPtr; add an IID to your type with NS_DECLARE_STATIC_IID_ACCESSOR/NS_DEFINE_STATIC_IID_ACCESSOR; or make the nsCOMPtr point to a base class with an IID."
xpcom/tests/gtest/TestDelayedRunnable.cpp:16:28: error: field has incomplete type '(anonymous namespace)::ReleaseDetector'
xpcom/tests/gtest/TestDelayedRunnable.cpp:16:3: error: 'explicit' can only appear on non-static member functions
xpcom/tests/gtest/TestDelayedRunnable.cpp:16:40: error: expected ')'
xpcom/tests/gtest/TestDelayedRunnable.cpp:16:61: error: use of undeclared identifier 'aActive'
xpcom/tests/gtest/TestDelayedRunnable.cpp:28:3: error: no template named 'Atomic'; did you mean 'mozilla::Atomic'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:34:3: error: no template named 'Atomic'; did you mean 'mozilla::Atomic'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:36:18: error: use of undeclared identifier 'TaskQueue'; did you mean 'taskQueue'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:36:18: error: variable 'taskQueue' declared with deduced type 'auto' cannot appear in its own initializer
xpcom/tests/gtest/TestDelayedRunnable.cpp:36:48: error: use of undeclared identifier 'MediaThreadType'
xpcom/tests/gtest/TestDelayedRunnable.cpp:36:48: error: use of undeclared identifier 'MediaThreadType'; did you mean 'mozilla::MediaThreadType'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:38:51: error: no matching conversion for functional-style cast from 'Atomic<bool> *' to '(anonymous namespace)::ReleaseDetector'
xpcom/tests/gtest/TestDelayedRunnable.cpp:54:3: error: no template named 'Atomic'; did you mean 'mozilla::Atomic'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:58:51: error: no matching conversion for functional-style cast from 'Atomic<bool> *' to '(anonymous namespace)::ReleaseDetector'
xpcom/tests/gtest/TestDelayedRunnable.cpp:88:3: error: use of undeclared identifier 'Unused'; did you mean 'mozilla::Unused'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:104:3: error: use of undeclared identifier 'Unused'; did you mean 'mozilla::Unused'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:109:10: error: unknown type name 'SharedThreadPool'; did you mean 'mozilla::SharedThreadPool'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:109:35: error: use of undeclared identifier 'SharedThreadPool'
xpcom/tests/gtest/TestDelayedRunnable.cpp:109:35: error: use of undeclared identifier 'SharedThreadPool'; did you mean 'mozilla::SharedThreadPool'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:110:25: 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/tests/gtest/TestDelayedRunnable.cpp:110:36: error: unknown type name 'TaskQueue'; did you mean 'mozilla::TaskQueue'?
xpcom/tests/gtest/TestDelayedRunnable.cpp:112:36: error: unknown type name 'TaskQueue'; did you mean 'mozilla::TaskQueue'?
xpcom/tests/gtest/TestFileNTFSSpecialPaths.cpp:18:28: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFileNTFSSpecialPaths.cpp:26:28: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFileNTFSSpecialPaths.cpp:39:28: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFileNTFSSpecialPaths.cpp:279:28: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFilePreferencesWin.cpp:113:26: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFilePreferencesWin.cpp:140:26: error: use of undeclared identifier 'do_CreateInstance'
xpcom/tests/gtest/TestFilePreferencesWin.cpp:156:31: error: use of undeclared identifier 'NS_OS_TEMP_DIR'
xpcom/tests/gtest/TestJSHolderMap.cpp:50:28: error: unknown type name 'JSHolderMap'
xpcom/tests/gtest/TestJSHolderMap.cpp:52:35: error: use of undeclared identifier 'i'
xpcom/tests/gtest/TestJSHolderMap.cpp:52:45: error: use of undeclared identifier 'i'
xpcom/tests/gtest/TestJSHolderMap.cpp:52:8: error: use of undeclared identifier 'JSHolderMap'
xpcom/tests/gtest/TestJSHolderMap.cpp:52:8: error: use of undeclared identifier 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:53:24: error: use of undeclared identifier 'i'
xpcom/tests/gtest/TestJSHolderMap.cpp:54:24: error: use of undeclared identifier 'i'
xpcom/tests/gtest/TestJSHolderMap.cpp:68:3: error: unknown type name 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:73:3: error: unknown type name 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:99:3: error: unknown type name 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:104:9: error: use of undeclared identifier 'JSHolderMap'
xpcom/tests/gtest/TestJSHolderMap.cpp:104:9: error: use of undeclared identifier 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:125:41: error: use of undeclared identifier 'MakeUnique'
xpcom/tests/gtest/TestJSHolderMap.cpp:147:3: error: unknown type name 'JSHolderMap'; did you mean 'mozilla::JSHolderMap'?
xpcom/tests/gtest/TestJSHolderMap.cpp:151:41: error: use of undeclared identifier 'MakeUnique'
xpcom/tests/gtest/TestRWLock.cpp:92:3: error: no template named 'Maybe'; did you mean 'mozilla::Maybe'?
xpcom/tests/gtest/TestRWLock.cpp:95:23: error: use of undeclared identifier 'SyncRunnable'; did you mean 'mozilla::SyncRunnable'?
xpcom/tests/gtest/TestRWLock.cpp:103:5: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:107:5: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:111:7: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:120:7: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:130:5: error: unknown type name 'AutoWriteLock'; did you mean 'mozilla::AutoWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:133:5: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:137:7: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:142:3: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:146:5: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:155:5: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:159:5: error: unknown type name 'AutoTryReadLock'; did you mean 'mozilla::AutoTryReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:163:7: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:172:7: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:182:5: error: unknown type name 'AutoReadLock'; did you mean 'mozilla::AutoReadLock'?
xpcom/tests/gtest/TestRWLock.cpp:184:5: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:188:7: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:194:5: error: unknown type name 'AutoWriteLock'; did you mean 'mozilla::AutoWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:197:5: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
xpcom/tests/gtest/TestRWLock.cpp:201:7: error: unknown type name 'AutoTryWriteLock'; did you mean 'mozilla::AutoTryWriteLock'?
Differential Revision: https://phabricator.services.mozilla.com/D127042
xpcom/threads/CPUUsageWatcher.cpp:43:23: error: unused variable 'kCPUCheckInterval' [-Werror,-Wunused-const-variable]
xpcom/threads/CPUUsageWatcher.cpp:109:23: error: unused variable 'kCPUCheckInterval' [-Werror,-Wunused-const-variable]
xpcom/threads/InputEventStatistics.cpp:18:5: error: use of undeclared identifier 'ClearOnShutdown'
xpcom/threads/InputTaskManager.cpp:62:9: error: use of undeclared identifier 'InputEventStatistics'
xpcom/threads/InputTaskManager.cpp:89:3: error: use of undeclared identifier 'InputEventStatistics'
xpcom/threads/InputTaskManager.cpp:105:7: error: use of undeclared identifier 'nsRefreshDriver'
xpcom/threads/InputTaskManager.cpp:124:9: error: use of undeclared identifier 'InputEventStatistics'
xpcom/threads/MainThreadIdlePeriod.cpp:29:23: error: unused variable 'kMaxTimerThreadBoundClamp' [-Werror,-Wunused-const-variable]
xpcom/threads/VsyncTaskManager.h:15:67: error: implicit instantiation of undefined template 'mozilla::StaticRefPtr<mozilla::VsyncTaskManager>'
xpcom/threads/VsyncTaskManager.h:16:52: error: no viable overloaded '='
xpcom/threads/nsMemoryPressure.cpp:61:12: error: use of undeclared identifier 'nsIObserverService'
xpcom/threads/nsMemoryPressure.cpp:61:37: error: use of undeclared identifier 'services'
xpcom/threads/nsThreadManager.cpp:422:28: error: member access into incomplete type 'mozilla::ThreadEventTarget'
xpcom/threads/nsThreadManager.cpp:661:5: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadManager.cpp:662:59: error: expected ')'
xpcom/threads/nsThreadManager.cpp:662:9: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadManager.cpp:669:7: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadManager.cpp:670:11: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadManager.cpp:670:61: error: expected ')'
xpcom/threads/nsThreadManager.cpp:672:7: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadManager.cpp:673:11: error: use of undeclared identifier 'CrashReporter'
xpcom/threads/nsThreadUtils.cpp:636:13: error: member access into incomplete type 'mozilla::Task'
Differential Revision: https://phabricator.services.mozilla.com/D127041
xpcom/io/InputStreamLengthHelper.cpp:14:22: error: unused variable 'kStreamTransportServiceCID' [-Werror,-Wunused-const-variable]
xpcom/io/SeekableStreamWrapper.cpp:422:17: error: no member named 'InputStreamHelper' in namespace 'mozilla::ipc'
xpcom/io/nsSegmentedBuffer.cpp:117:11: error: no viable conversion from '(lambda at /tmp/central/xpcom/io/nsSegmentedBuffer.cpp:117:11)' to 'void *'
xpcom/io/nsSegmentedBuffer.cpp:128:11: error: no viable conversion from '(lambda at /tmp/central/xpcom/io/nsSegmentedBuffer.cpp:128:11)' to 'void *'
xpcom/io/nsSegmentedBuffer.cpp:131:25: error: out-of-line definition of 'FreeOMT' does not match any declaration in 'nsSegmentedBuffer'
xpcom/io/nsSegmentedBuffer.cpp:143:16: 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/io/nsSegmentedBuffer.cpp:143:16: error: use of undeclared identifier 'MakeRefPtr'; did you mean 'mozilla::MakeRefPtr'?
xpcom/io/nsSegmentedBuffer.cpp:164:35: error: implicit instantiation of undefined template 'nsTArray<std::function<void ()>>'
xpcom/io/nsSegmentedBuffer.cpp:164:44: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
xpcom/io/nsSegmentedBuffer.cpp:165:14: error: use of undeclared identifier 'mTasks'
xpcom/io/nsSegmentedBuffer.h:90:25: error: member initializer 'mTasks' does not name a non-static data member or base class
xpcom/io/nsSegmentedBuffer.h:95:25: error: no template named 'function' in namespace 'std'
xpcom/io/nsSegmentedBuffer.h:96:20: error: use of undeclared identifier 'mTasks'
xpcom/io/nsSegmentedBuffer.h:104:24: error: use of undeclared identifier 'nsTArray'
xpcom/io/nsSegmentedBuffer.h:104:38: error: no member named 'function' in namespace 'std'
xpcom/io/nsSegmentedBuffer.h:104:55: error: expected member name or ';' after declaration specifiers
xpcom/io/nsSegmentedBuffer.h:104:57: error: private field 'mTasks' is not used [-Werror,-Wunused-private-field]
xpcom/io/nsSegmentedBuffer.h:108:21: error: no template named 'function' in namespace 'std'
xpcom/io/nsStorageStream.cpp:576:3: error: no template named 'DebugOnly'
xpcom/io/nsStorageStream.cpp:576:3: error: no template named 'DebugOnly'; did you mean 'mozilla::DebugOnly'?
Differential Revision: https://phabricator.services.mozilla.com/D127040
xpcom/ds/nsProperties.cpp:56:3: error: use of undeclared identifier 'AppendToArray'; did you mean 'mozilla::AppendToArray'?
xpcom/ds/PLDHashTable.cpp:324:3: error: use of undeclared identifier 'NS_ASSERTION'
xpcom/ds/PLDHashTable.cpp:395:3: error: use of undeclared identifier 'NS_ASSERTION'
xpcom/ds/PLDHashTable.cpp:679:7: error: use of undeclared identifier 'NS_ABORT_OOM'
xpcom/ds/PLDHashTable.cpp:685:7: error: use of undeclared identifier 'NS_ABORT_OOM'
Differential Revision: https://phabricator.services.mozilla.com/D127039
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
While the build system could be improved to actually support those
cases, because of all the legacy things involved, it would be a lot more
work for a low reward.
Instead, we forbid them, which allows to remove the non-unified builds
exception in xpcom/rust/gtest.
Differential Revision: https://phabricator.services.mozilla.com/D127035
xpcom/tests/gtest/TestAvailableMemoryWatcherWin.cpp(130,22): error: variable 'x' set but not used [-Werror,-Wunused-but-set-variable]
volatile uint8_t x = 0;
^
xpcom/tests/gtest/TestAvailableMemoryWatcherWin.cpp(152,12): error: variable 'consumed' set but not used [-Werror,-Wunused-but-set-variable]
size_t consumed = 0;
^
xpcom/tests/gtest/TestSTLWrappers.cpp:48:7: error: variable 'rv' set but not used [-Werror,-Wunused-but-set-variable]
int rv = 1;
^
Differential Revision: https://phabricator.services.mozilla.com/D126462
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
Threads are implicitly members of the multi-threaded apartment and calls to
CoInitializeEx (and CoUninitializeEx) cause user32 to load.
Differential Revision: https://phabricator.services.mozilla.com/D124934
Threads are implicitly members of the multi-threaded apartment and calls to
CoInitializeEx (and CoUninitializeEx) cause user32 to load.
Differential Revision: https://phabricator.services.mozilla.com/D124933
When adding new gtests I came across this build failure:
```
0:12.59 In file included from Unified_cpp_xpcom_tests_gtest2.cpp:2:
0:12.59 /home/kriswright/src/mozilla-unified/xpcom/tests/gtest/TestMultiplexInputStream.cpp:349:45: error: no viable conversion from 'nsCOMPtr<nsIThread>' to 'nsIEventTarget *'
```
It looks like this file needs to include nsIThread in its #includes.
Differential Revision: https://phabricator.services.mozilla.com/D125851
Threads are implicitly members of the multi-threaded apartment and calls to
CoInitializeEx (and CoUninitializeEx) cause user32 to load.
Differential Revision: https://phabricator.services.mozilla.com/D124934
Threads are implicitly members of the multi-threaded apartment and calls to
CoInitializeEx (and CoUninitializeEx) cause user32 to load.
Differential Revision: https://phabricator.services.mozilla.com/D124933
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
This makes a couple of changes, including removing the call to
AppendNativeHandler from the constructor, and using the nullable nature of
std::function instead of wrapping them in Maybe.
The main advantage of this change, however, is that it no longer acquires a
reference to `this` during the constructor, which could be unsafe.
Differential Revision: https://phabricator.services.mozilla.com/D124827
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
This makes a couple of changes, including removing the call to
AppendNativeHandler from the constructor, and using the nullable nature of
std::function instead of wrapping them in Maybe.
The main advantage of this change, however, is that it no longer acquires a
reference to `this` during the constructor, which could be unsafe.
Differential Revision: https://phabricator.services.mozilla.com/D124827
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
Add `NS_ConvertUTF16toUTF8::NS_ConvertUTF16toUTF8(const Span<const char16_t>)` and `NS_ConvertUTF16toUTF8::NS_ConvertUTF8toUTF16(const Span<const char>)` explicit constructors.
This is consistent with `NS_ConvertASCIItoUTF16` that already had one.
More importantly, other constructors were calling `AppendUTF{16,8}To{8,16}` functions taking a `Span`, so for cases where the caller already has a `Span` it's most efficient to have constructors accepting that `Span` directly.
Differential Revision: https://phabricator.services.mozilla.com/D125146
We did two optimizations in this patch
1. Since mResourceEntries and mUserEntries are presorted
arrays, we could just merge them by iterating them over without
performing a quick sort.
2. Don't perform quick sort if entry type is provided.
Differential Revision: https://phabricator.services.mozilla.com/D124797
This makes a couple of changes, including removing the call to
AppendNativeHandler from the constructor, and using the nullable nature of
std::function instead of wrapping them in Maybe.
The main advantage of this change, however, is that it no longer acquires a
reference to `this` during the constructor, which could be unsafe.
Differential Revision: https://phabricator.services.mozilla.com/D124827
Windows 11's Snap Layouts feature generates a window of layout options when the maximize window button is moused over. This requires the WM_NCHITTEST message to handle hit detection for the button. Since WM_NCHITTEST messages are very common, although we limit them to no more than every 50ms, we don't want to do a full hit test each time. Instead, we cache the maximize button rect in the widget when it is positioned during layout.
Differential Revision: https://phabricator.services.mozilla.com/D123982
This also adds a commented out option for automatically fixing use-services in the ESLint rule. This cannot be enabled at the moment as it needs special treatment for chrome tests.
Differential Revision: https://phabricator.services.mozilla.com/D124391
Covers the case where we finish late because the callback took a long time,
and the case where we fired really late (eg; because of sleep).
Differential Revision: https://phabricator.services.mozilla.com/D123814
Covers the case where we finish late because the callback took a long time,
and the case where we fired really late (eg; because of sleep).
Differential Revision: https://phabricator.services.mozilla.com/D123814
`onsecuritypolicyviolation` attribute has been added to `GlobalEventHandlers` by https://github.com/whatwg/html/pull/2651
List of tests:
1. w3c/web-platform-tests/dom/idlharness.window.html
2. w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-all-global-events.html
3. w3c/web-platform-tests/html/webappapis/scripting/events/event-handler-attributes-body-window.html
4. w3c/web-platform-tests/mathml/relations/html5-tree/math-global-event-handlers.tentative.html
This new spec addition is already implemented in Safari[0] recently and Chromium[1] will be working on it soon.
[0] https://bugs.webkit.org/show_bug.cgi?id=229381
[1] https://bugs.chromium.org/p/chromium/issues/detail?id=1242893
Differential Revision: https://phabricator.services.mozilla.com/D123891
It looks like we can do a mostly direct swap from `std::Queue` to `mozilla::Queue` without needing to expose any new API, so that's what I've done here.
Differential Revision: https://phabricator.services.mozilla.com/D123523
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
With the new ThreadRegistration classes, it becomes more important to properly balance registrations with unregistrations. Though mismatches are safely handled when they happen, in particular missing unregistrations can lead to leaks that make tests fail.
This patch changes `PROFILER_REGISTER_THREAD` in TaskController.cpp to `AUTO_PROFILER_REGISTER_THREAD`, to ensure that TaskController threads get unregistered when they're finished.
In AsyncLogger.h, a pair of `PROFILER_REGISTER_THREAD` and `PROFILER_UNREGISTER_THREAD` is converted to a single `AUTO_PROFILER_REGISTER_THREAD`. This is equivalent, but the latter is safer, in case the code in-between later changes to include early breaks or returns.
Differential Revision: https://phabricator.services.mozilla.com/D123228
Add a new encoding mode to be used to encode an already-encoded URL to be compatible with Apple's NSURL.
Add a function for creating an nsIURI with NSURL compatible encoding from a URL string.
Differential Revision: https://phabricator.services.mozilla.com/D122651
Rearrange and reformat the encoding table to make space for two digit entries needed for an additional encoding enum.
Convert entries to hex.
Differential Revision: https://phabricator.services.mozilla.com/D122650
The use of GRE_HOME was cargo-culted well back when, and doesn't reflect
the reality of where the executables and libraries are on Android.
Libxul and its dependent libraries are actually loaded from
MOZ_ANDROID_LIBDIR, set from the Java side, and used in APKOpen.cpp,
matching reality more closely.
Unfortunately, this opens a whole can of worms, because some things
that indirectly rely on the fallback code path in
nsDirectoryService::GetCurrentProcessDirectory make assumptions that
don't hold with the directory containing the libraries on Android. So
they currently work with GRE_HOME, but fail with MOZ_ANDROID_LIBDIR.
We thus keep the nsDirectoryService::GetCurrentProcessDirectory callback
on GRE_HOME.
Differential Revision: https://phabricator.services.mozilla.com/D122323
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
The use of GRE_HOME was cargo-culted well back when, and doesn't reflect
the reality of where the executables and libraries are on Android.
Libxul and its dependent libraries are actually loaded from
MOZ_ANDROID_LIBDIR, set from the Java side, and used in APKOpen.cpp,
matching reality more closely.
Differential Revision: https://phabricator.services.mozilla.com/D122323