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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 2723033002: Skip nullptr after copyToVector() from HeapHashSet<WeakMember> (Closed)
Patch Set: Added comments (haraken's nit) Created 3 years, 10 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
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontSelector.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/fonts/FontCache.cpp
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
index 9208ac4499d472e7050295c73f450646bdf44527..5b9e9c2edc47e8e4afb9b7e7f274a1067c3c0d80 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -451,8 +451,12 @@ void FontCache::invalidate() {
HeapVector<Member<FontCacheClient>> clients;
copyToVector(fontCacheClients(), clients);
- for (const auto& client : clients)
- client->fontCacheInvalidated();
+ for (const auto& client : clients) {
+ // This should not be nullptr, but to see if checking nullptr can suppress
+ // crashes. crbug.com/581698
+ if (client)
+ client->fontCacheInvalidated();
+ }
purge(ForcePurge);
}
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSFontSelector.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698