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

Unified Diff: chrome/app/chrome_dll_main.cc

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/DEPS ('k') | skia/corecg/SkMemory_stdlib.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_dll_main.cc
===================================================================
--- chrome/app/chrome_dll_main.cc (revision 14820)
+++ chrome/app/chrome_dll_main.cc (working copy)
@@ -54,6 +54,7 @@
#if defined(OS_MACOSX)
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
#endif
+#include "skia/include/corecg/SkTypes.h"
extern int BrowserMain(const MainFunctionParams&);
extern int RendererMain(const MainFunctionParams&);
@@ -104,6 +105,12 @@
}
int OnNoMemory(size_t memory_size) {
+ // Skia indicates that it can safely handle some NULL allocs by clearing
+ // this flag. In this case, we'll ignore the new_handler and won't crash.
+ if (!sk_malloc_will_throw()) {
+ return;
+ }
+
__debugbreak();
// Return memory_size so it is not optimized out. Make sure the return value
// is at least 1 so malloc/new is retried, especially useful when under a
Property changes on: chrome\app\chrome_dll_main.cc
___________________________________________________________________
Added: svn:mergeinfo
Merged /branches/chrome_webkit_merge_branch/chrome/app/chrome_dll_main.cc:r69-2775
Merged /trunk/src/chrome/app/chrome_dll_main.cc:r13132,13255,13273,13285,13348,13453,13611,13636,13723,13916,13926,14234,14242,14891
« no previous file with comments | « chrome/app/DEPS ('k') | skia/corecg/SkMemory_stdlib.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698