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