Fix pdfium use of base/numerics
TBR=jochen@chromium.org R=jochen@chromium.org BUG=668713 Review-Url: https://codereview.chromium.org/2543443003 Cr-Commit-Position: refs/heads/master@{#435159}
This commit is contained in:
@ -42,8 +42,7 @@ class PDFiumAPIStringBufferAdapter {
|
|||||||
|
|
||||||
template <typename IntType>
|
template <typename IntType>
|
||||||
void Close(IntType actual_size) {
|
void Close(IntType actual_size) {
|
||||||
base::CheckedNumeric<size_t> unsigned_size = actual_size;
|
Close(base::checked_cast<size_t>(actual_size));
|
||||||
Close(unsigned_size.ValueOrDie());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -88,8 +87,7 @@ class PDFiumAPIStringBufferSizeInBytesAdapter {
|
|||||||
|
|
||||||
template <typename IntType>
|
template <typename IntType>
|
||||||
void Close(IntType actual_size) {
|
void Close(IntType actual_size) {
|
||||||
base::CheckedNumeric<size_t> unsigned_size = actual_size;
|
Close(base::checked_cast<size_t>(actual_size));
|
||||||
Close(unsigned_size.ValueOrDie());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user