SetLastIndex(JSContext *cx, JSRegExp *re, uintN lastIndex)
SetLastIndex(JSContext *cx, JSRegExp *re, double lastIndex)
SetLastIndex(JSContext *cx, JSRegExp *re, uintN lastIndex){#ifdef JS_THREADSAFE    if (!re->owningThread) {        /*         * Claim ownership and fall through to the final "update re->lastIndex         * and return" clause.  Recall that re's object must be locked (and we         * know re has an object, else why would its lastIndex member be set).         */        re->owningThread = cx->thread;    } else if (cx->thread != re->owningThread) {        LastIndexEntry *entry;        /* Bootstrap re->lastIndexes, interlocked by re's object lock. */        if (!re->lastIndexes) {            re->lastIndexes = JS_NewDHashTable(JS_DHashGetStubOps(), NULL,                                               sizeof(LastIndexEntry),                                               JS_DHASH_MIN_SIZE);            if (!re->lastIndexes)                goto boom;        }        /* Find or create a mapping from cx->thread to its own last index. */        entry = (LastIndexEntry *)            JS_DHashTableOperate(re->lastIndexes, (const void *) cx->thread,                                 JS_DHASH_ADD);        if (!entry) {      boom:            JS_ReportOutOfMemory(cx);            return JS_FALSE;        }        entry->thread = cx->thread;        entry->index = lastIndex;        return JS_TRUE;    }#endif    re->lastIndex = lastIndex;    return JS_TRUE;}