mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 778036 - Add Has function to gfx::UserData and use it in Layers to correctly check for existance of user data. r=roc
This commit is contained in:
parent
bd240c97f8
commit
452cca761a
@ -82,6 +82,16 @@ public:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
bool Has(UserDataKey *key)
|
||||
{
|
||||
for (int i=0; i<count; i++) {
|
||||
if (key == entries[i].key) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void Destroy()
|
||||
{
|
||||
for (int i=0; i<count; i++) {
|
||||
|
@ -393,7 +393,7 @@ public:
|
||||
*/
|
||||
bool HasUserData(void* aKey)
|
||||
{
|
||||
return GetUserData(aKey);
|
||||
return mUserData.Has(static_cast<gfx::UserDataKey*>(aKey));
|
||||
}
|
||||
/**
|
||||
* This getter can be used anytime. Ownership is retained by the layer
|
||||
@ -756,7 +756,7 @@ public:
|
||||
*/
|
||||
bool HasUserData(void* aKey)
|
||||
{
|
||||
return GetUserData(aKey);
|
||||
return mUserData.Has(static_cast<gfx::UserDataKey*>(aKey));
|
||||
}
|
||||
/**
|
||||
* This getter can be used anytime. Ownership is retained by the layer
|
||||
|
Loading…
Reference in New Issue
Block a user