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

Unified Diff: third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp

Issue 2050123002: Remove OwnPtr from Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: First attempt to land. Created 4 years, 6 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 | « third_party/WebKit/Source/wtf/WTFThreadData.cpp ('k') | third_party/WebKit/Source/wtf/text/Collator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
diff --git a/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp b/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
index cdc4302c305d7b8af90df3ee4f8fbac8b6fc5122..213ba334df8b2ecc1772cd81e72632ab5d74d3be 100644
--- a/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
+++ b/third_party/WebKit/Source/wtf/allocator/PartitionAllocTest.cpp
@@ -33,9 +33,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "wtf/BitwiseOperations.h"
#include "wtf/CPU.h"
-#include "wtf/OwnPtr.h"
-#include "wtf/PassOwnPtr.h"
+#include "wtf/PtrUtil.h"
#include "wtf/Vector.h"
+#include <memory>
#include <stdlib.h>
#include <string.h>
@@ -447,7 +447,7 @@ TEST(PartitionAllocTest, FreePageListPageTransitions)
// The +1 is because we need to account for the fact that the current page
// never gets thrown on the freelist.
++numToFillFreeListPage;
- OwnPtr<PartitionPage*[]> pages = adoptArrayPtr(new PartitionPage*[numToFillFreeListPage]);
+ std::unique_ptr<PartitionPage*[]> pages = wrapArrayUnique(new PartitionPage*[numToFillFreeListPage]);
size_t i;
for (i = 0; i < numToFillFreeListPage; ++i) {
@@ -493,8 +493,8 @@ TEST(PartitionAllocTest, MultiPageAllocs)
--numPagesNeeded;
EXPECT_GT(numPagesNeeded, 1u);
- OwnPtr<PartitionPage*[]> pages;
- pages = adoptArrayPtr(new PartitionPage*[numPagesNeeded]);
+ std::unique_ptr<PartitionPage*[]> pages;
+ pages = wrapArrayUnique(new PartitionPage*[numPagesNeeded]);
uintptr_t firstSuperPageBase = 0;
size_t i;
for (i = 0; i < numPagesNeeded; ++i) {
@@ -1026,8 +1026,8 @@ TEST(PartitionAllocTest, MappingCollision)
// The -2 is because the first and last partition pages in a super page are
// guard pages.
size_t numPartitionPagesNeeded = kNumPartitionPagesPerSuperPage - 2;
- OwnPtr<PartitionPage*[]> firstSuperPagePages = adoptArrayPtr(new PartitionPage*[numPartitionPagesNeeded]);
- OwnPtr<PartitionPage*[]> secondSuperPagePages = adoptArrayPtr(new PartitionPage*[numPartitionPagesNeeded]);
+ std::unique_ptr<PartitionPage*[]> firstSuperPagePages = wrapArrayUnique(new PartitionPage*[numPartitionPagesNeeded]);
+ std::unique_ptr<PartitionPage*[]> secondSuperPagePages = wrapArrayUnique(new PartitionPage*[numPartitionPagesNeeded]);
size_t i;
for (i = 0; i < numPartitionPagesNeeded; ++i)
« no previous file with comments | « third_party/WebKit/Source/wtf/WTFThreadData.cpp ('k') | third_party/WebKit/Source/wtf/text/Collator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698