nsCOMPtr<nsIScriptGlobalObject> globalObj; mDocument->GetScriptGlobalObject(getter_AddRefs(globalObj));
nsCOMPtr<nsIScriptGlobalObject> globalObj = mDocument->GetScriptGlobalObject();
PresShell::FireResizeEvent(){  if (mIsDocumentGone)    return;  //Send resize event from here.  nsEvent event;  nsEventStatus status = nsEventStatus_eIgnore;  event.eventStructType = NS_EVENT;  event.message = NS_RESIZE_EVENT;  event.time = 0;  nsCOMPtr<nsIScriptGlobalObject> globalObj;  mDocument->GetScriptGlobalObject(getter_AddRefs(globalObj));  if (globalObj) {    globalObj->HandleDOMEvent(mPresContext, &event, nsnull, NS_EVENT_FLAG_INIT, &status);  }}