[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [Git][tpo/applications/tor-browser][base-browser-115.16.0esr-13.5-1] fixup! Bug 42019: Empty browser's clipboard on browser shutdown



Title: GitLab

ma1 pushed to branch base-browser-115.16.0esr-13.5-1 at The Tor Project / Applications / Tor Browser

Commits:

  • 91df6b5c
    by hackademix at 2024-10-17T22:22:55+02:00
    fixup! Bug 42019: Empty browser's clipboard on browser shutdown
    
    Bug 43209: Check if any data is available before trying to retrieve it from the clipboard.
    

1 changed file:

Changes:

  • browser/components/BrowserGlue.sys.mjs
    ... ... @@ -165,8 +165,17 @@ const ClipboardPrivacy = {
    165 165
         return trans;
    
    166 166
       },
    
    167 167
       _computeClipboardHash() {
    
    168
    +    const flavors = ["text/x-moz-url", "text/plain"];
    
    169
    +    if (
    
    170
    +      !Services.clipboard.hasDataMatchingFlavors(
    
    171
    +        flavors,
    
    172
    +        Ci.nsIClipboard.kGlobalClipboard
    
    173
    +      )
    
    174
    +    ) {
    
    175
    +      return null;
    
    176
    +    }
    
    168 177
         const trans = this._createTransferable();
    
    169
    -    ["text/x-moz-url", "text/plain"].forEach(trans.addDataFlavor);
    
    178
    +    flavors.forEach(trans.addDataFlavor);
    
    170 179
         try {
    
    171 180
           Services.clipboard.getData(trans, Ci.nsIClipboard.kGlobalClipboard);
    
    172 181
           const clipboardContent = {};
    

  • _______________________________________________
    tor-commits mailing list
    tor-commits@xxxxxxxxxxxxxxxxxxxx
    https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits