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

Unified Diff: src/core/SkVarAlloc.cpp

Issue 1339093002: Have SkVarAlloc::alloc() use sk_malloc_throw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: no, always throw Created 5 years, 3 months 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
« no previous file with comments | « src/core/SkVarAlloc.h ('k') | src/gpu/GrBatchFontCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkVarAlloc.cpp
diff --git a/src/core/SkVarAlloc.cpp b/src/core/SkVarAlloc.cpp
index f95370585d06f9aee8bbb028c3ecda835f4c245b..840cf28347283632ec4a8ad810afdb52e1ea8228 100644
--- a/src/core/SkVarAlloc.cpp
+++ b/src/core/SkVarAlloc.cpp
@@ -18,9 +18,9 @@ struct SkVarAlloc::Block {
Block* prev;
char* data() { return (char*)(this + 1); }
- static Block* Alloc(Block* prev, size_t size, unsigned flags) {
+ static Block* Alloc(Block* prev, size_t size) {
SkASSERT(size >= sizeof(Block));
- Block* b = (Block*)sk_malloc_flags(size, flags);
+ Block* b = (Block*)sk_malloc_throw(size);
b->prev = prev;
return b;
}
@@ -49,7 +49,7 @@ SkVarAlloc::~SkVarAlloc() {
}
}
-void SkVarAlloc::makeSpace(size_t bytes, unsigned flags) {
+void SkVarAlloc::makeSpace(size_t bytes) {
SkASSERT(SkIsAlignPtr(bytes));
size_t alloc = 1<<fLgSize++;
@@ -57,7 +57,7 @@ void SkVarAlloc::makeSpace(size_t bytes, unsigned flags) {
alloc *= 2;
}
fBytesAllocated += alloc;
- fBlock = Block::Alloc(fBlock, alloc, flags);
+ fBlock = Block::Alloc(fBlock, alloc);
fByte = fBlock->data();
fRemaining = alloc - sizeof(Block);
« no previous file with comments | « src/core/SkVarAlloc.h ('k') | src/gpu/GrBatchFontCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698