Bug 671160. Pass the outer window to DispatchTrustedEvent in nsGlobalWindow::DispatchCustomEvent. r=smaug
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 14 Jul 2011 13:02:20 -0400
changeset 72826 553625d7875d4b0e855cab739b64298a84003df1
parent 72825 69dfa4008531b4ca2fb68d60a820ae639adbe292
child 72827 0ab660ee24ab2a9f0909d0a592a9000541f49995
push id20776
push usereakhgari@mozilla.com
push dateFri, 15 Jul 2011 12:13:35 +0000
treeherdermozilla-central@9349ae9094f6 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs671160
milestone8.0a1
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 671160. Pass the outer window to DispatchTrustedEvent in nsGlobalWindow::DispatchCustomEvent. r=smaug
dom/base/nsGlobalWindow.cpp
--- a/dom/base/nsGlobalWindow.cpp
+++ b/dom/base/nsGlobalWindow.cpp
@@ -4299,17 +4299,17 @@ nsGlobalWindow::GetLength(PRUint32* aLen
 }
 
 PRBool
 nsGlobalWindow::DispatchCustomEvent(const char *aEventName)
 {
   PRBool defaultActionEnabled = PR_TRUE;
   nsCOMPtr<nsIDocument> doc(do_QueryInterface(mDocument));
   nsContentUtils::DispatchTrustedEvent(doc,
-                                       static_cast<nsIScriptGlobalObject*>(this),
+                                       GetOuterWindow(),
                                        NS_ConvertASCIItoUTF16(aEventName),
                                        PR_TRUE, PR_TRUE, &defaultActionEnabled);
 
   return defaultActionEnabled;
 }
 
 static already_AddRefed<nsIDocShellTreeItem>
 GetCallerDocShellTreeItem()