mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-02 12:07:52 +00:00
Fix bug where we would randomly crash in the RDF notification handler. We weren't properly disposing of the personal toolbar pane and so it would get events long after it was deleted, causing crashes.
This commit is contained in:
parent
46f5ffb26f
commit
349dc120eb
@ -63,10 +63,10 @@ CPersonalToolbarTable :: CPersonalToolbarTable ( LStream* inStream )
|
||||
// setup our window into the RDF world and register this class as the one to be notified
|
||||
// when the personal toolbar changes.
|
||||
HT_Notification notifyStruct = CreateNotificationStruct();
|
||||
HT_Pane toolbarPane = HT_NewPersonalToolbarPane(notifyStruct);
|
||||
if ( !toolbarPane )
|
||||
mToolbarPane = HT_NewPersonalToolbarPane(notifyStruct);
|
||||
if ( !mToolbarPane )
|
||||
throw SomethingBadInHTException();
|
||||
mToolbarView = HT_GetSelectedView ( toolbarPane );
|
||||
mToolbarView = HT_GetSelectedView ( mToolbarPane );
|
||||
if ( !mToolbarView )
|
||||
throw SomethingBadInHTException();
|
||||
mToolbarRoot = HT_TopNode ( mToolbarView );
|
||||
@ -109,6 +109,12 @@ CPersonalToolbarTable :: ~CPersonalToolbarTable ( )
|
||||
{
|
||||
delete mButtonList;
|
||||
|
||||
if ( mToolbarPane ) {
|
||||
// we don't want to know about any events while we're being deleted!
|
||||
HT_SetNotificationMask ( mToolbarPane, HT_EVENT_NO_NOTIFICATION_MASK );
|
||||
HT_DeletePane ( mToolbarPane );
|
||||
}
|
||||
|
||||
} // destructor
|
||||
|
||||
|
||||
|
@ -158,7 +158,8 @@ class CPersonalToolbarTable : public LSmallIconTable, public LDragAndDrop,
|
||||
|
||||
HT_View mToolbarView;
|
||||
HT_Resource mToolbarRoot;
|
||||
|
||||
HT_Pane mToolbarPane;
|
||||
|
||||
ButtonList* mButtonList; // list of buttons pulled from HT
|
||||
bool mIsInitialized; // is this class ready for prime time?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user