From 086c044dc34dfc0f74fbe41f4ecb402b2cd34884 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:13:33 +0200 Subject: Merging upstream version 125.0.1. Signed-off-by: Daniel Baumann --- browser/components/places/content/controller.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'browser/components/places/content/controller.js') diff --git a/browser/components/places/content/controller.js b/browser/components/places/content/controller.js index 3c113137df..6eaa129961 100644 --- a/browser/components/places/content/controller.js +++ b/browser/components/places/content/controller.js @@ -102,7 +102,7 @@ PlacesController.prototype = { QueryInterface: ChromeUtils.generateQI(["nsIClipboardOwner"]), // nsIClipboardOwner - LosingOwnership: function PC_LosingOwnership(aXferable) { + LosingOwnership: function PC_LosingOwnership() { this.cutNodes = []; }, @@ -333,7 +333,7 @@ PlacesController.prototype = { } }, - onEvent: function PC_onEvent(eventName) {}, + onEvent: function PC_onEvent() {}, /** * Determine whether or not the selection can be removed, either by the @@ -378,8 +378,12 @@ PlacesController.prototype = { */ _isRepeatedRemoveOperation() { let lastRemoveOperationFingerprint = this._lastRemoveOperationFingerprint; + // .bookmarkGuid and .pageGuid may either be null or an empty string. While + // that should probably change, it's safer to use || here. this._lastRemoveOperationFingerprint = PlacesUtils.sha256( - this._view.selectedNodes.map(n => n.guid ?? n.uri).join() + this._view.selectedNodes + .map(n => n.bookmarkGuid || (n.pageGuid || n.uri) + n.time) + .join() ); return ( lastRemoveOperationFingerprint == this._lastRemoveOperationFingerprint -- cgit v1.2.3