From adc5c95214537dc97d922b82e004e64d034f32dc Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 27 Nov 2010 14:44:49 -0700 Subject: [PATCH] fix GC safety bug in resolveClass --- src/machine.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index 415ecee29a..77f5656ec0 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -3294,15 +3294,15 @@ resolveClass(Thread* t, object loader, object spec, bool throw_) } else { expect(t, throw_); + PROTECT(t, loader); + PROTECT(t, spec); + { object c = findLoadedClass(t, loader, spec); if (c) { return c; } } - PROTECT(t, loader); - PROTECT(t, spec); - if (byteArrayBody(t, spec, 0) == '[') { return resolveArrayClass(t, loader, spec, throw_); } else {