void HandleEvent() { nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell); if (presShell) { #ifdef DEBUG if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) { printf("\n*** Handling reflow event: PresShell=%p, event=%p\n", (void*)presShell.get(), (void*)this); } #endif    PresShell* ps = NS_REINTERPRET_CAST(PresShell*, presShell.get()); PRBool isBatching; ps->ClearReflowEventStatus(); ps->GetReflowBatchingStatus(&isBatching); if (!isBatching) {   nsCOMPtr<nsIViewManager> viewManager = presShell->GetViewManager();  viewManager->BeginUpdateViewBatch(); ps->ProcessReflowCommands(PR_TRUE); viewManager->EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);   presShell = nsnull; viewManager = nsnull; } } else mPresShell = 0;
void HandleEvent() {  nsRefPtr<PresShell> presShell = NS_STATIC_CAST(PresShell*, owner); presShell->RemoveDummyLayoutRequest(mDummyLayoutRequest); mDummyLayoutRequest = nsnull;
  void HandleEvent() {        nsCOMPtr<nsIPresShell> presShell = do_QueryReferent(mPresShell);    if (presShell) {#ifdef DEBUG      if (VERIFY_REFLOW_NOISY_RC & gVerifyReflowFlags) {         printf("\n*** Handling reflow event: PresShell=%p, event=%p\n", (void*)presShell.get(), (void*)this);      }#endif      // XXX Statically cast the pres shell pointer so that we can call      // protected methods on the pres shell. (the ReflowEvent struct      // is a friend of the PresShell class)      PresShell* ps = NS_REINTERPRET_CAST(PresShell*, presShell.get());      PRBool isBatching;      ps->ClearReflowEventStatus();      ps->GetReflowBatchingStatus(&isBatching);      if (!isBatching) {        // Set a kung fu death grip on the view manager associated with the pres shell        // before processing that pres shell's reflow commands.  Fixes bug 54868.        nsCOMPtr<nsIViewManager> viewManager = presShell->GetViewManager();        viewManager->BeginUpdateViewBatch();        ps->ProcessReflowCommands(PR_TRUE);        viewManager->EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);        // Now, explicitly release the pres shell before the view manager        presShell = nsnull;        viewManager = nsnull;      }    }    else      mPresShell = 0;  }