js_alloc_temp_entry(void *priv, const void *key) { JSContext *cx = priv; JSAtomListElement *ale; JS_ARENA_ALLOCATE_TYPE(ale, JSAtomListElement, &cx->tempPool); if (!ale) { JS_ReportOutOfMemory(cx); return NULL; } return &ale->entry; }
static JSHashEntry * js_alloc_temp_entry(void *priv, const void *key) { JSCompiler *jsc = (JSCompiler *) priv; JSAtomListElement *ale; ale = jsc->aleFreeList; if (ale) { jsc->aleFreeList = ALE_NEXT(ale); return &ale->entry; } JS_ARENA_ALLOCATE_TYPE(ale, JSAtomListElement, &jsc->context->tempPool); if (!ale) { js_ReportOutOfScriptQuota(jsc->context); return NULL; } return &ale->entry; }