Add various autorooting, bug 772303. r=terrence

This commit is contained in:
Brian Hackett
2012-08-12 19:50:49 -06:00
parent 5b0ab9c175
commit 8a27276644
39 changed files with 561 additions and 417 deletions

View File

@@ -298,6 +298,9 @@ AtomizeInline(JSContext *cx, const jschar **pchars, size_t length,
SkipRoot skip(cx, &chars);
/* Workaround for hash values in AddPtr being inadvertently poisoned. */
SkipRoot skip2(cx, &p);
if (ocb == TakeCharOwnership) {
key = js_NewString(cx, const_cast<jschar *>(chars), length);
if (!key)