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