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: Yang Guo <yangguo@chromium.org> Cr-Commit-Position: refs/heads/master@{#44963}
This commit is contained in:
parent
e3d93222d6
commit
32124f3b13
@ -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);
|
||||
{
|
||||
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());
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user