Bug 1251567 - Don't delay loading reader mode frame script; r=margaret

When restoring reader mode tabs, we need the reader mode frame script to
be loaded early, otherwise the restored page won't be loaded correctly.
The safest fix seems to be simply not delay-loading the frame script.
This commit is contained in:
Jim Chen 2016-03-03 13:10:07 -05:00
parent 633ea30d54
commit 40fe704b00

View File

@ -544,15 +544,15 @@ var BrowserApp = {
ExternalApps.init();
}, NativeWindow, "contextmenus");
InitLater(() => {
let mm = window.getGroupMessageManager("browsers");
mm.loadFrameScript("chrome://browser/content/content.js", true);
});
if (AppConstants.ACCESSIBILITY) {
InitLater(() => AccessFu.attach(window), window, "AccessFu");
}
// Don't delay loading content.js because when we restore reader mode tabs,
// we require the reader mode scripts in content.js right away.
let mm = window.getGroupMessageManager("browsers");
mm.loadFrameScript("chrome://browser/content/content.js", true);
// We can't delay registering WebChannel listeners: if the first page is
// about:accounts, which can happen when starting the Firefox Account flow
// from the first run experience, or via the Firefox Account Status