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 {
public:
SuspendedThreadTask(Thread* thread) : _thread(thread), _done(false) {}
virtual ~SuspendedThreadTask() {}
void run();
bool is_done() { return _done; }
virtual void do_task(const SuspendedThreadTaskContext& context) = 0;
protected:
~SuspendedThreadTask() {}
private:
void internal_do_task();
Thread* _thread;