[vm] Check for mis-matched thread type in OSThread TLS destructor.
Change-Id: I1d878d4d31877749cf47ddd3ef973386592fd714 Reviewed-on: https://dart-review.googlesource.com/42104 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Zach Anderson <zra@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
0916763466
commit
bd06ffc2c6
@@ -62,6 +62,12 @@ OSThread* OSThread::CreateOSThread() {
|
||||
}
|
||||
|
||||
OSThread::~OSThread() {
|
||||
if (!is_os_thread()) {
|
||||
// If the embedder enters an isolate on this thread and does not exit the
|
||||
// isolate, the thread local at thread_key_, which we are destructing here,
|
||||
// will contain a dart::Thread instead of a dart::OSThread.
|
||||
FATAL("Thread exited without calling Dart_ExitIsolate");
|
||||
}
|
||||
RemoveThreadFromList(this);
|
||||
delete log_;
|
||||
log_ = NULL;
|
||||
|
||||
Reference in New Issue
Block a user