Give IInspector a virtual destructor for correct InspectorImpl destruction
Reviewed By: bnham Differential Revision: D6815637 fbshipit-source-id: bfd3bd4a664ec51d5364df512bfc9bc366f516c1
This commit is contained in:
parent
7b1915e74d
commit
2a3c37f424
|
@ -18,9 +18,10 @@ namespace react {
|
|||
// pure destructors in C++ are odd. You would think they don't want an
|
||||
// implementation, but in fact the linker requires one. Define them to be
|
||||
// empty so that people don't count on them for any particular behaviour.
|
||||
IDestructible::~IDestructible() { }
|
||||
ILocalConnection::~ILocalConnection() { }
|
||||
IRemoteConnection::~IRemoteConnection() { }
|
||||
IDestructible::~IDestructible() {}
|
||||
ILocalConnection::~ILocalConnection() {}
|
||||
IRemoteConnection::~IRemoteConnection() {}
|
||||
IInspector::~IInspector() {}
|
||||
|
||||
namespace {
|
||||
|
||||
|
|
|
@ -44,11 +44,13 @@ class ILocalConnection : public IDestructible {
|
|||
};
|
||||
|
||||
/// IInspector tracks debuggable JavaScript targets (pages).
|
||||
class IInspector {
|
||||
class IInspector : public IDestructible {
|
||||
public:
|
||||
using ConnectFunc = std::function<std::unique_ptr<ILocalConnection>(
|
||||
std::unique_ptr<IRemoteConnection>)>;
|
||||
|
||||
virtual ~IInspector() = 0;
|
||||
|
||||
/// addPage is called by the VM to add a page to the list of debuggable pages.
|
||||
virtual int addPage(const std::string& title, ConnectFunc connectFunc) = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue