Under some circumstances, the monitor around the compiler was being

released even though it was not held.


git-svn-id: svn://10.0.0.236/trunk@22077 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
fur%netscape.com
1999-02-26 08:15:03 +00:00
parent 89a3d20da2
commit 1d244214d1

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);