Closed Bug 812246 Opened 12 years ago Closed 12 years ago

Build bustage - error: nsMsgRDFDataSource.h - invalid use of member 'nsMsgRDFDataSource::mObservers' in static member function

Categories

(Thunderbird :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 19.0

People

(Reporter: mconley, Assigned: mconley)

Details

Attachments

(1 file)

Seeing this across the board:

../../../../mailnews/base/src/nsMsgRDFDataSource.h: In static member function 'static nsresult nsMsgRDFDataSource::cycleCollection::UnlinkImpl(void*)':
../../../../mailnews/base/src/nsMsgRDFDataSource.h:64:30: error: invalid use of member 'nsMsgRDFDataSource::mObservers' in static member function
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:67:46: error: from this location
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:67:56: error: 'NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY' was not declared in this scope
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:68:3: error: expected ';' before 'NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR'
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:66:89: warning: unused variable 'tmp'
../../../../mailnews/base/src/nsMsgRDFDataSource.h: In static member function 'static nsresult nsMsgRDFDataSource::cycleCollection::TraverseImpl(nsMsgRDFDataSource::cycleCollection*, void*, nsCycleCollectionTraversalCallback&)':
../../../../mailnews/base/src/nsMsgRDFDataSource.h:64:30: error: invalid use of member 'nsMsgRDFDataSource::mObservers' in static member function
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:73:48: error: from this location
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:73:58: error: 'NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMARRAY' was not declared in this scope
../../../../mailnews/base/src/nsMsgRDFDataSource.cpp:74:3: error: expected ';' before 'NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR'
make[8]: *** [nsMsgRDFDataSource.o] Error 1
OS: Windows 7 → All
Bug 806279 is suspect, from inspection...
Assignee: nobody → mconley
Hrm, so while bug 806279 touched NS_IMP_CYCLE_COLLECTION_UNLINK_NSCOMARRAY, it deprecated the macro instead of tearing it outright...so, in theory, it *is* supposed to still work.

Waiting for my build to "finish", and then I'll dig into this.
Hey Benoit,

So I think the simple fix for us here is to simply switch to using the generic NS_IMP_CYCLE_COLLECTION_UNLINK and NS_IMP_CYCLE_COLLECTION_TRAVERSE macros. That fixes my build locally, and is what I'll be committing.

Just wanted to give you the heads up though that if you wanted those macros to be deprecated[1] as opposed to busted, they appear to be in the latter state.

-Mike

[1] I assume they're supposed to be deprecated because of http://mxr.mozilla.org/comm-central/source/mozilla/xpcom/glue/nsCycleCollectionParticipant.h#449
Attached patch Bustage fixSplinter Review
Landed on comm-central as https://hg.mozilla.org/comm-central/rev/b7f3c2fb9d50
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 19.0
That is the right bustage fix!

I also *think*, but I am not sure, that it is abnormal that you are only traversing 2 fields whereas you are unlinking 3 fields. CC'ing smaug who would know for sure.

If you are OK with traversing these 3 fields, you can use the nice helper macro NS_IMPL_CYCLE_COLLECTION_3 to do all this goop for you.
Note that the removal of the old macros was done in bug 807437, landed at the same time.
Blocks: 807437
It is unusual to unlink more, but that should be still ok.
If cycle collector has found a garbage cycle, unlink will be called. Missing edge
(in traverse) could lead to leak.

So, you probably want to traverse all the cycle collectable member variables and unlink them all too.
No longer blocks: 807437
Hrm - so, while that patch may have fixed things locally on my Linux box, I'm still getting some failures coming in. It's a bit early though - let's see what other failures tbpl reports.

https://tbpl.mozilla.org/?tree=Thunderbird-Trunk&rev=b7f3c2fb9d50
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Bug 807437 has a little script thing you can run that should fix most of it. Though double check to make sure it is reasonable.
Hrm - so the failures I saw were unrelated. I just did a clobber on our Windows boxes to see that'll clear it.  Anyhow, I'm pretty sure this is fixed. Thanks all.
Status: REOPENED → RESOLVED
Closed: 12 years ago12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: