Bug 687621 - Convert getProperty to take a PropertyName*, and make getGeneric the only way to get a property for a jsid. r=luke

This commit is contained in:
Jeff Walden
2011-09-15 11:44:10 -07:00
parent 9304354106
commit 10e2a9cbb2
25 changed files with 277 additions and 224 deletions

View File

@@ -365,10 +365,11 @@ js_InitCommonAtoms(JSContext *cx)
JSAtomState *state = &cx->runtime->atomState;
JSAtom **atoms = state->commonAtomsStart();
for (size_t i = 0; i < JS_ARRAY_LENGTH(js_common_atom_names); i++, atoms++) {
*atoms = js_Atomize(cx, js_common_atom_names[i], strlen(js_common_atom_names[i]),
InternAtom);
if (!*atoms)
JSAtom *atom = js_Atomize(cx, js_common_atom_names[i], strlen(js_common_atom_names[i]),
InternAtom);
if (!atom)
return false;
*atoms = atom->asPropertyName();
}
state->clearLazyAtoms();