summaryrefslogtreecommitdiffstats
path: root/browser/components/places/content/controller.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:13:27 +0000
commit40a355a42d4a9444dc753c04c6608dade2f06a23 (patch)
tree871fc667d2de662f171103ce5ec067014ef85e61 /browser/components/places/content/controller.js
parentAdding upstream version 124.0.1. (diff)
downloadfirefox-adbda400be353e676059e335c3c0aaf99e719475.tar.xz
firefox-adbda400be353e676059e335c3c0aaf99e719475.zip
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/components/places/content/controller.js')
-rw-r--r--browser/components/places/content/controller.js10
1 files changed, 7 insertions, 3 deletions
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