Bug 1792457 - Revert workarounds for weak references to XPCWJS crashes. r=Gijs
I have fixed the underlying XPConnect issue, so these workarounds should no longer be needed. There are also two more in browser/base/content/browser-siteProtections.js that I have not fixed. Differential Revision: https://phabricator.services.mozilla.com/D158158
This commit is contained in:
@@ -17,21 +17,16 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
false
|
||||
);
|
||||
|
||||
/* Work around the pref callback being run after the document has been unlinked.
|
||||
See bug 1543537. */
|
||||
var docWeak = Cu.getWeakReference(document);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"SHOW_OTHER_BOOKMARKS",
|
||||
"browser.toolbars.bookmarks.showOtherBookmarks",
|
||||
true,
|
||||
(aPref, aPrevVal, aNewVal) => {
|
||||
let doc = docWeak.get();
|
||||
if (!doc) {
|
||||
return;
|
||||
}
|
||||
BookmarkingUI.maybeShowOtherBookmarksFolder();
|
||||
doc.getElementById("PlacesToolbar")?._placesView?.updateNodesVisibility();
|
||||
document
|
||||
.getElementById("PlacesToolbar")
|
||||
?._placesView?.updateNodesVisibility();
|
||||
}
|
||||
);
|
||||
ChromeUtils.defineModuleGetter(
|
||||
|
||||
Reference in New Issue
Block a user