diff --git a/lib/libdom/domattr.c b/lib/libdom/domattr.c index 7c856f15aec6..86ed4a86e35d 100644 --- a/lib/libdom/domattr.c +++ b/lib/libdom/domattr.c @@ -72,7 +72,7 @@ DOM_NewAttributeObject(JSContext *cx, DOM_Attribute *attr) return NULL; } - str = JS_InternString(cx, node->name); + str = JS_NewStringCopyZ, node->name); v = STRING_TO_JSVAL(str); if (!str || !JS_SetProperty(cx, obj, "name", &v)) diff --git a/lib/libdom/domelement.c b/lib/libdom/domelement.c index e1d4e19374d9..4cdfc4137589 100644 --- a/lib/libdom/domelement.c +++ b/lib/libdom/domelement.c @@ -106,7 +106,7 @@ element_getAttribute(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, value = element->ops->getAttribute(cx, element, JS_GetStringBytes(name), &cache); if (value) { - *rval = STRING_TO_JSVAL(JS_InternString(cx, value)); + *rval = STRING_TO_JSVAL(JS_NewStringCopyZ(cx, value)); if (!JSVAL_TO_STRING(*rval)) return JS_FALSE; } else {