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 @@ DisplayItemClient::~DisplayItemClient() |
} |
} |
liveDisplayItemClients->remove(this); |
+ // In case this object is a subsequence owner. |
+ endShouldKeepAliveAllClients(this); |
} |
bool DisplayItemClient::isAlive() const |
@@ -46,20 +48,20 @@ bool DisplayItemClient::isAlive() const |
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() |