Commit 32124f3b authored by Jochen Eisinger's avatar Jochen Eisinger Committed by Commit Bot

Free Isolate in ValueSerializerUnittest

BUG=v8:6316
R=jbroman@chromium.org,yangguo@chromium.org

Change-Id: Icfc33e3e51cdbfad246a971a5a2737a8fdfba058
Reviewed-on: https://chromium-review.googlesource.com/488941
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: 's avatarYang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#44963}
parent e3d93222
......@@ -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 = Context::New(isolate);
Context::Scope context_scope(context);
TryCatch try_catch(isolate);
const std::vector<uint8_t> data = {0xff, 0x09, 0x3f, 0x00, 0x42,
0x03, 0x00, 0x80, 0xff, 0x00};
ValueDeserializer deserializer(isolate, &data[0],
static_cast<int>(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::Scope isolate_scope(isolate);
HandleScope handle_scope(isolate);
Local<Context> context = Context::New(isolate);
Context::Scope context_scope(context);
TryCatch try_catch(isolate);
const std::vector<uint8_t> data = {0xff, 0x09, 0x3f, 0x00, 0x42,
0x03, 0x00, 0x80, 0xff, 0x00};
ValueDeserializer deserializer(isolate, &data[0],
static_cast<int>(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
......
......@@ -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
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