From 534da072d3db3beecbd74e5aa23d630d73695f2c Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 27 Mar 2012 15:17:42 -0700 Subject: Reinstate code accidentally removed while moving it from ThreadList to Thread. Change-Id: I640741a4a64bccb408ac8c053a3538588fa9a8e1 --- src/thread.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/thread.cc b/src/thread.cc index 8bd7bc20a4..aee684bdec 100644 --- a/src/thread.cc +++ b/src/thread.cc @@ -985,6 +985,12 @@ void Thread::Destroy() { if (peer_ != NULL) { Thread* self = this; + // We may need to call user-supplied managed code. + SetState(Thread::kRunnable); + + HandleUncaughtExceptions(); + RemoveFromThreadGroup(); + // this.vmData = 0; SetVmData(peer_, NULL); -- cgit v1.2.3-59-g8ed1b