*aResult = nsnull;  GlobalWindowImpl *global = new GlobalWindowImpl(); NS_ENSURE_TRUE(global, NS_ERROR_OUT_OF_MEMORY);  return CallQueryInterface(NS_STATIC_CAST(nsIScriptGlobalObject *, global), aResult); }
nsresult NS_NewScriptGlobalObject(nsIScriptGlobalObject **aResult){  NS_ENSURE_ARG_POINTER(aResult);  *aResult = nsnull;  GlobalWindowImpl *global =    new GlobalWindowImpl();  NS_ENSURE_TRUE(global, NS_ERROR_OUT_OF_MEMORY);  return CallQueryInterface(NS_STATIC_CAST(nsIScriptGlobalObject *, global),                            aResult);}