result = nativeThis->Close();
result = nativeThis->Close(cx, argv+0, argc-0);
WindowClose(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMWindow *nativeThis = (nsIDOMWindow*)nsJSUtils::nsGetNativeThis(cx, obj);  nsresult result = NS_OK;  *rval = JSVAL_NULL;  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);  }  {    PRBool ok;    secMan->CheckScriptAccess(scriptCX, obj, "window.close",PR_FALSE , &ok);    if (!ok) {      return nsJSUtils::nsReportError(cx, NS_ERROR_DOM_SECURITY_ERR);    }  }  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  {    result = nativeThis->Close();    if (NS_FAILED(result)) {      return nsJSUtils::nsReportError(cx, result);    }    *rval = JSVAL_VOID;  }  return JS_TRUE;}