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

Unified Diff: core/fxge/android/cfpf_skiafontmgr.cpp

Issue 2430743003: in the attempt to fix 627393, changed IFX_FileRead's readBlock to return the length it reads
Patch Set: delete the include folder Created 4 years, 1 month 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: core/fxge/android/cfpf_skiafontmgr.cpp
diff --git a/core/fxge/android/cfpf_skiafontmgr.cpp b/core/fxge/android/cfpf_skiafontmgr.cpp
index 6463e8b5311dafcc90656b02647c956f33b188e3..70d96582232942fd805610febe618fd7ea796bc0 100644
--- a/core/fxge/android/cfpf_skiafontmgr.cpp
+++ b/core/fxge/android/cfpf_skiafontmgr.cpp
@@ -33,7 +33,9 @@ static unsigned long FPF_SkiaStream_Read(FXFT_Stream stream,
if (!pFileRead)
return 0;
if (count > 0) {
- if (!pFileRead->ReadBlock(buffer, (FX_FILESIZE)offset, (size_t)count))
+ if (pFileRead->ReadBlock(buffer, (FX_FILESIZE)offset, (size_t)count) !=
+ static_cast<size_t>(count) &&
+ !pFileRead->IsEOF()) {
return 0;
}
return count;

Powered by Google App Engine
This is Rietveld 408576698