Chromium Code Reviews

Unified Diff: src/hashmap.cc

Issue 159192: Fix some defects identifies by Coverity Prevent. All are false... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hashmap.cc
===================================================================
--- src/hashmap.cc (revision 2520)
+++ src/hashmap.cc (working copy)
@@ -194,7 +194,10 @@
void HashMap::Initialize(uint32_t capacity) {
ASSERT(IsPowerOf2(capacity));
map_ = reinterpret_cast<Entry*>(allocator_->New(capacity * sizeof(Entry)));
- if (map_ == NULL) V8::FatalProcessOutOfMemory("HashMap::Initialize");
+ if (map_ == NULL) {
+ V8::FatalProcessOutOfMemory("HashMap::Initialize");
+ return;
+ }
capacity_ = capacity;
Clear();
}
« no previous file with comments | « no previous file | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine