Closed Bug 1303602 Opened 9 years ago Closed 9 years ago

Make destructors of ref-counted objects private in code only compiled on Windows

Categories

(MailNews Core :: Address Book, defect)

All
Windows
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 51.0

People

(Reporter: Paenglab, Assigned: frg)

References

Details

(Keywords: dogfood)

Attachments

(1 file, 5 obsolete files)

Regressed from bug 1303302. Backout of this bug let me fully build.
OS: Unspecified → Windows
Hardware: Unspecified → All
Version: unspecified → 51
These files need to be fixed. Not sure if just setting the destructors to private is ok and all which is needed. mailnews\addrbook\src\nsAbOutlookDirectory.h mailnews\addrbook\src\nsAbOutlookDirFactory.h mailnews\mapi\mapihook\src\msgMapiFactory.h mailnews\mapi\mapihook\src\msgMapiHook.cpp mailnews\mapi\mapihook\src\msgMapiMain.h mailnews\mapi\mapihook\src\msgMapiSupport.h
I wouldn't consider revealing new defects to be a regression. And yeah, I think we should fix whatever this check finds.
Keywords: regression
Attached patch 1303602-wip.patch (obsolete) — Splinter Review
Well SeaMonkey compiles with the patch and doesn't go up in flames when running so if this one is ok feel free to use it as a base for a patch.
Let's get this landed today before branch day tomorrow :-)
If that really is all what is needed I can also formalize it. Just holler.
Oops, I was doing the same, I'll cancel mine.
No need. Working on something else anyway.
(In reply to Frank-Rainer Grahl from comment #9) > No need. Working on something else anyway. I don't understand. I was referring to Richard's comment about the try push. I did one push too and had to cancel it. You're patch is ready for approval if everything compiles on try, right?
Ok, sorry I misunderstood.
Let's also change the commit message of the patch ;-)
Summary: mailnews/addrbook/src/nsAbOutlookDirFactory.cpp(25): error C2338: Reference-counted class nsAbOutlookDirFactory should not have a public destructor. Make this class's destructor non-public → Make destructors of ref-counted objects private in code only compiled on Windows (mailnews/mapi and mailnews/addrbook/src/nsAbOutlook*.cpp)
Attached patch 1303602-destructors.patch (obsolete) — Splinter Review
Proper patch. I found an additional destructor in msgMapiMain.h and put it in the patch. Could you check this one too: >> - ~nsMAPISession();
Attachment #8792300 - Attachment is obsolete: true
>> - ~nsMAPISession(); My local compile just finished. Moving this one fails.
Well, I fixed: c:/builds/moz2_slave/tb-try-c-cen-w32-0000000000000/build/mail/components/shell/nsMailWinIntegration.cpp(49): error C2338: Reference-counted class nsWindowsShellService should not have a public destructor. Make this class's destructor non-public c:/builds/moz2_slave/tb-try-c-cen-w32-0000000000000/build/mail/components/migration/src/nsOEProfileMigrator.cpp(17): error C2338: Reference-counted class nsOEProfileMigrator should not have a public destructor. Make this class's destructor non-public Did you get a local compile error on nsMAPISession?
(In reply to Frank-Rainer Grahl from comment #15) > My local compile just finished. Moving this one fails. Meaning that patch is no good?
Summary: Make destructors of ref-counted objects private in code only compiled on Windows (mailnews/mapi and mailnews/addrbook/src/nsAbOutlook*.cpp) → Make destructors of ref-counted objects private in code only compiled on Windows
Attached patch 1303602-destructors-V2.patch (obsolete) — Splinter Review
This one and the wip is ok for suite. Just my latest tweak was bad. Not a C++ person :)
Attachment #8792305 - Attachment is obsolete: true
Attachment #8792309 - Attachment is obsolete: true
Made white-space match FRG's patch exactly (I hope).
Attachment #8792310 - Attachment is obsolete: true
Thanks Frank-Rainer, I had to add to fixes in mail/
I had additionally to fix nsOutlookProfileMigrator.h. This patch built to the end.
Attachment #8792311 - Attachment is obsolete: true
>> Thanks Frank-Rainer, I had to add to fixes in mail/ No problem. Not here for taking the glory just to get it working :)
I think we let have FRG have the laurel here ;-) Richard, thanks for adding one more. I don't have an up-to-date local build and it would cost me an hour (which I don't have) to produce one. Thanks for saving resources on try, no need to compile on Linux and Mac if the code only compiles on Windows ;-) Also, it if compiles, it will work, no need to run the entire test suite on it. Please land your patch if it compiles with this commit message: Bug 1303602 - Declare destructors of ref-counted classes private in code only compiled on Windows. r=jorgk
Assignee: nobody → frgrahl
Comment on attachment 8792314 [details] [diff] [review] 1303602-destructors-V3.patch Commit as: Bug 1303602 - Declare destructors of ref-counted classes private in code only compiled on Windows. r=jorgk
Attachment #8792314 - Flags: review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: