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

Unified Diff: src/string-stream.cc

Issue 23479015: thread isolate in PreallocatedStorageAllocationPolicy (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: forgot explicit dtor Created 7 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 | « src/list.h ('k') | src/zone.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/string-stream.cc
diff --git a/src/string-stream.cc b/src/string-stream.cc
index 9c4394ed7f01d1e3e3f1b405a616e1701664433a..8ab1244364310e4b997cae276975a358bd9598f2 100644
--- a/src/string-stream.cc
+++ b/src/string-stream.cc
@@ -204,7 +204,9 @@ void StringStream::PrintObject(Object* o) {
}
if (debug_object_cache->length() < kMentionedObjectCacheMaxSize) {
Add("#%d#", debug_object_cache->length());
- debug_object_cache->Add(HeapObject::cast(o));
+ HeapObject* ho = HeapObject::cast(o);
+ PreallocatedStorageAllocationPolicy policy(ho->GetIsolate());
+ debug_object_cache->Add(ho, policy);
} else {
Add("@%p", o);
}
@@ -299,8 +301,9 @@ void StringStream::ClearMentionedObjectCache() {
Isolate* isolate = Isolate::Current();
isolate->set_string_stream_current_security_token(NULL);
if (isolate->string_stream_debug_object_cache() == NULL) {
+ PreallocatedStorageAllocationPolicy policy(isolate);
isolate->set_string_stream_debug_object_cache(
- new List<HeapObject*, PreallocatedStorageAllocationPolicy>(0));
+ new(policy) DebugObjectCache(policy));
}
isolate->string_stream_debug_object_cache()->Clear();
}
« no previous file with comments | « src/list.h ('k') | src/zone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698