Files
tubestation/ipc/ipdl/test/cxx/IPDLUnitTestSubprocess.h
Jed Davis ffdd1fdc8a Bug 1487287 - Synchronize GeckoChildProcessHost destruction with launching. r=mccr8
In order to enable asynchronous launch, destruction of
GeckoChildProcessHost (and its subclasses) has to be delayed until after
launching (or anything else that might be made asynchronous in the
future) has completed, to prevent use-after-free.  However, there are
other dependencies on process hosts always being destroyed on the I/O
thread, so refcounting would be difficult to use.

Instead, GeckoChildProcessHost now may not be destroyed directly, but
must go through a method that handles the scheduling.

There are also some minor cleanups to the affected headers (removed
duplicate access modifiers, and made PluginProcessParent final).

Depends on D18010

Differential Revision: https://phabricator.services.mozilla.com/D18011
2019-02-05 00:15:20 +00:00

35 lines
1.0 KiB
C++

/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef mozilla__ipdltest_IPDLUnitTestTestSubprocess_h
#define mozilla__ipdltest_IPDLUnitTestTestSubprocess_h 1
#include "mozilla/ipc/GeckoChildProcessHost.h"
namespace mozilla {
namespace _ipdltest {
//-----------------------------------------------------------------------------
class IPDLUnitTestSubprocess : public mozilla::ipc::GeckoChildProcessHost {
public:
IPDLUnitTestSubprocess();
/**
* Asynchronously launch the plugin process.
*/
// Could override parent Launch, but don't need to here
// bool Launch();
private:
~IPDLUnitTestSubprocess();
DISALLOW_EVIL_CONSTRUCTORS(IPDLUnitTestSubprocess);
};
} // namespace _ipdltest
} // namespace mozilla
#endif // ifndef mozilla__ipdltest_IPDLUnitTestTestSubprocess_h