MediaStream content_unittests need to trigger a GC before tear down
Given that MediaStream objects in the Blink side are allocated on Oilpan's heap, we need to trigger a GC to collect MediaStream objects in the Chromium side that depend on the lifetime of the MediaStream objects in the Blink side. This CL adds Heap::collectAllGarbage to TearDown methods of MediaStream content_unittests. This guarantees that MediaStream objects used in the content_unittests are collected before the content_unittests finish. Otherwise, the LSan complains that the MediaStream objects leak in the content_unittests. This is an issue that happens only in testing. BUG=340522 Review URL: https://codereview.chromium.org/566793002 Cr-Commit-Position: refs/heads/master@{#295920}
Showing
Please register or sign in to comment