Closed Bug 1035747 Opened 11 years ago Closed 11 years ago

xpcom/base/nsMemoryReporterManager.cpp:540:1: error: static_assert failed "Reference-counted class VsizeMaxContiguousReporter should not have a public destructor...

Categories

(Core :: XPCOM, defect)

All
FreeBSD
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla33

People

(Reporter: jbeich, Assigned: jbeich)

References

Details

Attachments

(1 file)

VsizeMaxContiguousReporter and PrivateReporter are only implemented on Windows and FreeBSD. MOZ_IS_DESTRUCTIBLE is disabled on Windows. I wonder if this'll change with clang-cl. In file included from xpcom/base/Unified_cpp_xpcom_base0.cpp:184: xpcom/base/nsMemoryReporterManager.cpp:540:1: error: static_assert failed "Reference-counted class VsizeMaxContiguousReporter should not have a public destructor. Try to make this class's destructor non-public. If that is really not possible, you can whitelist this class by providing a HasDangerousPublicDestructor specialization for it." NS_IMPL_ISUPPORTS(VsizeMaxContiguousReporter, nsIMemoryReporter) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:1023:3: note: expanded from macro 'NS_IMPL_ISUPPORTS' NS_IMPL_ADDREF(aClass) \ ^~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:559:3: note: expanded from macro 'NS_IMPL_ADDREF' MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(_class) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:91:3: note: expanded from macro 'MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING' static_assert(!MOZ_IS_DESTRUCTIBLE(X) || \ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from xpcom/base/Unified_cpp_xpcom_base0.cpp:184: xpcom/base/nsMemoryReporterManager.cpp:562:1: error: static_assert failed "Reference-counted class PrivateReporter should not have a public destructor. Try to make this class's destructor non-public. If that is really not possible, you can whitelist this class by providing a HasDangerousPublicDestructor specialization for it." NS_IMPL_ISUPPORTS(PrivateReporter, nsIMemoryReporter) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:1023:3: note: expanded from macro 'NS_IMPL_ISUPPORTS' NS_IMPL_ADDREF(aClass) \ ^~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:559:3: note: expanded from macro 'NS_IMPL_ADDREF' MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(_class) \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ dist/include/nsISupportsImpl.h:91:3: note: expanded from macro 'MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING' static_assert(!MOZ_IS_DESTRUCTIBLE(X) || \ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.
Attached patch fixSplinter Review
Continue similar change in the file. It fixes my build and doesn't crash about:memory. https://hg.mozilla.org/mozilla-central/diff/bb961917a75c/xpcom/base/nsMemoryReporterManager.cpp
Attachment #8452261 - Flags: review?(bjacob)
Attachment #8452261 - Flags: review?(bjacob) → review+
Yes, clanng-cl will bring MOZ_IS_DESTRUCTIBLE to Windows.
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: