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

Unified Diff: src/preparser.h

Issue 7754014: Fix bug in collector. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 3 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 | « no previous file | src/preparser.cc » ('j') | src/utils.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/preparser.h
diff --git a/src/preparser.h b/src/preparser.h
index 010c5e2cf6e0080f880256f774fc8298add1ee43..b97b7cff60e16ee054f55ac2fb7299a796115472 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -61,11 +61,7 @@ class DuplicateFinder {
explicit DuplicateFinder(i::UnicodeCache* constants)
: unicode_constants_(constants),
backing_store_(16),
- map_(new i::HashMap(&Match)) { }
-
- ~DuplicateFinder() {
- delete map_;
- }
+ map_(&Match) { }
int AddAsciiSymbol(i::Vector<const char> key, int value);
int AddUC16Symbol(i::Vector<const uint16_t> key, int value);
@@ -101,7 +97,7 @@ class DuplicateFinder {
i::UnicodeCache* unicode_constants_;
// Backing store used to store strings used as hashmap keys.
i::SequenceCollector<unsigned char> backing_store_;
- i::HashMap* map_;
+ i::HashMap map_;
// Buffer used for string->number->canonical string conversions.
char number_buffer_[kBufferSize];
};
« no previous file with comments | « no previous file | src/preparser.cc » ('j') | src/utils.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698