OBJECT_TO_JSVAL(obj), NULL, NULL, JSPROP_ENUMERATE | JSPROP_READONLY)) {
OBJECT_TO_JSVAL(obj), NULL, loc_assign, JSPROP_ENUMERATE | JSPROP_PERMANENT)) {
lm_DefineLocation(MochaDecoder *decoder){    JSObject *obj;    JSContext *cx;    JSURL *url;    obj = decoder->location;    if (obj)	return obj;    cx = decoder->js_context;    url = JS_malloc(cx, sizeof *url);    if (!url)	return NULL;    XP_BZERO(url, sizeof *url);    obj = JS_InitClass(cx, decoder->window_object, NULL, &lm_location_class,		       Location, 0, url_props, loc_methods, NULL, NULL);    if (!obj || !JS_SetPrivate(cx, obj, url)) {	JS_free(cx, url);	return NULL;    }    /* XXX common subroutine this and above with lm_NewURL */    if (!JS_AddNamedRoot(cx, &url->href, "loc.text"))	return NULL;    if (!JS_AddNamedRoot(cx, &url->target, "loc.target"))	return NULL;    if (!JS_AddNamedRoot(cx, &url->text, "loc.text"))	return NULL;    if (!JS_DefineProperty(cx, decoder->window_object, lm_location_str,			   OBJECT_TO_JSVAL(obj), NULL, NULL,			   JSPROP_ENUMERATE | JSPROP_READONLY)) {	return NULL;    }    if (!JS_DefineProperty(cx, decoder->document, lm_location_str,                            OBJECT_TO_JSVAL(obj), NULL, NULL,                            JSPROP_ENUMERATE | JSPROP_READONLY)) {	return NULL;    }    /* Define the Location object (the current URL). */    url->url_decoder = HOLD_BACK_COUNT(decoder);    url->url_type = FORM_TYPE_NONE;    url->url_object = obj;    url->index = URL_NOT_INDEXED;    decoder->location = obj;    return obj;}