out:
js_UnlockGCThingRT(JSRuntime *rt, void *thing){    uint8 *flagp, flags, lockbits;    JSGCLockHashEntry *lhe;    if (!thing)        return JS_TRUE;    flagp = js_GetGCThingFlags(thing);    flags = *flagp;    JS_LOCK_GC(rt);    lockbits = (flags & GCF_LOCKMASK);    if (lockbits != GCF_LOCKMASK) {        if ((flags & GCF_TYPEMASK) == GCX_OBJECT) {            /* Defend against a call on an unlocked object. */            if (lockbits != 0) {                JS_ASSERT(lockbits == GCF_LOCK);                lhe = (JSGCLockHashEntry *)                    JS_DHashTableOperate(rt->gcLocksHash, thing,                                         JS_DHASH_LOOKUP);                JS_ASSERT(JS_DHASH_ENTRY_IS_BUSY(&lhe->hdr));                if (JS_DHASH_ENTRY_IS_BUSY(&lhe->hdr) &&                    --lhe->count == 0) {                    (void) JS_DHashTableOperate(rt->gcLocksHash, thing,                                                JS_DHASH_REMOVE);                    *flagp = (uint8)(flags & ~GCF_LOCKMASK);                }            }        } else {            *flagp = (uint8)(flags - GCF_LOCK);        }    } else {        METER(rt->gcStats.unstuck++);    }    rt->gcPoke = JS_TRUE;    METER(rt->gcStats.unlock++);    JS_UNLOCK_GC(rt);    return JS_TRUE;}