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

Unified Diff: test/cctest/test-api.cc

Issue 1293283003: [heap,cctest] Get rid of protected-for-sake-of-testing scope. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add heap-tester.h to cctest.gyp Created 5 years, 4 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-alloc.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index da615597f66637fba701c9bea6904694766e8f6c..2e085d1b61b76a66e5c753ecf4646505a43f9827 100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -50,6 +50,7 @@
#include "src/unicode-inl.h"
#include "src/utils.h"
#include "src/vm-state.h"
+#include "test/cctest/heap-tester.h"
static const bool kLogThreading = false;
@@ -6686,7 +6687,11 @@ static void ResetUseValueAndSetFlag(
}
-static void ResetWeakHandle(bool global_gc) {
+void v8::internal::HeapTester::ResetWeakHandle(bool global_gc) {
+ using v8::Context;
+ using v8::Local;
+ using v8::Object;
+
v8::Isolate* iso = CcTest::isolate();
v8::HandleScope scope(iso);
v8::Handle<Context> context = Context::New(iso);
@@ -6701,8 +6706,7 @@ static void ResetWeakHandle(bool global_gc) {
object_a.handle.Reset(iso, a);
object_b.handle.Reset(iso, b);
if (global_gc) {
- CcTest::heap()->CollectAllGarbage(
- TestHeap::Heap::kAbortIncrementalMarkingMask);
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
} else {
CcTest::heap()->CollectGarbage(i::NEW_SPACE);
}
@@ -6720,8 +6724,7 @@ static void ResetWeakHandle(bool global_gc) {
CHECK(object_b.handle.IsIndependent());
}
if (global_gc) {
- CcTest::heap()->CollectAllGarbage(
- TestHeap::Heap::kAbortIncrementalMarkingMask);
+ CcTest::heap()->CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
} else {
CcTest::heap()->CollectGarbage(i::NEW_SPACE);
}
@@ -6730,9 +6733,9 @@ static void ResetWeakHandle(bool global_gc) {
}
-THREADED_TEST(ResetWeakHandle) {
- ResetWeakHandle(false);
- ResetWeakHandle(true);
+THREADED_HEAP_TEST(ResetWeakHandle) {
+ v8::internal::HeapTester::ResetWeakHandle(false);
+ v8::internal::HeapTester::ResetWeakHandle(true);
}
« no previous file with comments | « test/cctest/test-alloc.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698