Merge "Make ScriptC's mEnvironment.mIsThreadable survive the bcc caching and then cache-reloading."

This commit is contained in:
Shih-wei Liao
2010-12-07 14:02:31 -08:00
committed by Android (Google) Code Review

View File

@@ -378,6 +378,12 @@ void ScriptCState::clear(Context *rsc) {
static BCCvoid* symbolLookup(BCCvoid* pContext, const BCCchar* name) {
const ScriptCState::SymbolTable_t *sym;
ScriptC *s = (ScriptC *)pContext;
if (!strcmp(name, "__isThreadable")) {
return (BCCvoid*) s->mEnviroment.mIsThreadable;
} else if (!strcmp(name, "__clearThreadable")) {
s->mEnviroment.mIsThreadable = false;
return NULL;
}
sym = ScriptCState::lookupSymbol(name);
if (!sym) {
sym = ScriptCState::lookupSymbolCL(name);