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

Side by Side Diff: third_party/WebKit/Source/core/css/CSSFontSelector.cpp

Issue 1652953002: Make copyToVector() robust against conservative GCs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unnecessary 'template' use Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/HashCountedSet.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008, 2011 Apple Inc. All rights reserved.
3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> 3 * (C) 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org>
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 m_clients.remove(client); 76 m_clients.remove(client);
77 } 77 }
78 #endif 78 #endif
79 79
80 void CSSFontSelector::dispatchInvalidationCallbacks() 80 void CSSFontSelector::dispatchInvalidationCallbacks()
81 { 81 {
82 m_fontFaceCache.incrementVersion(); 82 m_fontFaceCache.incrementVersion();
83 83
84 WillBeHeapVector<RawPtrWillBeMember<CSSFontSelectorClient>> clients; 84 WillBeHeapVector<RawPtrWillBeMember<CSSFontSelectorClient>> clients;
85 copyToVector(m_clients, clients); 85 copyToVector(m_clients, clients);
86 // TODO(sof): the null check is temporarily in place to speculatively addres s 86 for (auto& client : clients)
87 // crbug.com/568173. 87 client->fontsNeedUpdate(this);
88 for (auto& client : clients) {
89 if (client)
90 client->fontsNeedUpdate(this);
91 }
92 } 88 }
93 89
94 void CSSFontSelector::fontFaceInvalidated() 90 void CSSFontSelector::fontFaceInvalidated()
95 { 91 {
96 dispatchInvalidationCallbacks(); 92 dispatchInvalidationCallbacks();
97 } 93 }
98 94
99 void CSSFontSelector::fontCacheInvalidated() 95 void CSSFontSelector::fontCacheInvalidated()
100 { 96 {
101 dispatchInvalidationCallbacks(); 97 dispatchInvalidationCallbacks();
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 #if ENABLE(OILPAN) 185 #if ENABLE(OILPAN)
190 visitor->trace(m_document); 186 visitor->trace(m_document);
191 visitor->trace(m_fontFaceCache); 187 visitor->trace(m_fontFaceCache);
192 visitor->trace(m_clients); 188 visitor->trace(m_clients);
193 visitor->trace(m_fontLoader); 189 visitor->trace(m_fontLoader);
194 #endif 190 #endif
195 FontSelector::trace(visitor); 191 FontSelector::trace(visitor);
196 } 192 }
197 193
198 } // namespace blink 194 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/HashCountedSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698