• haraken's avatar
    MediaStream content_unittests need to trigger a GC before tear down · 02b15d5a
    haraken authored
    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}
    02b15d5a
media_stream_video_track_unittest.cc 7.95 KB