Commit 9bfa2aa6 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

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/+/3472403Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Milad Farazmand <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/main@{#79154}
parent a1838956
......@@ -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));
......
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