Under some circumstances, the monitor around the compiler was being

released even though it was not held.
This commit is contained in:
fur@netscape.com
1999-02-26 08:15:03 +00:00
parent d97fcaa95c
commit 37dba2bb4d

View File

@@ -221,8 +221,10 @@ compileOrLoadMethod(const CacheEntry* inCacheEntry, bool &shouldBackPatch)
NativeCodeCache::enter();
// maybe we slept while someone else was compiling, if so
// don't do any work.
if (inCacheEntry->start.getFunctionAddress() != NULL)
if (inCacheEntry->start.getFunctionAddress() != NULL) {
NativeCodeCache::exit();
goto ExitReturnFunc;
}
method = inCacheEntry->descriptor.method;
@@ -255,10 +257,11 @@ compileOrLoadMethod(const CacheEntry* inCacheEntry, bool &shouldBackPatch)
}
else
method->compile();
NativeCodeCache::exit();
}
ExitReturnFunc:
NativeCodeCache::exit();
assert(inCacheEntry->start.getFunctionAddress());
shouldBackPatch = inCacheEntry->shouldBackPatch;
EventBroadcaster::broadcastEvent(gCompileOrLoadBroadcaster, kEndCompileOrLoad, inCacheEntry->descriptor.method);