• abarth's avatar
    Add the ability to observe MessagePumpMojo · 4ba3cada
    abarth authored
    We need the ability to observe the Mojo message pump in order to correctly
    resolve promises at the end of microtasks triggered by signaling Mojo handles.
    
    Another approach James and I discussed for this CL was to trigger
    MessageLoop::TaskObserver, but that requires a PendingTask, which we don't
    have. I investigated removing the PendingTask argument from
    MessageLoop::TaskObserver, but it's used in a number of tests. Instead, this CL
    follows the approach used by MessagePumpLibevent and introduces a specialized
    observer interface for the message pump.
    
    R=jamesr@chromium.org
    
    Review URL: https://codereview.chromium.org/663873002
    
    Cr-Commit-Position: refs/heads/master@{#300169}
    4ba3cada
message_pump_mojo_unittest.cc 3.99 KB