diff options
author | avi <avi@chromium.org> | 2015-12-08 16:44:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-09 00:45:45 +0000 |
commit | dd4e61435aa91c89b1efc083c905f4376ef70aa9 (patch) | |
tree | 14fc41a1e7601470359bfcc3d213c12ebaf15bb8 /ppapi | |
parent | 24f1ae8c7c39f5bd7e03310b91c26b4ce1f93a3f (diff) | |
download | chromium_src-dd4e61435aa91c89b1efc083c905f4376ef70aa9.zip chromium_src-dd4e61435aa91c89b1efc083c905f4376ef70aa9.tar.gz chromium_src-dd4e61435aa91c89b1efc083c905f4376ef70aa9.tar.bz2 |
Remove kint64max.
BUG=138542,488550
Review URL: https://codereview.chromium.org/1498003003
Cr-Commit-Position: refs/heads/master@{#363854}
Diffstat (limited to 'ppapi')
-rw-r--r-- | ppapi/proxy/file_io_resource.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ppapi/proxy/file_io_resource.cc b/ppapi/proxy/file_io_resource.cc index e119dd5..1d31ef4 100644 --- a/ppapi/proxy/file_io_resource.cc +++ b/ppapi/proxy/file_io_resource.cc @@ -4,6 +4,8 @@ #include "ppapi/proxy/file_io_resource.h" +#include <limits> + #include "base/bind.h" #include "base/task_runner_util.h" #include "ipc/ipc_message.h" @@ -289,8 +291,10 @@ int32_t FileIOResource::Write(int64_t offset, increase = bytes_to_write; } else { uint64_t max_offset = offset + bytes_to_write; - if (max_offset > static_cast<uint64_t>(kint64max)) + if (max_offset > + static_cast<uint64_t>(std::numeric_limits<int64_t>::max())) { return PP_ERROR_FAILED; // amount calculation would overflow. + } increase = static_cast<int64_t>(max_offset) - max_written_offset_; } |