nsCOMPtr<nsILoadGroup> loadGroup; doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));
nsCOMPtr<nsILoadGroup> loadGroup = doc->GetDocumentLoadGroup();
nsresult CantRenderReplacedElementEvent::AddLoadGroupRequest(nsIPresShell* aPresShell){  nsCOMPtr<nsIDocument> doc;  aPresShell->GetDocument(getter_AddRefs(doc));  if (!doc) return NS_ERROR_FAILURE;  nsresult rv = nsDummyLayoutRequest::Create(getter_AddRefs(mDummyLayoutRequest), aPresShell);  if (NS_FAILED(rv)) return rv;  if (!mDummyLayoutRequest) return NS_ERROR_FAILURE;  nsCOMPtr<nsILoadGroup> loadGroup;  doc->GetDocumentLoadGroup(getter_AddRefs(loadGroup));  if (!loadGroup) return NS_ERROR_FAILURE;    rv = mDummyLayoutRequest->SetLoadGroup(loadGroup);  if (NS_FAILED(rv)) return rv;    mPresShell = do_GetWeakReference(aPresShell);  return loadGroup->AddRequest(mDummyLayoutRequest, nsnull);}