Permalink
Browse files

Give IInspector a virtual destructor for correct InspectorImpl destru…

…ction

Reviewed By: bnham

Differential Revision: D6815637

fbshipit-source-id: bfd3bd4a664ec51d5364df512bfc9bc366f516c1
  • Loading branch information...
toulouse authored and facebook-github-bot committed Jan 26, 2018
1 parent 7b1915e commit 2a3c37f424a4d1b9f4c5a2960a1cbe3517eac007
@@ -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;

0 comments on commit 2a3c37f

Please sign in to comment.