mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 595277 - Part 0: Clear out user data on destroy. r=roc
This commit is contained in:
parent
aee13a8cd4
commit
e53c7eb164
@ -190,6 +190,15 @@ public:
|
||||
return mKey == aKey ? mValue.get() : nsnull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear out current user data.
|
||||
*/
|
||||
void Clear()
|
||||
{
|
||||
mKey = nsnull;
|
||||
mValue = nsnull;
|
||||
}
|
||||
|
||||
private:
|
||||
void* mKey;
|
||||
nsAutoPtr<LayerUserData> mValue;
|
||||
@ -241,7 +250,7 @@ public:
|
||||
* for its widget going away. After this call, only user data calls
|
||||
* are valid on the layer manager.
|
||||
*/
|
||||
virtual void Destroy() { mDestroyed = PR_TRUE; }
|
||||
virtual void Destroy() { mDestroyed = PR_TRUE; mUserData.Clear(); }
|
||||
PRBool IsDestroyed() { return mDestroyed; }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user