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