8197789: os::SuspendedThreadTask causes references to global operator delete

Make destructor non-virtual and protected

Reviewed-by: kbarrett
This commit is contained in:
Coleen Phillimore 2018-02-14 09:03:31 -05:00
parent b8689741ec
commit d41cbf61a1

View File

@ -909,11 +909,11 @@ class os: AllStatic {
class SuspendedThreadTask { class SuspendedThreadTask {
public: public:
SuspendedThreadTask(Thread* thread) : _thread(thread), _done(false) {} SuspendedThreadTask(Thread* thread) : _thread(thread), _done(false) {}
virtual ~SuspendedThreadTask() {}
void run(); void run();
bool is_done() { return _done; } bool is_done() { return _done; }
virtual void do_task(const SuspendedThreadTaskContext& context) = 0; virtual void do_task(const SuspendedThreadTaskContext& context) = 0;
protected: protected:
~SuspendedThreadTask() {}
private: private:
void internal_do_task(); void internal_do_task();
Thread* _thread; Thread* _thread;