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

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

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 5 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
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc b/test/cctest/test-heap-profiler.cc
index 68ac3b594f7fd98ccc8a729c00caee276a6d2688..a085e9e79e2fdcfae6915dec9fd96aeef589bcd0 100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -2914,9 +2914,9 @@ TEST(SamplingHeapProfiler) {
heap_profiler->StartSamplingHeapProfiler(1024);
CompileRun(script_source);
- v8::base::SmartPointer<v8::AllocationProfile> profile(
+ std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
- CHECK(!profile.is_empty());
+ CHECK(profile);
const char* names[] = {"", "foo", "bar"};
auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names));
@@ -2941,9 +2941,9 @@ TEST(SamplingHeapProfiler) {
heap_profiler->StartSamplingHeapProfiler(128);
CompileRun(script_source);
- v8::base::SmartPointer<v8::AllocationProfile> profile(
+ std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
- CHECK(!profile.is_empty());
+ CHECK(profile);
const char* names[] = {"", "foo", "bar"};
auto node_bar = FindAllocationProfileNode(*profile, ArrayVector(names));
@@ -2975,9 +2975,9 @@ TEST(SamplingHeapProfiler) {
heap_profiler->StartSamplingHeapProfiler(64);
CompileRun(record_trace_tree_source);
- v8::base::SmartPointer<v8::AllocationProfile> profile(
+ std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
- CHECK(!profile.is_empty());
+ CHECK(profile);
const char* names1[] = {"", "start", "f_0_0", "f_0_1", "f_0_2"};
auto node1 = FindAllocationProfileNode(*profile, ArrayVector(names1));
@@ -3000,9 +3000,9 @@ TEST(SamplingHeapProfiler) {
CcTest::heap()->CollectAllGarbage();
- v8::base::SmartPointer<v8::AllocationProfile> profile(
+ std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
- CHECK(!profile.is_empty());
+ CHECK(profile);
CheckNoZeroCountNodes(profile->GetRootNode());
@@ -3023,9 +3023,9 @@ TEST(SamplingHeapProfilerApiAllocation) {
for (int i = 0; i < 8 * 1024; ++i) v8::Object::New(env->GetIsolate());
- v8::base::SmartPointer<v8::AllocationProfile> profile(
+ std::unique_ptr<v8::AllocationProfile> profile(
heap_profiler->GetAllocationProfile());
- CHECK(!profile.is_empty());
+ CHECK(profile);
const char* names[] = {"(V8 API)"};
auto node = FindAllocationProfileNode(*profile, ArrayVector(names));
CHECK(node);

Powered by Google App Engine
This is Rietveld 408576698