Reload key in case of multithreaded race to atomize the same string chars (415474, r=igor).

This commit is contained in:
brendan@mozilla.org 2008-02-03 21:12:33 -08:00
parent 626e9f08b3
commit a0b8e63e6b

View File

@ -685,8 +685,10 @@ js_AtomizeString(JSContext *cx, JSString *str, uintN flags)
JS_DHASH_ADD));
if (!entry)
goto failed_hash_add;
if (entry->keyAndFlags != 0)
if (entry->keyAndFlags != 0) {
key = (JSString *)ATOM_ENTRY_KEY(entry);
goto finish;
}
++state->tablegen;
}
}