Index: base/allocator/generic_allocators.cc |
=================================================================== |
--- base/allocator/generic_allocators.cc (revision 108802) |
+++ base/allocator/generic_allocators.cc (working copy) |
@@ -105,15 +105,32 @@ |
#undef malloc |
#undef free |
#undef calloc |
-int _CrtDbgReport(int, const char*, int, const char*, const char*, ...) { |
+ |
+static int error_handler(int reportType) { |
+ if (reportType == 0) // _CRT_WARN |
rvargas (doing something else)
2011/11/07 18:53:50
It is not clear to me that this is the right thing
|
+ return 0; |
+ // Remaining alternatives are _CRT_ERROR, and _CRT_ASSERT. |
+ char* p = NULL; |
+ *p = '0'; |
rvargas (doing something else)
2011/11/07 18:53:50
Can we just DCHECK here instead? You're probably t
|
return 0; |
} |
-int _CrtDbgReportW(int, const wchar_t*, int, const wchar_t*, |
- const wchar_t*, ...) { |
- return 0; |
+int _CrtDbgReport(int reportType, |
+ const char*, |
+ int, const char*, |
+ const char*, |
+ ...) { |
+ return error_handler(reportType); |
} |
+int _CrtDbgReportW(int reportType, |
+ const wchar_t*, |
+ int, const wchar_t*, |
+ const wchar_t*, |
+ ...) { |
+ return error_handler(reportType); |
+} |
+ |
int _CrtSetReportMode(int, int) { |
return 0; |
} |