Bug 1072115 - languagechange event should be dispatched to current inner windows only., r=bz

This commit is contained in:
Andrea Marchesini 2014-09-24 17:12:22 +01:00
parent 35cf5d8d51
commit 573f71fa10

View File

@ -11515,6 +11515,11 @@ nsGlobalWindow::Observe(nsISupports* aSubject, const char* aTopic,
NavigatorBinding::ClearCachedLanguagesValue(mNavigator);
}
// The event has to be dispatched only to the current inner window.
if (!IsCurrentInnerWindow()) {
return NS_OK;
}
nsCOMPtr<nsIDOMEvent> event;
NS_NewDOMEvent(getter_AddRefs(event), this, nullptr, nullptr);
nsresult rv = event->InitEvent(NS_LITERAL_STRING("languagechange"), false, false);