nsIScriptObjectOwner *owner = nsnull; if (NS_OK == attributeList->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { owner->ResetScriptObject(); NS_RELEASE(owner);
if (nsnull != attributeList) {  nsIScriptObjectOwner *owner = nsnull; if (NS_OK == attributeList->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) { owner->ResetScriptObject(); NS_RELEASE(owner); }  attributeList->Release();
FinalizeAttributeList(JSContext *cx, JSObject *obj){  nsIDOMAttributeList *attributeList = (nsIDOMAttributeList*)JS_GetPrivate(cx, obj);  NS_ASSERTION(nsnull != attributeList, "null pointer");  // get the js object  nsIScriptObjectOwner *owner = nsnull;  if (NS_OK == attributeList->QueryInterface(kIScriptObjectOwnerIID, (void**)&owner)) {    owner->ResetScriptObject();    NS_RELEASE(owner);  }  attributeList->Release();}