зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1254865 - Send init for AutoCompletePopup in async message from the parent. r=Felipe
MozReview-Commit-ID: IZ9f8pTTflF --HG-- extra : rebase_source : 77d97d6ceec1aac296788a702c96288507608c7d
This commit is contained in:
Родитель
61416ae37e
Коммит
1cfa3e2fe8
|
@ -632,9 +632,10 @@ addMessageListener("PermitUnload", msg => {
|
|||
var outerWindowID = content.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||
.getInterface(Ci.nsIDOMWindowUtils)
|
||||
.outerWindowID;
|
||||
var initData = sendSyncMessage("Browser:Init", {outerWindowID: outerWindowID});
|
||||
if (initData.length && initData[0]) {
|
||||
if (initData[0].initPopup) {
|
||||
setTimeout(() => AutoCompletePopup.init(), 0);
|
||||
sendAsyncMessage("Browser:Init", {outerWindowID: outerWindowID});
|
||||
addMessageListener("Browser:InitReceived", function onInitReceived(msg) {
|
||||
removeMessageListener("Browser:InitReceived", onInitReceived);
|
||||
if (msg.data.initPopup) {
|
||||
AutoCompletePopup.init();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
@ -430,9 +430,9 @@
|
|||
switch (aMessage.name) {
|
||||
case "Browser:Init":
|
||||
this._outerWindowID = data.outerWindowID;
|
||||
let result = {};
|
||||
result.initPopup = this.autoCompletePopup != null;
|
||||
return result;
|
||||
this.messageManager.sendAsyncMessage("Browser:InitReceived", {
|
||||
initPopup: this.autoCompletePopup != null,
|
||||
});
|
||||
break;
|
||||
case "DOMTitleChanged":
|
||||
this._contentTitle = data.title;
|
||||
|
|
Загрузка…
Ссылка в новой задаче