Closed Bug 812246 Opened 10 years ago Closed 10 years ago

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


(Thunderbird :: General, defect)

Not set


(Not tracked)

Thunderbird 19.0


(Reporter: mconley, Assigned: mconley)



(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, 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.


[1] I assume they're supposed to be deprecated because of
Attached patch Bustage fixSplinter Review
Landed on comm-central as
Closed: 10 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.
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.
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.