--- old/src/hotspot/share/prims/whitebox.cpp Wed Nov 8 08:13:04 2017 +++ new/src/hotspot/share/prims/whitebox.cpp Wed Nov 8 08:13:03 2017 @@ -661,9 +661,7 @@ int result() const { return _result; } void doit() { - ThreadsListHandle tlh; - JavaThreadIterator jti(tlh.list()); - for (JavaThread* t = jti.first(); t != NULL; t = jti.next()) { + for (JavaThreadIteratorWithHandle jtiwh; JavaThread *t = jtiwh.next(); ) { if (t->has_last_Java_frame()) { for (StackFrameStream fst(t, UseBiasedLocking); !fst.is_done(); fst.next()) { frame* f = fst.current();