case XULDOCUMENT_TOOLTIPELEMENT:
case XULDOCUMENT_TOOLTIPNODE:
GetXULDocumentProperty(JSContext *cx, JSObject *obj, jsval id, jsval *vp){  nsIDOMXULDocument *a = (nsIDOMXULDocument*)nsJSUtils::nsGetNativeThis(cx, obj);  // If there's no private data, this must be the prototype, so ignore  if (nsnull == a) {    return JS_TRUE;  }  if (JSVAL_IS_INT(id)) {    nsIScriptContext *scriptCX = (nsIScriptContext *)JS_GetContextPrivate(cx);    nsCOMPtr<nsIScriptSecurityManager> secMan;    if (NS_OK != scriptCX->GetSecurityManager(getter_AddRefs(secMan))) {      return nsJSUtils::nsReportError(cx, NS_ERROR_DOM_SECMAN_ERR);    }    switch(JSVAL_TO_INT(id)) {      case XULDOCUMENT_POPUPELEMENT:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(scriptCX, obj, "xuldocument.popupelement", PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, NS_ERROR_DOM_SECURITY_ERR);        }        nsIDOMElement* prop;        nsresult result = NS_OK;        result = a->GetPopupElement(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object          nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, vp);        }        else {          return nsJSUtils::nsReportError(cx, result);        }        break;      }      case XULDOCUMENT_TOOLTIPELEMENT:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(scriptCX, obj, "xuldocument.tooltipelement", PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, NS_ERROR_DOM_SECURITY_ERR);        }        nsIDOMElement* prop;        nsresult result = NS_OK;        result = a->GetTooltipElement(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object          nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, vp);        }        else {          return nsJSUtils::nsReportError(cx, result);        }        break;      }      case XULDOCUMENT_COMMANDDISPATCHER:      {        PRBool ok = PR_FALSE;        secMan->CheckScriptAccess(scriptCX, obj, "xuldocument.commanddispatcher", PR_FALSE, &ok);        if (!ok) {          return nsJSUtils::nsReportError(cx, NS_ERROR_DOM_SECURITY_ERR);        }        nsIDOMXULCommandDispatcher* prop;        nsresult result = NS_OK;        result = a->GetCommandDispatcher(&prop);        if (NS_SUCCEEDED(result)) {          // get the js object          nsJSUtils::nsConvertObjectToJSVal((nsISupports *)prop, cx, vp);        }        else {          return nsJSUtils::nsReportError(cx, result);        }        break;      }      default:        return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, id, vp);    }  }  else {    return nsJSUtils::nsCallJSScriptObjectGetProperty(a, cx, id, vp);  }  return PR_TRUE;}