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

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

Issue 2082553002: Reland of Check DisplayItemCient aliveness in cached subsequences (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 7745871824f85076eb9b49e10683437466f794d4..1e196f2ef26e9c762da1f1a54f835f68e0748d55 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
+++ b/third_party/WebKit/Source/platform/graphics/paint/DisplayItemClient.cpp
@@ -39,6 +39,8 @@
}
}
liveDisplayItemClients->remove(this);
+ // In case this object is a subsequence owner.
+ endShouldKeepAliveAllClients(this);
}
bool DisplayItemClient::isAlive() const
@@ -46,20 +48,20 @@
return liveDisplayItemClients && liveDisplayItemClients->contains(this);
}
-void DisplayItemClient::beginShouldKeepAlive(const void* paintController) const
+void DisplayItemClient::beginShouldKeepAlive(const void* owner) const
{
CHECK(isAlive());
if (!displayItemClientsShouldKeepAlive)
displayItemClientsShouldKeepAlive = new HashMap<const void*, HashMap<const DisplayItemClient*, String>>();
- auto addResult = displayItemClientsShouldKeepAlive->add(paintController, HashMap<const DisplayItemClient*, String>()).storedValue->value.add(this, "");
+ auto addResult = displayItemClientsShouldKeepAlive->add(owner, HashMap<const DisplayItemClient*, String>()).storedValue->value.add(this, "");
if (addResult.isNewEntry)
addResult.storedValue->value = debugName();
}
-void DisplayItemClient::endShouldKeepAliveAllClients(const void* paintController)
+void DisplayItemClient::endShouldKeepAliveAllClients(const void* owner)
{
if (displayItemClientsShouldKeepAlive)
- displayItemClientsShouldKeepAlive->remove(paintController);
+ displayItemClientsShouldKeepAlive->remove(owner);
}
void DisplayItemClient::endShouldKeepAliveAllClients()

Powered by Google App Engine
This is Rietveld 408576698