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

Unified Diff: test/cctest/test-heap-profiler.cc

Issue 14294009: Revert the commits adding new GC-related APIs. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: remove test Created 7 years, 8 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 | « test/cctest/test-global-handles.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index ff2838cd730ee842ee194b2ff14ff6ea02ef8566..59e7b8f25498896a962ae736a1af8a335cdc21ba 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1191,10 +1191,9 @@ class GraphWithImplicitRefs {
explicit GraphWithImplicitRefs(LocalContext* env) {
CHECK_EQ(NULL, instance_);
instance_ = this;
- isolate_ = (*env)->GetIsolate();
+ v8::Isolate* isolate = (*env)->GetIsolate();
for (int i = 0; i < kObjectsCount; i++) {
- objects_[i] =
- v8::Persistent<v8::Object>::New(isolate_, v8::Object::New());
+ objects_[i] = v8::Persistent<v8::Object>::New(isolate, v8::Object::New());
}
(*env)->Global()->Set(v8_str("root_object"), objects_[0]);
}
@@ -1209,35 +1208,15 @@ class GraphWithImplicitRefs {
private:
void AddImplicitReferences() {
// 0 -> 1
- v8::V8::SetObjectGroupId(isolate_,
- v8::Persistent<v8::Object>::Cast(objects_[0]),
- v8::UniqueId(1));
- v8::V8::SetObjectGroupRepresentative(
- isolate_,
- v8::UniqueId(1),
- v8::Persistent<v8::Object>::Cast(objects_[0]));
- v8::V8::AddImplicitReference(isolate_,
- v8::UniqueId(1),
- v8::Persistent<v8::Object>::Cast(objects_[1]));
+ v8::V8::AddImplicitReferences(
+ v8::Persistent<v8::Object>::Cast(objects_[0]), &objects_[1], 1);
// Adding two more references(note length=2 in params): 1 -> 2, 1 -> 3
- v8::V8::SetObjectGroupId(isolate_,
- v8::Persistent<v8::Object>::Cast(objects_[1]),
- v8::UniqueId(2));
- v8::V8::SetObjectGroupRepresentative(
- isolate_,
- v8::UniqueId(2),
- v8::Persistent<v8::Object>::Cast(objects_[1]));
- v8::V8::AddImplicitReference(isolate_,
- v8::UniqueId(2),
- v8::Persistent<v8::Object>::Cast(objects_[2]));
- v8::V8::AddImplicitReference(isolate_,
- v8::UniqueId(2),
- v8::Persistent<v8::Object>::Cast(objects_[3]));
+ v8::V8::AddImplicitReferences(
+ v8::Persistent<v8::Object>::Cast(objects_[1]), &objects_[2], 2);
}
v8::Persistent<v8::Value> objects_[kObjectsCount];
static GraphWithImplicitRefs* instance_;
- v8::Isolate* isolate_;
};
GraphWithImplicitRefs* GraphWithImplicitRefs::instance_ = NULL;
« no previous file with comments | « test/cctest/test-global-handles.cc ('k') | test/cctest/test-mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698