diff --git a/application/basilisk/base/content/browser-menubar.inc b/application/basilisk/base/content/browser-menubar.inc index d4fd4d4c79..fbfddb56a8 100644 --- a/application/basilisk/base/content/browser-menubar.inc +++ b/application/basilisk/base/content/browser-menubar.inc @@ -5,7 +5,11 @@ diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js index ceca570a3b..49371b6240 100644 --- a/application/basilisk/base/content/browser.js +++ b/application/basilisk/base/content/browser.js @@ -4803,6 +4803,10 @@ function getTogglableToolbars() { let toolbarNodes = Array.slice(gNavToolbox.childNodes); toolbarNodes = toolbarNodes.concat(gNavToolbox.externalToolbars); toolbarNodes = toolbarNodes.filter(node => node.getAttribute("toolbarname")); +#ifdef MOZ_WIDGET_GTK + if (document.documentElement.getAttribute("shellshowingmenubar") == "true") + toolbarNodes = toolbarNodes.filter(node => node.id != "toolbar-menubar"); +#endif return toolbarNodes; } diff --git a/application/basilisk/base/content/tab-content.js b/application/basilisk/base/content/tab-content.js index 1fdf42c9e5..af82f32ccd 100644 --- a/application/basilisk/base/content/tab-content.js +++ b/application/basilisk/base/content/tab-content.js @@ -892,11 +892,13 @@ UserContextIdNotifier.init(); #ifdef MOZ_WEBEXTENSIONS ExtensionContent.init(this); +#endif addEventListener("unload", () => { +#ifdef MOZ_WEBEXTENSIONS ExtensionContent.uninit(this); +#endif RefreshBlocker.uninit(); }); -#endif addMessageListener("AllowScriptsToClose", () => { content.QueryInterface(Ci.nsIInterfaceRequestor) diff --git a/application/basilisk/components/places/content/places.xul b/application/basilisk/components/places/content/places.xul index 16c3385cbf..6d2cdf1712 100644 --- a/application/basilisk/components/places/content/places.xul +++ b/application/basilisk/components/places/content/places.xul @@ -156,8 +156,12 @@ #ifdef XP_MACOSX #else +#endif base()->slotSpan(); - return lastProperty()->slotSpan(); + + // Get the class from the object group rather than the base shape to avoid a + // race between Shape::ensureOwnBaseShape and background sweeping. + return lastProperty()->slotSpan(getClass()); } /* Whether a slot is at a fixed offset from this object. */ diff --git a/netwerk/base/nsStandardURL.cpp b/netwerk/base/nsStandardURL.cpp index 81b4855028..1866c10379 100644 --- a/netwerk/base/nsStandardURL.cpp +++ b/netwerk/base/nsStandardURL.cpp @@ -2747,12 +2747,16 @@ nsStandardURL::SetFilePath(const nsACString &input) return SetSpec(spec); } - else if (mPath.mLen > 1) { + + if (mPath.mLen > 1) { mSpec.Cut(mPath.mPos + 1, mFilepath.mLen - 1); // left shift query, and ref ShiftFromQuery(1 - mFilepath.mLen); + // One character for '/', and if we have a query or ref we add their + // length and one extra for each '?' or '#' characters + mPath.mLen = 1 + (mQuery.mLen >= 0 ? (mQuery.mLen + 1) : 0) + + (mRef.mLen >= 0 ? (mRef.mLen + 1) : 0); // these contain only a '/' - mPath.mLen = 1; mDirectory.mLen = 1; mFilepath.mLen = 1; // these are no longer defined