Commit 82c77b1f authored by perkj's avatar perkj Committed by Commit bot

Fix leak reported by valgrind in VideoDestinationHandlerTest.PutFrame

This fix a problem in the unittest where the test ends before all pending cleanup tasks have
completed.

Revert "[MemSheriff] Suppress content_unittests leaks and uninits"
This reverts commit 8ea251ca.

BUG=422087

Review URL: https://codereview.chromium.org/649513003

Cr-Commit-Position: refs/heads/master@{#299123}
parent df9c9e89
......@@ -97,6 +97,13 @@ TEST_F(VideoDestinationHandlerTest, PutFrame) {
RunClosure(quit_closure));
frame_writer.Run(image.get(), 10);
run_loop.Run();
// Run all pending tasks to let the the test clean up before the test ends.
// This is due to that
// FrameWriterDelegate::FrameWriterDelegate::DeliverFrame use
// PostTaskAndReply to the IO thread and expects the reply to process
// on the main render thread to clean up its resources. However, the
// QuitClosure above ends before that.
base::MessageLoop::current()->RunUntilIdle();
}
EXPECT_EQ(1, sink.number_of_frames());
native_track->RemoveSink(&sink);
......
......@@ -3469,19 +3469,3 @@
fun:_ZN5blink13InlineFlowBox5paintERNS_9PaintInfoERKNS_11LayoutPointENS_10LayoutUnitES6_
fun:_ZN5blink13RootInlineBox5paintERNS_9PaintInfoERKNS_11LayoutPointENS_10LayoutUnitES6_
}
{
bug_422087a
Memcheck:Leak
fun:_Znw*
fun:_ZN4base8internal20PostTaskAndReplyImpl16PostTaskAndReplyERKN15tracked_objects8LocationERKNS_8CallbackIFvvEEESA_
fun:_ZN4base10TaskRunner16PostTaskAndReplyERKN15tracked_objects8LocationERKNS_8CallbackIFvvEEES9_
fun:_ZN7content13PpFrameWriter19FrameWriterDelegate12DeliverFrameERK13scoped_*
}
{
bug_422087b
Memcheck:Leak
fun:_Znw*
...
fun:_ZNSt4listI13scoped_refptrIN5media10VideoFrameEESaIS3_EE9push_backERKS3_
fun:_ZN5media14VideoFramePool8PoolImpl13FrameReleasedERK13scoped_refptrINS_10VideoFrameEE
}
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