diff --git a/test/unittests/value-serializer-unittest.cc b/test/unittests/value-serializer-unittest.cc index 9f49c6498a..8f921ab11b 100644 --- a/test/unittests/value-serializer-unittest.cc +++ b/test/unittests/value-serializer-unittest.cc @@ -1866,21 +1866,24 @@ TEST_F(ValueSerializerTest, DecodeArrayBufferOOM) { Isolate::CreateParams params; params.array_buffer_allocator = &allocator; Isolate* isolate = Isolate::New(params); - Isolate::Scope isolate_scope(isolate); - HandleScope handle_scope(isolate); - Local context = Context::New(isolate); - Context::Scope context_scope(context); - TryCatch try_catch(isolate); + { + Isolate::Scope isolate_scope(isolate); + HandleScope handle_scope(isolate); + Local context = Context::New(isolate); + Context::Scope context_scope(context); + TryCatch try_catch(isolate); - const std::vector data = {0xff, 0x09, 0x3f, 0x00, 0x42, - 0x03, 0x00, 0x80, 0xff, 0x00}; - ValueDeserializer deserializer(isolate, &data[0], - static_cast(data.size()), nullptr); - deserializer.SetSupportsLegacyWireFormat(true); - ASSERT_TRUE(deserializer.ReadHeader(context).FromMaybe(false)); - ASSERT_FALSE(try_catch.HasCaught()); - EXPECT_TRUE(deserializer.ReadValue(context).IsEmpty()); - EXPECT_TRUE(try_catch.HasCaught()); + const std::vector data = {0xff, 0x09, 0x3f, 0x00, 0x42, + 0x03, 0x00, 0x80, 0xff, 0x00}; + ValueDeserializer deserializer(isolate, &data[0], + static_cast(data.size()), nullptr); + deserializer.SetSupportsLegacyWireFormat(true); + ASSERT_TRUE(deserializer.ReadHeader(context).FromMaybe(false)); + ASSERT_FALSE(try_catch.HasCaught()); + EXPECT_TRUE(deserializer.ReadValue(context).IsEmpty()); + EXPECT_TRUE(try_catch.HasCaught()); + } + isolate->Dispose(); } // Includes an ArrayBuffer wrapper marked for transfer from the serialization diff --git a/tools/memory/lsan/suppressions.txt b/tools/memory/lsan/suppressions.txt index 36e59ecd51..f5c73935be 100644 --- a/tools/memory/lsan/suppressions.txt +++ b/tools/memory/lsan/suppressions.txt @@ -14,6 +14,3 @@ leak:v8::internal::compiler::JumpThreading::ApplyForwarding # mjsunit leak:v8::internal::FuncNameInferrer::FuncNameInferrer leak:v8::internal::JSArrayBuffer::SetupAllocatingData - -# unittests -leak:v8::internal::Isolate::FindOrAllocatePerThreadDataForThisThread