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

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

Issue 1474353002: Remove easy to remove calls to Isolate::Current() from api.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update Created 5 years, 1 month 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
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index faa418f4ac4aa6fed7469aa62667c7d9f5ef8b70..27a4c23bf48ea04a2bbd1dc9d57fef9f65288ab4 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1539,7 +1539,8 @@ class GraphWithImplicitRefs {
instance_ = NULL;
}
- static void gcPrologue(v8::GCType type, v8::GCCallbackFlags flags) {
+ static void gcPrologue(v8::Isolate* isolate, v8::GCType type,
+ v8::GCCallbackFlags flags) {
instance_->AddImplicitReferences();
}
@@ -1571,7 +1572,7 @@ TEST(HeapSnapshotImplicitReferences) {
v8::HeapProfiler* heap_profiler = env->GetIsolate()->GetHeapProfiler();
GraphWithImplicitRefs graph(&env);
- v8::V8::AddGCPrologueCallback(&GraphWithImplicitRefs::gcPrologue);
+ env->GetIsolate()->AddGCPrologueCallback(&GraphWithImplicitRefs::gcPrologue);
const v8::HeapSnapshot* snapshot = heap_profiler->TakeHeapSnapshot();
CHECK(ValidateSnapshot(snapshot));
@@ -1594,7 +1595,8 @@ TEST(HeapSnapshotImplicitReferences) {
}
}
CHECK_EQ(2, implicit_targets_count);
- v8::V8::RemoveGCPrologueCallback(&GraphWithImplicitRefs::gcPrologue);
+ env->GetIsolate()->RemoveGCPrologueCallback(
+ &GraphWithImplicitRefs::gcPrologue);
}

Powered by Google App Engine
This is Rietveld 408576698