Commit c7eb5e72 authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[cleanup] Fix the way how Zones are created in tests

Bug: v8:10506
Change-Id: I9405616566aaec47bfc47cfe2290dc6953e532ad
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2280082
Auto-Submit: Igor Sheludko <ishell@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68669}
parent 7f120ffb
......@@ -72,7 +72,7 @@ using F = std::pair<ValueType, bool>;
class TestModuleBuilder {
public:
explicit TestModuleBuilder(ModuleOrigin origin = kWasmOrigin)
: allocator(), mod(std::make_unique<Zone>(&allocator, "TEST_ZONE")) {
: allocator(), mod(std::make_unique<Zone>(&allocator, ZONE_NAME)) {
mod.origin = origin;
}
byte AddGlobal(ValueType type, bool mutability = true) {
......
......@@ -10,7 +10,7 @@ namespace internal {
namespace wasm {
namespace subtyping_unittest {
class WasmSubtypingTest : public TestWithZone {};
class WasmSubtypingTest : public ::testing::Test {};
using FieldInit = std::pair<ValueType, bool>;
ValueType ref(uint32_t index) { return ValueType::Ref(index, kNonNullable); }
......@@ -35,8 +35,7 @@ void DefineArray(WasmModule* module, FieldInit element_type) {
TEST_F(WasmSubtypingTest, Subtyping) {
v8::internal::AccountingAllocator allocator;
WasmModule module_(std::make_unique<Zone>(*(zone())));
WasmModule module_(std::make_unique<Zone>(&allocator, ZONE_NAME));
WasmModule* module = &module_;
......
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