mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 07:42:04 +00:00
Backed out changeset 3d201ae294f8 (bug 1272398), on a hunch that it might have inadvertantly triggered a latent Win PGO crash in layers code
CLOSED TREE MozReview-Commit-ID: 87w8DC3JEM8
This commit is contained in:
parent
5337e6e882
commit
ad862a27cb
@ -219,10 +219,10 @@ LayerManager::LayerUserDataDestroy(void* data)
|
||||
delete static_cast<LayerUserData*>(data);
|
||||
}
|
||||
|
||||
UniquePtr<LayerUserData>
|
||||
nsAutoPtr<LayerUserData>
|
||||
LayerManager::RemoveUserData(void* aKey)
|
||||
{
|
||||
UniquePtr<LayerUserData> d(static_cast<LayerUserData*>(mUserData.Remove(static_cast<gfx::UserDataKey*>(aKey))));
|
||||
nsAutoPtr<LayerUserData> d(static_cast<LayerUserData*>(mUserData.Remove(static_cast<gfx::UserDataKey*>(aKey))));
|
||||
return d;
|
||||
}
|
||||
|
||||
@ -2148,10 +2148,10 @@ Layer::IsBackfaceHidden()
|
||||
return false;
|
||||
}
|
||||
|
||||
UniquePtr<LayerUserData>
|
||||
nsAutoPtr<LayerUserData>
|
||||
Layer::RemoveUserData(void* aKey)
|
||||
{
|
||||
UniquePtr<LayerUserData> d(static_cast<LayerUserData*>(mUserData.Remove(static_cast<gfx::UserDataKey*>(aKey))));
|
||||
nsAutoPtr<LayerUserData> d(static_cast<LayerUserData*>(mUserData.Remove(static_cast<gfx::UserDataKey*>(aKey))));
|
||||
return d;
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ public:
|
||||
/**
|
||||
* This can be used anytime. Ownership passes to the caller!
|
||||
*/
|
||||
UniquePtr<LayerUserData> RemoveUserData(void* aKey);
|
||||
nsAutoPtr<LayerUserData> RemoveUserData(void* aKey);
|
||||
|
||||
/**
|
||||
* This getter can be used anytime.
|
||||
@ -1462,7 +1462,7 @@ public:
|
||||
/**
|
||||
* This can be used anytime. Ownership passes to the caller!
|
||||
*/
|
||||
UniquePtr<LayerUserData> RemoveUserData(void* aKey);
|
||||
nsAutoPtr<LayerUserData> RemoveUserData(void* aKey);
|
||||
/**
|
||||
* This getter can be used anytime.
|
||||
*/
|
||||
|
@ -150,9 +150,9 @@ TEST(Layers, UserData) {
|
||||
layer.SetUserData(key3, data3);
|
||||
|
||||
// Also checking that the user data is returned but not free'd
|
||||
UniquePtr<LayerUserData> d1(layer.RemoveUserData(key1));
|
||||
UniquePtr<LayerUserData> d2(layer.RemoveUserData(key2));
|
||||
UniquePtr<LayerUserData> d3(layer.RemoveUserData(key3));
|
||||
UniquePtr<LayerUserData> d1(layer.RemoveUserData(key1).forget());
|
||||
UniquePtr<LayerUserData> d2(layer.RemoveUserData(key2).forget());
|
||||
UniquePtr<LayerUserData> d3(layer.RemoveUserData(key3).forget());
|
||||
ASSERT_EQ(data1, d1.get());
|
||||
ASSERT_EQ(data2, d2.get());
|
||||
ASSERT_EQ(data3, d3.get());
|
||||
|
Loading…
Reference in New Issue
Block a user