Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/FontResource.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/FontResource.cpp b/third_party/WebKit/Source/core/fetch/FontResource.cpp |
| index 2de0a247cda364998c55aca696d0456f8f37c313..86f9a9fad5012fba0c931fd8816aacc872311495 100644 |
| --- a/third_party/WebKit/Source/core/fetch/FontResource.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/FontResource.cpp |
| @@ -175,4 +175,16 @@ void FontResource::checkNotify() { |
| Resource::checkNotify(); |
| } |
| +bool FontResource::isLowPriorityLoadingAllowedForRemoteFont() const { |
| + assert(!url().protocolIsData()); |
| + assert(!isLoaded()); |
|
hiroshige
2016/11/15 06:05:41
Please use DCHECK() instead of assert().
tbansal1
2016/11/15 08:17:04
Done. Thanks for catching this.
|
| + ResourceClientWalker<FontResourceClient> walker(clients()); |
| + while (FontResourceClient* client = walker.next()) { |
| + if (!client->isLowPriorityLoadingAllowedForRemoteFont()) { |
| + return false; |
| + } |
| + } |
| + return true; |
| +} |
| + |
| } // namespace blink |