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

Unified Diff: skia/corecg/SkMemory_stdlib.cpp

Issue 100179: Merge 14891 - A better fix for http://www.crbug.com/2044: crash... (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/branches/172/src/
Patch Set: Created 11 years, 8 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 | « chrome/app/chrome_dll_main.cc ('k') | skia/include/corecg/SkTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: skia/corecg/SkMemory_stdlib.cpp
===================================================================
--- skia/corecg/SkMemory_stdlib.cpp (revision 14820)
+++ skia/corecg/SkMemory_stdlib.cpp (working copy)
@@ -25,6 +25,8 @@
// #define SK_CHECK_TAGS // enable to double-check debugging link list
#endif
+static bool g_sk_malloc_will_throw = true;
+
#ifdef SK_TAG_BLOCKS
#include "SkThread.h"
@@ -257,7 +259,13 @@
size += sizeof(SkBlockHeader);
#endif
+ if (!(flags & SK_MALLOC_THROW)) {
+ g_sk_malloc_will_throw = false;
+ }
void* p = malloc(size);
+ if (!(flags & SK_MALLOC_THROW)) {
+ g_sk_malloc_will_throw = true;
+ }
if (p == NULL)
{
if (flags & SK_MALLOC_THROW)
@@ -278,3 +286,7 @@
return p;
}
+bool sk_malloc_will_throw()
+{
+ return g_sk_malloc_will_throw;
+}
Property changes on: skia\corecg\SkMemory_stdlib.cpp
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/skia/corecg/SkMemory_stdlib.cpp:r69-2775
Merged /trunk/src/skia/corecg/SkMemory_stdlib.cpp:r14891
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | skia/include/corecg/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698