NS_IF_ADDREF(mHistoryState); *aState = mHistoryState;
nsCOMPtr<nsILayoutHistoryState> historyState = do_QueryReferent(mHistoryState); *aState = historyState; NS_IF_ADDREF(*aState);
PresShell::GetHistoryState(nsILayoutHistoryState** aState){  NS_IF_ADDREF(mHistoryState);  *aState = mHistoryState;  return NS_OK;}