Closed Bug 1834930 Opened 1 year ago Closed 1 year ago

xpcom/base/AvailableMemoryWatcherMac.cpp:73:32: error: unknown type name 'MacMemoryPressureLevel'

Categories

(Core :: XPCOM, defect)

Unspecified
iOS
defect

Tracking

()

RESOLVED FIXED
115 Branch
Tracking Status
firefox115 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Building with --target=aarch64-apple-ios fails with (among many other things):

 0:02.24 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.24 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:73:32: error: unknown type name 'MacMemoryPressureLevel'
 0:02.24   void OnMemoryPressureChanged(MacMemoryPressureLevel aLevel) override;
 0:02.24                                ^
 0:02.24 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:75:64: error: only virtual member functions can be marked 'override'
 0:02.24       const UniquePtr<ipc::CrashReporterHost>& aCrashReporter) override;
 0:02.24                                                                ^~~~~~~~
 0:02.27 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:80:40: error: unknown type name 'MacMemoryPressureLevel'
 0:02.27   void OnMemoryPressureChangedInternal(MacMemoryPressureLevel aNewLevel,
 0:02.27                                        ^
 0:02.29 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:145:3: error: unknown type name 'MacMemoryPressureLevel'
 0:02.29   MacMemoryPressureLevel mLevel;
 0:02.29   ^
 0:02.31 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:148:3: error: unknown type name 'MacMemoryPressureLevel'
 0:02.32   MacMemoryPressureLevel mResponseLevel;
 0:02.32   ^
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:67:3: error: static assertion failed due to requirement 'std::is_convertible<mozilla::nsAvailableMemoryWatcher *, nsINamed *>::value': nsITimerCallback implementations must also implement nsINamed
 0:02.32   NS_DECL_NSITIMERCALLBACK
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsITimer.h:335:5: note: expanded from macro 'NS_DECL_NSITIMERCALLBACK'
 0:02.32     static_assert(std::is_convertible<decltype(this), nsINamed*>::value, \
 0:02.32     ^             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: static_cast from 'nsAvailableMemoryWatcher *' to 'nsIObserver *', which are not related by inheritance, is not allowed
 0:02.32 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1463:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.32   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__) \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1433:5: note: expanded from macro 'NS_IMPL_QUERY_INTERFACE_INHERITED'
 0:02.32     NS_INTERFACE_TABLE_INHERITED(aClass, __VA_ARGS__)          \
 0:02.32     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1428:18: note: expanded from macro 'NS_INTERFACE_TABLE_INHERITED'
 0:02.32     MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass, ), (__VA_ARGS__))   \
 0:02.32     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 note: (skipping 4 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:67:7: note: expanded from macro 'MOZ_FOR_EACH_HELPER'
 0:02.32       aMacro, (MOZ_FOR_EACH_EXPAND_HELPER aFixedArgs MOZ_ARG_1 aArgs))
 0:02.32       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:64:40: note: expanded from macro 'MOZ_FOR_EACH_HELPER_GLUE'
 0:02.32 #define MOZ_FOR_EACH_HELPER_GLUE(a, b) a b
 0:02.32                                        ^~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1158:32: note: expanded from macro 'NS_INTERFACE_TABLE_ENTRY'
 0:02.32        reinterpret_cast<char*>(static_cast<_interface*>((_class*)0x1000)) - \
 0:02.32                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: static_cast from 'nsAvailableMemoryWatcher *' to 'nsITimerCallback *', which are not related by inheritance, is not allowed
 0:02.32 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1463:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.32   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__) \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1433:5: note: expanded from macro 'NS_IMPL_QUERY_INTERFACE_INHERITED'
 0:02.32     NS_INTERFACE_TABLE_INHERITED(aClass, __VA_ARGS__)          \
 0:02.32     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1428:18: note: expanded from macro 'NS_INTERFACE_TABLE_INHERITED'
 0:02.32     MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass, ), (__VA_ARGS__))   \
 0:02.32     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 note: (skipping 5 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:67:7: note: expanded from macro 'MOZ_FOR_EACH_HELPER'
 0:02.32       aMacro, (MOZ_FOR_EACH_EXPAND_HELPER aFixedArgs MOZ_ARG_1 aArgs))
 0:02.32       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:64:40: note: expanded from macro 'MOZ_FOR_EACH_HELPER_GLUE'
 0:02.32 #define MOZ_FOR_EACH_HELPER_GLUE(a, b) a b
 0:02.32                                        ^~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1158:32: note: expanded from macro 'NS_INTERFACE_TABLE_ENTRY'
 0:02.32        reinterpret_cast<char*>(static_cast<_interface*>((_class*)0x1000)) - \
 0:02.32                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: static_cast from 'nsAvailableMemoryWatcher *' to 'nsINamed *', which are not related by inheritance, is not allowed
 0:02.32 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1463:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.32   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__) \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1433:5: note: expanded from macro 'NS_IMPL_QUERY_INTERFACE_INHERITED'
 0:02.32     NS_INTERFACE_TABLE_INHERITED(aClass, __VA_ARGS__)          \
 0:02.32     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1428:18: note: expanded from macro 'NS_INTERFACE_TABLE_INHERITED'
 0:02.32     MOZ_FOR_EACH(NS_INTERFACE_TABLE_ENTRY, (aClass, ), (__VA_ARGS__))   \
 0:02.32     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 note: (skipping 6 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:67:7: note: expanded from macro 'MOZ_FOR_EACH_HELPER'
 0:02.32       aMacro, (MOZ_FOR_EACH_EXPAND_HELPER aFixedArgs MOZ_ARG_1 aArgs))
 0:02.32       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/MacroForEach.h:64:40: note: expanded from macro 'MOZ_FOR_EACH_HELPER_GLUE'
 0:02.32 #define MOZ_FOR_EACH_HELPER_GLUE(a, b) a b
 0:02.32                                        ^~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1158:32: note: expanded from macro 'NS_INTERFACE_TABLE_ENTRY'
 0:02.32        reinterpret_cast<char*>(static_cast<_interface*>((_class*)0x1000)) - \
 0:02.32                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: invalid application of 'sizeof' to an incomplete type 'const QITableEntry[]'
 0:02.32 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1463:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.32   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__) \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1433:5: note: expanded from macro 'NS_IMPL_QUERY_INTERFACE_INHERITED'
 0:02.32     NS_INTERFACE_TABLE_INHERITED(aClass, __VA_ARGS__)          \
 0:02.32     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1429:3: note: expanded from macro 'NS_INTERFACE_TABLE_INHERITED'
 0:02.32   NS_INTERFACE_TABLE_END
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1182:3: note: expanded from macro 'NS_INTERFACE_TABLE_END'
 0:02.32   NS_INTERFACE_TABLE_END_WITH_PTR \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1177:24: note: expanded from macro 'NS_INTERFACE_TABLE_END_WITH_PTR'
 0:02.32   static_assert((sizeof(table) / sizeof(table[0])) > 1, \
 0:02.32                        ^~~~~~~
 0:02.32 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.32 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: cannot initialize object parameter of type 'mozilla::nsAvailableMemoryWatcherBase' with an expression of type 'mozilla::nsAvailableMemoryWatcher'
 0:02.32 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.32 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1463:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.32   NS_IMPL_QUERY_INTERFACE_INHERITED(aClass, aSuper, __VA_ARGS__) \
 0:02.32   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.32 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1434:3: note: expanded from macro 'NS_IMPL_QUERY_INTERFACE_INHERITED'
 0:02.32   NS_INTERFACE_TABLE_TAIL_INHERITING(aSuper)
 0:02.33   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1191:22: note: expanded from macro 'NS_INTERFACE_TABLE_TAIL_INHERITING'
 0:02.33   return _baseclass::QueryInterface(aIID, aInstancePtr); \
 0:02.33                      ^~~~~~~~~~~~~~
 0:02.33 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.33 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: cannot initialize object parameter of type 'mozilla::nsAvailableMemoryWatcherBase' with an expression of type 'mozilla::nsAvailableMemoryWatcher'
 0:02.33 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.33 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1464:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.33   NS_IMPL_ADDREF_INHERITED(aClass, aSuper)                       \
 0:02.33   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1392:5: note: expanded from macro 'NS_IMPL_ADDREF_INHERITED'
 0:02.33     NS_IMPL_ADDREF_INHERITED_GUTS(Class, Super);                \
 0:02.33     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1384:23: note: expanded from macro 'NS_IMPL_ADDREF_INHERITED_GUTS'
 0:02.33   nsrefcnt r = Super::AddRef();                                       \
 0:02.33                       ^~~~~~
 0:02.33 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.33 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:195:1: error: cannot initialize object parameter of type 'mozilla::nsAvailableMemoryWatcherBase' with an expression of type 'mozilla::nsAvailableMemoryWatcher'
 0:02.33 NS_IMPL_ISUPPORTS_INHERITED(nsAvailableMemoryWatcher,
 0:02.33 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1465:3: note: expanded from macro 'NS_IMPL_ISUPPORTS_INHERITED'
 0:02.33   NS_IMPL_RELEASE_INHERITED(aClass, aSuper)
 0:02.33   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1404:5: note: expanded from macro 'NS_IMPL_RELEASE_INHERITED'
 0:02.33     NS_IMPL_RELEASE_INHERITED_GUTS(Class, Super);                \
 0:02.33     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.33 /tmp/gecko/obj-aarch64-apple-ios/dist/include/nsISupportsImpl.h:1396:23: note: expanded from macro 'NS_IMPL_RELEASE_INHERITED_GUTS'
 0:02.33   nsrefcnt r = Super::Release();                                      \
 0:02.33                       ^~~~~~~
 0:02.34 In file included from Unified_cpp_xpcom_base0.cpp:29:
 0:02.34 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:201:14: error: use of undeclared identifier 'MacMemoryPressureLevel'
 0:02.34       mLevel(MacMemoryPressureLevel::Value::eUnset),
 0:02.34              ^
 0:02.36 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:202:22: error: use of undeclared identifier 'MacMemoryPressureLevel'
 0:02.36       mResponseLevel(MacMemoryPressureLevel::Value::eCritical),
 0:02.37                      ^
 0:02.37 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:213:47: error: cannot initialize object parameter of type 'mozilla::nsAvailableMemoryWatcherBase' with an expression of type 'mozilla::nsAvailableMemoryWatcher'
 0:02.37   nsresult rv = nsAvailableMemoryWatcherBase::Init();
 0:02.37                                               ^~~~
 0:02.39 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:242:22: error: use of undeclared identifier 'MacMemoryPressureLevel'
 0:02.39     mResponseLevel = MacMemoryPressureLevel::Value::eWarning;
 0:02.39                      ^
 0:02.41 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:244:22: error: use of undeclared identifier 'MacMemoryPressureLevel'
 0:02.41     mResponseLevel = MacMemoryPressureLevel::Value::eCritical;
 0:02.41                      ^
 0:02.41 /tmp/gecko/xpcom/base/AvailableMemoryWatcherMac.cpp:270:8: error: no matching function for call to 'AddStrongObserver'
 0:02.41   rv = Preferences::AddStrongObserver(this, kResponseMask);
 0:02.41        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 0:02.41 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/Preferences.h:241:19: note: candidate function template not viable: no known conversion from 'mozilla::nsAvailableMemoryWatcher *' to 'nsIObserver *' for 1st argument
 0:02.41   static nsresult AddStrongObserver(nsIObserver* aObserver,
 0:02.41                   ^
 0:02.41 /tmp/gecko/obj-aarch64-apple-ios/dist/include/mozilla/Preferences.h:233:19: note: candidate function not viable: no known conversion from 'mozilla::nsAvailableMemoryWatcher *' to 'nsIObserver *' for 1st argument
 0:02.41   static nsresult AddStrongObserver(nsIObserver* aObserver,
 0:02.41                   ^
Pushed by mh@glandium.org: https://hg.mozilla.org/integration/autoland/rev/3c21375c796a Properly build the available memory watcher on iOS. r=xpcom-reviewers,nika
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch
Group: mozilla-employee-confidential
Group: mozilla-employee-confidential
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: