8252476: as_Worker_thread() doesn't check what it intends

Co-authored-by: David Holmes <dholmes@openjdk.org>
Reviewed-by: iklam, kbarrett
This commit is contained in:
Albert Mingkun Yang 2021-05-27 08:09:58 +00:00
parent 37bc4e2e3c
commit bfa46f0af3
4 changed files with 8 additions and 6 deletions

View file

@ -106,11 +106,6 @@ class WorkerThread: public NamedThread {
WorkerThread() : _id(0) { }
virtual bool is_Worker_thread() const { return true; }
virtual WorkerThread* as_Worker_thread() const {
assert(is_Worker_thread(), "Dubious cast to WorkerThread*?");
return (WorkerThread*) this;
}
void set_id(uint work_id) { _id = work_id; }
uint id() const { return _id; }
};