Commit d6ee8662 authored by Keishi Hattori's avatar Keishi Hattori Committed by Commit Bot

Fix checked_ptr unit test by supplying missing PartitionOptions param

This broke some of the checked_ptr unit tests by removing the default parameter for PartitionOptions.
https://chromium-review.googlesource.com/c/chromium/src/+/2507432
This CL adds the PartitionOptions param

Change-Id: I5690fef518835d9379c8fd28e8dcced8d820c8f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2507420Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822869}
parent 7a88939a
...@@ -830,7 +830,7 @@ TEST(CheckedPtr2OrMTEImpl, CrashOnUseAfterFree) { ...@@ -830,7 +830,7 @@ TEST(CheckedPtr2OrMTEImpl, CrashOnUseAfterFree) {
// new/delete once PartitionAlloc Everywhere is fully enabled. // new/delete once PartitionAlloc Everywhere is fully enabled.
PartitionAllocGlobalInit(HandleOOM); PartitionAllocGlobalInit(HandleOOM);
PartitionAllocator<ThreadSafe> allocator; PartitionAllocator<ThreadSafe> allocator;
allocator.init(); allocator.init({});
void* raw_ptr = allocator.root()->Alloc(sizeof(int), "int"); void* raw_ptr = allocator.root()->Alloc(sizeof(int), "int");
// Use the actual CheckedPtr implementation, not a test substitute, to // Use the actual CheckedPtr implementation, not a test substitute, to
// exercise real PartitionAlloc paths. // exercise real PartitionAlloc paths.
...@@ -851,7 +851,7 @@ TEST(CheckedPtr2OrMTEImpl, CrashOnUseAfterFree_WithOffset) { ...@@ -851,7 +851,7 @@ TEST(CheckedPtr2OrMTEImpl, CrashOnUseAfterFree_WithOffset) {
// new/delete once PartitionAlloc Everywhere is fully enabled. // new/delete once PartitionAlloc Everywhere is fully enabled.
PartitionAllocGlobalInit(HandleOOM); PartitionAllocGlobalInit(HandleOOM);
PartitionAllocator<ThreadSafe> allocator; PartitionAllocator<ThreadSafe> allocator;
allocator.init(); allocator.init({});
const uint8_t kSize = 100; const uint8_t kSize = 100;
void* raw_ptr = allocator.root()->Alloc(kSize * sizeof(uint8_t), "uint8_t"); void* raw_ptr = allocator.root()->Alloc(kSize * sizeof(uint8_t), "uint8_t");
// Use the actual CheckedPtr implementation, not a test substitute, to // Use the actual CheckedPtr implementation, not a test substitute, to
...@@ -884,7 +884,7 @@ TEST(BackupRefPtrImpl, Basic) { ...@@ -884,7 +884,7 @@ TEST(BackupRefPtrImpl, Basic) {
// new/delete once PartitionAlloc Everywhere is fully enabled. // new/delete once PartitionAlloc Everywhere is fully enabled.
PartitionAllocGlobalInit(HandleOOM); PartitionAllocGlobalInit(HandleOOM);
PartitionAllocator<ThreadSafe> allocator; PartitionAllocator<ThreadSafe> allocator;
allocator.init(); allocator.init({});
uint64_t* raw_ptr1 = reinterpret_cast<uint64_t*>( uint64_t* raw_ptr1 = reinterpret_cast<uint64_t*>(
allocator.root()->Alloc(sizeof(uint64_t), "")); allocator.root()->Alloc(sizeof(uint64_t), ""));
// Use the actual CheckedPtr implementation, not a test substitute, to // Use the actual CheckedPtr implementation, not a test substitute, to
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment