Closed
Bug 1407248
Opened 7 years ago
Closed 7 years ago
SystemGroup.cpp uses StaticPtr without including it
Categories
(Core :: XPCOM, defect, P3)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file)
Something in bug 1363877 changed SystemGroup.cpp in such a way that I get this compile error in gecko-media crate: cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp: In static member function ‘static bool SystemGroupImpl::Initialized()’: cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp:26:39: error: no match for ‘operator!’ (operand type is ‘mozilla::StaticRefPtr<SystemGroupImpl>’) cargo:warning= static bool Initialized() { return !!sSingleton; } cargo:warning= ^~~~~~~~~~~ cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp:26:39: note: candidate: operator!(bool) <built-in> cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp:26:39: note: no known conversion for argument 1 from ‘mozilla::StaticRefPtr<SystemGroupImpl>’ to ‘bool’ cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp: At global scope: cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp:33:48: error: aggregate ‘mozilla::StaticRefPtr<SystemGroupImpl> SystemGroupImpl::sSingleton’ has incomplete type and cannot be defined cargo:warning= StaticRefPtr<SystemGroupImpl> SystemGroupImpl::sSingleton; cargo:warning= ^~~~~~~~~~ cargo:warning=In file included from gecko/include/mozilla/AlreadyAddRefed.h:12:0, cargo:warning= from gecko/include/mozilla/SchedulerGroup.h:10, cargo:warning= from gecko/include/mozilla/SystemGroup.h:11, cargo:warning= from gecko/src/xpcom/threads/SystemGroup.cpp:7: cargo:warning=gecko/src/xpcom/threads/SystemGroup.cpp: In static member function ‘static void SystemGroupImpl::InitStatic()’: cargo:warning=gecko/glue/include/mozilla/Assertions.h:417:71: error: template argument 1 is invalid cargo:warning= static_assert(mozilla::detail::AssertionConditionType<decltype(x)>::isValid, \ The compiler doesn't know how to convert a StaticPtr<SystemGroupImpl> to a bool using operator!. Including mozilla/StaticPtr.h fixes it.
Comment hidden (mozreview-request) |
Comment 2•7 years ago
|
||
mozreview-review |
Comment on attachment 8916992 [details] Bug 1407248 - Include StaticPtr.h in SystemGroup.cpp. https://reviewboard.mozilla.org/r/188028/#review193368
Attachment #8916992 -
Flags: review?(wmccloskey) → review+
Pushed by cpearce@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/074c0e2a308b Include StaticPtr.h in SystemGroup.cpp. r=billm
Comment 4•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/074c0e2a308b
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•