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

Unified Diff: net/tools/crash_cache/crash_cache.cc

Issue 23441026: Don't check the result of new for NULL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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/tools/crash_service/crash_service.cc ('k') | ppapi/cpp/websocket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/crash_cache/crash_cache.cc
diff --git a/net/tools/crash_cache/crash_cache.cc b/net/tools/crash_cache/crash_cache.cc
index 700e822aeba6cf76a6c423742b47907a0319b21a..72addfbb004eed03e8dc97eaefe14c5b6a005b7b 100644
--- a/net/tools/crash_cache/crash_cache.cc
+++ b/net/tools/crash_cache/crash_cache.cc
@@ -268,7 +268,7 @@ int LoadOperations(const base::FilePath& path, RankCrashes action,
// Work with a tiny index table (16 entries).
disk_cache::BackendImpl* cache = new disk_cache::BackendImpl(
path, 0xf, cache_thread->message_loop_proxy().get(), NULL);
- if (!cache || !cache->SetMaxSize(0x100000))
+ if (!cache->SetMaxSize(0x100000))
rvargas (doing something else) 2013/09/03 19:01:06 Can we leave this as it was? This is a tool, not p
Nico 2013/09/03 19:17:33 Have you checked that new actually returns null on
rvargas (doing something else) 2013/10/16 19:01:23 As of vs2010 this also crashes with C++ exceptions
return GENERIC;
// No experiments and use a simple LRU.
« no previous file with comments | « chrome/tools/crash_service/crash_service.cc ('k') | ppapi/cpp/websocket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698