Fix compilation error on gcc
https://crrev.com/c/3471558 is causing the following compilation error on gcc: ``` error: suggest explicit braces to avoid ambiguous 'else' ``` Bug: chromium:1298417 Change-Id: I84a34603664c5ee148cc9ea282c0f8c53319b6d8 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3472403 Reviewed-by: Michael Lippautz <mlippautz@chromium.org> Commit-Queue: Milad Farazmand <mfarazma@redhat.com> Cr-Commit-Position: refs/heads/main@{#79154}
This commit is contained in:
parent
a183895687
commit
9bfa2aa6ad
@ -298,8 +298,9 @@ TEST(PageBackendTest, LookupNormal) {
|
||||
PageBackend backend(allocator, oom_handler);
|
||||
constexpr size_t kBucket = 0;
|
||||
Address writeable_base = backend.AllocateNormalPageMemory(kBucket);
|
||||
if (kGuardPageSize)
|
||||
if (kGuardPageSize) {
|
||||
EXPECT_EQ(nullptr, backend.Lookup(writeable_base - kGuardPageSize));
|
||||
}
|
||||
EXPECT_EQ(nullptr, backend.Lookup(writeable_base - 1));
|
||||
EXPECT_EQ(writeable_base, backend.Lookup(writeable_base));
|
||||
EXPECT_EQ(writeable_base, backend.Lookup(writeable_base + kPageSize -
|
||||
@ -318,8 +319,9 @@ TEST(PageBackendTest, LookupLarge) {
|
||||
PageBackend backend(allocator, oom_handler);
|
||||
constexpr size_t kSize = 7934;
|
||||
Address writeable_base = backend.AllocateLargePageMemory(kSize);
|
||||
if (kGuardPageSize)
|
||||
if (kGuardPageSize) {
|
||||
EXPECT_EQ(nullptr, backend.Lookup(writeable_base - kGuardPageSize));
|
||||
}
|
||||
EXPECT_EQ(nullptr, backend.Lookup(writeable_base - 1));
|
||||
EXPECT_EQ(writeable_base, backend.Lookup(writeable_base));
|
||||
EXPECT_EQ(writeable_base, backend.Lookup(writeable_base + kSize - 1));
|
||||
|
Loading…
Reference in New Issue
Block a user