diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index e545255f557..5324b5a789d 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -1123,6 +1123,10 @@ function nonBrowserWindowDelayedStartup() #ifndef MOZ_PLACES initServices(); initBMService(); +#else + var menu = document.getElementById("bookmarksMenuPopup"); + menu._init(); + window.controllers.appendController(PlacesController); #endif // init global pref service @@ -2891,7 +2895,13 @@ function FillHistoryMenu(aParent, aMenu, aInsertBefore) // Remove old entries if any deleteHistoryItems(aParent); - var sessionHistory = getWebNavigation().sessionHistory; + var webNav = getWebNavigation(); + if (!webNav) { + // This is always the case for non-browser windows (and the hidden window) + // on OS X + return true; + } + var sessionHistory = webNav.sessionHistory; var count = sessionHistory.count; var index = sessionHistory.index; diff --git a/mozilla/browser/base/content/macBrowserOverlay.xul b/mozilla/browser/base/content/macBrowserOverlay.xul index 1f2d55f483c..910ec8e1d11 100644 --- a/mozilla/browser/base/content/macBrowserOverlay.xul +++ b/mozilla/browser/base/content/macBrowserOverlay.xul @@ -48,6 +48,9 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> + + + # All JS files which are not content (only) dependent that browser.xul diff --git a/mozilla/toolkit/content/macWindowMenu.js b/mozilla/toolkit/content/macWindowMenu.js index 4e4e47c7eb1..184c6c7174c 100644 --- a/mozilla/toolkit/content/macWindowMenu.js +++ b/mozilla/toolkit/content/macWindowMenu.js @@ -35,11 +35,11 @@ # # ***** END LICENSE BLOCK ***** -const nsIWindowDataSource = Components.interfaces.nsIWindowDataSource; - function checkFocusedWindow() { - var windowManagerDS = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(nsIWindowDataSource); + var windowManagerDS = + Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'] + .getService(Components.interfaces.nsIWindowDataSource); var sep = document.getElementById("sep-window-list"); // Using double parens to avoid warning @@ -60,8 +60,9 @@ function toOpenWindow( aWindow ) function ShowWindowFromResource( node ) { - var windowManagerDS = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'] - .getService(nsIWindowDataSource); + var windowManagerDS = + Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'] + .getService(Components.interfaces.nsIWindowDataSource); var desiredWindow = null; var url = node.getAttribute('id'); @@ -77,4 +78,3 @@ function zoomWindow() else window.restore(); } -