Skip to content
  • fdoray's avatar
    Remove calls to MessageLoop(ForUI|ForIO)::Run/RunUntilIdle. · c5e45f6b
    fdoray authored
    This CL makes the following replacements:
    
    1.
    base::MessageLoopForUIorIO::current()->Run()/RunUntilIdle();
    becomes
    // This ASSERT_TRUE replaces the DCHECK in
    // MessageLoopForUIorIO::current().
    ASSERT_TRUE(base::MessageLoopForUIorIO::IsCurrent());
    base::RunLoop().Run()/RunUntilIdle();
    
    2.
    message_loop_for_ui_or_io.Run()/RunUntilIdle();
    becomes
    // The ASSERT_TRUE is present only if it isn't obvious that
    // the current thread runs a MessageLoopForUIorIO (e.g.
    // because it isn't instantiated in the current file).
    ASSERT_TRUE(base::MessageLoopForUIorIO::IsCurrent());
    base::RunLoop().Run()/RunUntilIdle();
    
    BUG=616447
    
    Review-Url: https://codereview.chromium.org/2354333002
    Cr-Commit-Position: refs/heads/master@{#420342}
    c5e45f6b