Chromium Code Reviews

Unified Diff: src/isolate.cc

Issue 9464054: Do not call memset() to initialize StubCache. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 10 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/stub-cache.cc » ('j') | src/stub-cache.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 128136faa0b83d47ba0ed90fa972cf04282e1d2f..7445e40f0d10d07c492509dc58b9ab12ef9831af 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1630,7 +1630,7 @@ Isolate::~Isolate() {
delete transcendental_cache_;
transcendental_cache_ = NULL;
- delete stub_cache_;
+ free(stub_cache_);
Sven Panne 2012/02/27 13:03:29 Leave this as-is.
stub_cache_ = NULL;
delete stats_table_;
stats_table_ = NULL;
@@ -1779,7 +1779,7 @@ bool Isolate::Init(Deserializer* des) {
global_handles_ = new GlobalHandles(this);
bootstrapper_ = new Bootstrapper();
handle_scope_implementer_ = new HandleScopeImplementer(this);
- stub_cache_ = new StubCache(this);
+ stub_cache_ = new (calloc(1, sizeof(StubCache))) StubCache(this);
Sven Panne 2012/02/27 13:03:29 I think we can remove this line completely and rep
ulan 2012/02/27 16:13:02 Unfortunately, builtins.SetUp() assumes that stub_
regexp_stack_ = new RegExpStack();
regexp_stack_->isolate_ = this;
« no previous file with comments | « no previous file | src/stub-cache.cc » ('j') | src/stub-cache.cc » ('J')

Powered by Google App Engine