Closed Bug 1028021 Opened 6 years ago Closed 6 years ago

Fix -Wdelete-non-virtual-dtor warning in widget/cocoa/nsAppShell.mm

Categories

(Core :: Widget: Cocoa, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla33
Tracking Status
firefox32 --- unaffected
firefox33 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(1 file)

Mac wakelock bug 772347 introduced the following warning:

widget/cocoa/nsAppShell.mm:208:1 [-Wdelete-non-virtual-dtor] delete called on 'MacWakeLockListener' that has virtual functions but non-virtual destructor

This patch fixes that warning by marking MacWakeLockListener as a final class and also remove a couple unused #includes.
Attachment #8443292 - Flags: review?(smichaud)
Comment on attachment 8443292 [details] [diff] [review]
MacWakeLockListener_Wdelete-non-virtual-dtor.patch

This looks fine to me.

But before you land it you should do test builds with and without "ac_add_options --disable-unified-compilation" in your mozconfig.  That can change which include statements are needed in a particular file.

No, I don't think anything in nsAppShell.mm actually uses the contents of either of these header files any longer ... but just to be sure.
Attachment #8443292 - Flags: review?(smichaud) → review+
(In reply to Steven Michaud from comment #1)
> But before you land it you should do test builds with and without
> "ac_add_options --disable-unified-compilation" in your mozconfig.  That can
> change which include statements are needed in a particular file.

I tested a non-unified build like you suggested. I see build errors from some warnings-as-errors unrelated to my patch. I'll go report those now.. <:)
https://hg.mozilla.org/mozilla-central/rev/c416861823d2
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla33
You need to log in before you can comment on or make changes to this bug.