aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkData.cpp
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2017-08-17 14:05:04 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-17 19:45:01 +0000
commit7ca9a74fef3296cdf1385785b5e817e963bb4c35 (patch)
tree1f614e020634351011fdd17af82b69bc080842f4 /src/core/SkData.cpp
parent800dc9949f6d7348629f843fd410402c2c39dbde (diff)
Remove uses of sk_throw.
The sk_throw macro is now an alias to SK_ABORT, but is often used when other macros better describe the situation. This change replaces sk_throw with SK_ABORT or SkASSERT_RELEASE as appropriate. Change-Id: I313facc6d535c8e8bec90ceeaf17ae3a381c48f3 Reviewed-on: https://skia-review.googlesource.com/35882 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkData.cpp')
-rw-r--r--src/core/SkData.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/SkData.cpp b/src/core/SkData.cpp
index 84b60be53b..0e4d17f11d 100644
--- a/src/core/SkData.cpp
+++ b/src/core/SkData.cpp
@@ -64,10 +64,7 @@ sk_sp<SkData> SkData::PrivateNewWithCopy(const void* srcOrNull, size_t length) {
}
const size_t actualLength = length + sizeof(SkData);
- if (actualLength < length) {
- // we overflowed
- sk_throw();
- }
+ SkASSERT_RELEASE(length < actualLength); // Check for overflow.
void* storage = ::operator new (actualLength);
sk_sp<SkData> data(new (storage) SkData(length));