Bug 1053458 - Ignore failures sending Browser:Init message (r=felipe)

This commit is contained in:
Bill McCloskey 2014-08-19 15:48:58 -07:00
parent b7f4211b2c
commit fba26ad713

View File

@ -434,8 +434,12 @@ let AutoCompletePopup = {
}
}
let [initData] = sendSyncMessage("Browser:Init");
docShell.useGlobalHistory = initData.useGlobalHistory;
if (initData.initPopup) {
setTimeout(function() AutoCompletePopup.init(), 0);
// We may not get any responses to Browser:Init if the browser element
// is torn down too quickly.
let initData = sendSyncMessage("Browser:Init");
if (initData.length) {
docShell.useGlobalHistory = initData[0].useGlobalHistory;
if (initData[0].initPopup) {
setTimeout(() => AutoCompletePopup.init(), 0);
}
}