JSBool rBool = JS_FALSE;
ElementObserverOnSetAttributeNode(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval){  nsIDOMElementObserver *nativeThis = (nsIDOMElementObserver*)JS_GetPrivate(cx, obj);  JSBool rBool = JS_FALSE;  nsIDOMElementPtr b0;  nsIDOMAttrPtr b1;  *rval = JSVAL_NULL;  nsIScriptContext *scriptCX = (nsIScriptContext *)JS_GetContextPrivate(cx);  nsIScriptSecurityManager *secMan;  if (NS_OK == scriptCX->GetSecurityManager(&secMan)) {    PRBool ok;    secMan->CheckScriptAccess(scriptCX, obj, "elementobserver.onsetattributenode", &ok);    if (!ok) {      //Need to throw error here      return JS_FALSE;    }    NS_RELEASE(secMan);  }  else {    return JS_FALSE;  }  // If there's no private data, this must be the prototype, so ignore  if (nsnull == nativeThis) {    return JS_TRUE;  }  if (argc >= 2) {    if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)&b0,                                           kIElementIID,                                           "Element",                                           cx,                                           argv[0])) {      return JS_FALSE;    }    if (JS_FALSE == nsJSUtils::nsConvertJSValToObject((nsISupports **)&b1,                                           kIAttrIID,                                           "Attr",                                           cx,                                           argv[1])) {      return JS_FALSE;    }    if (NS_OK != nativeThis->OnSetAttributeNode(b0, b1)) {      return JS_FALSE;    }    *rval = JSVAL_VOID;  }  else {    JS_ReportError(cx, "Function onSetAttributeNode requires 2 parameters");    return JS_FALSE;  }  return JS_TRUE;}