• tim@chromium.org's avatar
    mojo: terminate apps if the shell goes away · 8d64cb67
    tim@chromium.org authored
    Each application <> shell connection is represented by a ShellImpl instance
    on the shell side. This CL makes the Application watch its ShellPtr for pipe
    errors so it can Quit() itself if the shell goes away (shell loop destroyed).
    
    mojo_shell_tests starts using a new method to terminate all shell connections
    in this CL, and waits afterward until KeepAlive quits the loop signifying that
    all apps are gone. This is done prior to destroying the shell MessageLoop so
    that the test ensures apps have all died before the next test. In the future
    it would be a test failure if this wasn't a no-op, but we have things in the
    shell that don't quit themselves right now.
    
    The shell itself won't wait around for apps to die (as of this CL), but
    ~MessageLoop will still send the message to Application sides that will quit.
    
    ** NOTE ** This does not require an app build target to explicitly add magic
    *.cc files to their sources.  It requires selecting an appropriate
    mojo_application_{chromium, standalone} library akin to mojo_environment_*.
    We can possibly combine these two in the future.
    
    BUG=394477
    
    Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=287680
    
    Review URL: https://codereview.chromium.org/394903005
    
    git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287894 0039d316-1c4b-4281-b951-d872f2087c98
    8d64cb67
mojo.gyp 17.2 KB