Last Comment Bug 812246 - Build bustage - error: nsMsgRDFDataSource.h - invalid use of member 'nsMsgRDFDataSource::mObservers' in static member function
: Build bustage - error: nsMsgRDFDataSource.h - invalid use of member 'nsMsgRDF...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: General (show other bugs)
: unspecified
: x86 All
: -- normal (vote)
: Thunderbird 19.0
Assigned To: Mike Conley (:mconley) - (Needinfo me!)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-15 10:59 PST by Mike Conley (:mconley) - (Needinfo me!)
Modified: 2012-11-15 17:49 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Bustage fix (1.28 KB, patch)
2012-11-15 12:05 PST, Mike Conley (:mconley) - (Needinfo me!)
no flags Details | Diff | Splinter Review

Description Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 10:59:13 PST
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
Comment 1 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 11:03:46 PST
Bug 806279 is suspect, from inspection...
Comment 2 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 11:24:26 PST
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.
Comment 3 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 12:02:02 PST
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
Comment 4 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 12:05:06 PST
Created attachment 682119 [details] [diff] [review]
Bustage fix
Comment 5 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 12:07:01 PST
Landed on comm-central as https://hg.mozilla.org/comm-central/rev/b7f3c2fb9d50
Comment 6 Benoit Jacob [:bjacob] (mostly away) 2012-11-15 12:39:43 PST
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.
Comment 7 Benoit Jacob [:bjacob] (mostly away) 2012-11-15 12:40:48 PST
Note that the removal of the old macros was done in bug 807437, landed at the same time.
Comment 8 Olli Pettay [:smaug] 2012-11-15 13:17:21 PST
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.
Comment 9 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 13:25:42 PST
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
Comment 10 Andrew McCreight [:mccr8] 2012-11-15 13:27:26 PST
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.
Comment 11 Mike Conley (:mconley) - (Needinfo me!) 2012-11-15 17:49:48 PST
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.

Note You need to log in before you can comment on or make changes to this bug.