Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp

Issue 2027333004: Handle uncommitted PaintController in DisplayItemClient aliveness tracking (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
index 65429d41dc4ac67658c7802df1674c71e349872a..7745871824f85076eb9b49e10683437466f794d4 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
@@ -46,20 +46,26 @@ bool DisplayItemClient::isAlive() const
return liveDisplayItemClients && liveDisplayItemClients->contains(this);
}
-void DisplayItemClient::beginShouldKeepAlive(const void* owner) const
+void DisplayItemClient::beginShouldKeepAlive(const void* paintController) const
{
CHECK(isAlive());
if (!displayItemClientsShouldKeepAlive)
displayItemClientsShouldKeepAlive = new HashMap<const void*, HashMap<const DisplayItemClient*, String>>();
- auto addResult = displayItemClientsShouldKeepAlive->add(owner, HashMap<const DisplayItemClient*, String>()).storedValue->value.add(this, "");
+ auto addResult = displayItemClientsShouldKeepAlive->add(paintController, HashMap<const DisplayItemClient*, String>()).storedValue->value.add(this, "");
if (addResult.isNewEntry)
addResult.storedValue->value = debugName();
}
-void DisplayItemClient::endShouldKeepAliveAllClients(const void* owner)
+void DisplayItemClient::endShouldKeepAliveAllClients(const void* paintController)
{
if (displayItemClientsShouldKeepAlive)
- displayItemClientsShouldKeepAlive->remove(owner);
+ displayItemClientsShouldKeepAlive->remove(paintController);
+}
+
+void DisplayItemClient::endShouldKeepAliveAllClients()
+{
+ delete displayItemClientsShouldKeepAlive;
+ displayItemClientsShouldKeepAlive = nullptr;
}
#endif // CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS

Powered by Google App Engine
This is Rietveld 408576698