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

Unified Diff: src/core/SkTLList.h

Issue 1345373006: SkTLList throw on sk_malloc fail (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkTLList.h
diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h
index ac7f0fa2ab125732833231df562c75f5b35e79d7..05755f59587691bc070cac33ac04279792061a8d 100644
--- a/src/core/SkTLList.h
+++ b/src/core/SkTLList.h
@@ -247,7 +247,7 @@ private:
fFreeList.remove(node);
++node->fBlock->fNodesInUse;
} else {
- Block* block = reinterpret_cast<Block*>(sk_malloc_flags(this->blockSize(), 0));
+ Block* block = reinterpret_cast<Block*>(sk_malloc_throw(this->blockSize()));
node = &block->fNodes[0];
new (node) Node;
node->fBlock = block;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698