Bug 1388145 - Initialize the Windows Jump Lists from an idle callback. r=florian
MozReview-Commit-ID: FvDPNHGL3Ou
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -889,27 +889,16 @@ BrowserGlue.prototype = {
// handler and init message manager child shim for privileged api access.
// With older versions of the extension installed, this load will fail
// passively.
Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap.js", true);
if (PdfJs.enabled) {
Services.ppmm.loadProcessScript("resource://pdf.js/pdfjschildbootstrap-enabled.js", true);
}
- if (AppConstants.platform == "win") {
- // For Windows 7, initialize the jump list module.
- const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
- if (WINTASKBAR_CONTRACTID in Cc &&
- Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
- let temp = {};
- Cu.import("resource:///modules/WindowsJumpLists.jsm", temp);
- temp.WinTaskbarJumpList.startup();
- }
- }
-
TabCrashHandler.init();
if (AppConstants.MOZ_CRASHREPORTER) {
PluginCrashReporter.init();
}
ProcessHangMonitor.init();
// A channel for "remote troubleshooting" code...
@@ -1152,16 +1141,29 @@ BrowserGlue.prototype = {
}, 5000);
if (AppConstants.MOZ_CRASHREPORTER) {
Services.tm.idleDispatchToMainThread(() => {
UnsubmittedCrashHandler.checkForUnsubmittedCrashReports();
});
}
+ if (AppConstants.platform == "win") {
+ Services.tm.idleDispatchToMainThread(() => {
+ // For Windows 7, initialize the jump list module.
+ const WINTASKBAR_CONTRACTID = "@mozilla.org/windows-taskbar;1";
+ if (WINTASKBAR_CONTRACTID in Cc &&
+ Cc[WINTASKBAR_CONTRACTID].getService(Ci.nsIWinTaskbar).available) {
+ let temp = {};
+ Cu.import("resource:///modules/WindowsJumpLists.jsm", temp);
+ temp.WinTaskbarJumpList.startup();
+ }
+ });
+ }
+
Services.tm.idleDispatchToMainThread(() => {
this._checkForDefaultBrowser();
});
},
/**
* Use this function as an entry point to schedule tasks that need
* to run once per session, at any arbitrary point in time.