Bug 608191 - Fix dochsell assertion caused by not forwarding relevant nsGlobalWindow functions, r=bzbarsky a=jst
authorNochum Sossonko <highmind63@gmail.com>
Fri, 11 Feb 2011 11:43:26 -0500
changeset 62357 47cbe0ba759c977963944bcbd5529ff7ece71592
parent 62356 409d5db222eb301d18f955d39c399be4ec586021
child 62358 da205ca44184423469d158c3d5e0d41d4b6e70e7
push id18710
push userhighmind63@gmail.com
push dateFri, 11 Feb 2011 17:07:19 +0000
treeherdermozilla-central@da205ca44184 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbzbarsky, jst
bugs608191
milestone2.0b12pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 608191 - Fix dochsell assertion caused by not forwarding relevant nsGlobalWindow functions, r=bzbarsky a=jst
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -4433,16 +4433,18 @@ nsGlobalWindow::Dump(const nsAString& aS
   }
 
   return NS_OK;
 }
 
 void
 nsGlobalWindow::EnsureReflowFlushAndPaint()
 {
+  NS_ASSERTION(IsOuterWindow(), "EnsureReflowFlushAndPaint() must be called on"
+               "the outer window");
   NS_ASSERTION(mDocShell, "EnsureReflowFlushAndPaint() called with no "
                "docshell!");
 
   if (!mDocShell)
     return;
 
   nsCOMPtr<nsIPresShell> presShell;
   mDocShell->GetPresShell(getter_AddRefs(presShell));
@@ -4712,16 +4714,19 @@ nsGlobalWindow::Confirm(const nsAString&
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::Prompt(const nsAString& aMessage, const nsAString& aInitial,
                        nsAString& aReturn)
 {
+  FORWARD_TO_OUTER(Prompt, (aMessage, aInitial, aReturn),
+                   NS_ERROR_NOT_INITIALIZED);
+
   SetDOMStringToNull(aReturn);
 
   if (AreDialogsBlocked())
     return NS_ERROR_NOT_AVAILABLE;
 
   // We have to capture this now so as not to get confused with the popup state
   // we push next
   PRBool shouldEnableDisableDialog = DialogOpenAttempted();
@@ -6750,16 +6755,19 @@ ConvertDialogOptions(const nsAString& aO
   }
 }
 
 NS_IMETHODIMP
 nsGlobalWindow::ShowModalDialog(const nsAString& aURI, nsIVariant *aArgs,
                                 const nsAString& aOptions,
                                 nsIVariant **aRetVal)
 {
+  FORWARD_TO_OUTER(ShowModalDialog, (aURI, aArgs, aOptions, aRetVal),
+                   NS_ERROR_NOT_INITIALIZED);
+
   *aRetVal = nsnull;
 
   // Before bringing up the window/dialog, unsuppress painting and flush
   // pending reflows.
   EnsureReflowFlushAndPaint();
 
   if (AreDialogsBlocked() || !ConfirmDialogAllowed())
     return NS_ERROR_NOT_AVAILABLE;