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)
Tracking
(Not tracked)
RESOLVED
FIXED
Thunderbird 51.0
People
(Reporter: Paenglab, Assigned: frg)
References
Details
(Keywords: dogfood)
Attachments
(1 file, 5 obsolete files)
|
9.11 KB,
patch
|
jorgk-bmo
:
review+
|
Details | Diff | Splinter Review |
Regressed from bug 1303302.
Backout of this bug let me fully build.
Or let's try to fix what the new check found:
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=fdf6027b97ae999cdb4a1d2c9589408238705b75
OS: Unspecified → Windows
Hardware: Unspecified → All
Version: unspecified → 51
| Assignee | ||
Comment 2•9 years ago
|
||
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
Comment 3•9 years ago
|
||
I wouldn't consider revealing new defects to be a regression. And yeah, I think we should fix whatever this check finds.
Keywords: regression
| Assignee | ||
Comment 4•9 years ago
|
||
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.
Comment 5•9 years ago
|
||
Let's get this landed today before branch day tomorrow :-)
| Reporter | ||
Comment 6•9 years ago
|
||
Comment on attachment 8792300 [details] [diff] [review]
1303602-wip.patch
Started https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=f7b686e0d596 to check if this patch fixes it.
| Assignee | ||
Comment 7•9 years ago
|
||
If that really is all what is needed I can also formalize it. Just holler.
Comment 8•9 years ago
|
||
Oops, I was doing the same, I'll cancel mine.
| Assignee | ||
Comment 9•9 years ago
|
||
No need. Working on something else anyway.
Comment 10•9 years ago
|
||
(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?
| Assignee | ||
Comment 11•9 years ago
|
||
Ok, sorry I misunderstood.
Comment 12•9 years ago
|
||
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)
| Assignee | ||
Comment 13•9 years ago
|
||
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
Comment 14•9 years ago
|
||
Needed some more treatment :-(
https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=454a45e74f9e
| Assignee | ||
Comment 15•9 years ago
|
||
>> - ~nsMAPISession();
My local compile just finished. Moving this one fails.
Comment 16•9 years ago
|
||
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?
Comment 17•9 years ago
|
||
(In reply to Frank-Rainer Grahl from comment #15)
> My local compile just finished. Moving this one fails.
Meaning that patch is no good?
Updated•9 years ago
|
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
| Assignee | ||
Comment 18•9 years ago
|
||
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
Comment 19•9 years ago
|
||
Attachment #8792309 -
Attachment is obsolete: true
Comment 20•9 years ago
|
||
Made white-space match FRG's patch exactly (I hope).
Attachment #8792310 -
Attachment is obsolete: true
Comment 21•9 years ago
|
||
Thanks Frank-Rainer, I had to add to fixes in mail/
| Reporter | ||
Comment 22•9 years ago
|
||
I had additionally to fix nsOutlookProfileMigrator.h.
This patch built to the end.
Attachment #8792311 -
Attachment is obsolete: true
| Reporter | ||
Comment 23•9 years ago
|
||
Let's see what try says: https://treeherder.mozilla.org/#/jobs?repo=try-comm-central&revision=3c9b9a10cd1a
| Assignee | ||
Comment 24•9 years ago
|
||
>> Thanks Frank-Rainer, I had to add to fixes in mail/
No problem. Not here for taking the glory just to get it working :)
Comment 25•9 years ago
|
||
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 26•9 years ago
|
||
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+
| Reporter | ||
Comment 27•9 years ago
|
||
Try was successful.
https://hg.mozilla.org/comm-central/rev/23e9f9db0672
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 51.0
| Comment hidden (Intermittent Failures Robot) |
You need to log in
before you can comment on or make changes to this bug.
Description
•