Bug 990812 - Let the frame loader use a group message manager as the parent when it detects that a frame belongs to a certain group r=smaug

This commit is contained in:
Tim Taubert 2014-05-23 14:49:09 +02:00
Родитель b4db14fef7
Коммит 230fa7a56a
2 изменённых файлов: 13 добавлений и 1 удалений

Просмотреть файл

@ -2425,8 +2425,19 @@ nsFrameLoader::EnsureMessageManager()
nsCOMPtr<nsIDOMChromeWindow> chromeWindow =
do_QueryInterface(GetOwnerDoc()->GetWindow());
nsCOMPtr<nsIMessageBroadcaster> parentManager;
if (chromeWindow) {
chromeWindow->GetMessageManager(getter_AddRefs(parentManager));
nsAutoString messagemanagergroup;
if (mOwnerContent->IsXUL() &&
mOwnerContent->GetAttr(kNameSpaceID_None,
nsGkAtoms::messagemanagergroup,
messagemanagergroup)) {
chromeWindow->GetGroupMessageManager(messagemanagergroup, getter_AddRefs(parentManager));
}
if (!parentManager) {
chromeWindow->GetMessageManager(getter_AddRefs(parentManager));
}
}
if (ShouldUseRemoteProcess()) {

Просмотреть файл

@ -583,6 +583,7 @@ GK_ATOM(minpos, "minpos")
GK_ATOM(minusSign, "minus-sign")
GK_ATOM(minwidth, "minwidth")
GK_ATOM(_mixed, "mixed")
GK_ATOM(messagemanagergroup, "messagemanagergroup")
GK_ATOM(mod, "mod")
GK_ATOM(mode, "mode")
GK_ATOM(modifiers, "modifiers")