Bug 1689827 - Remove length parameter from JS callers of setTransferData. r=smaug

Differential Revision: https://phabricator.services.mozilla.com/D103555
This commit is contained in:
Tom Schuster
2021-02-01 12:05:12 +00:00
parent 284007d949
commit f7d112c734
19 changed files with 27 additions and 40 deletions

View File

@@ -1090,7 +1090,7 @@ PlacesController.prototype = {
// Empty transferables may cause crashes, so just add an unknown type.
const TYPE = "text/x-moz-place-empty";
xferable.addDataFlavor(TYPE);
xferable.setTransferData(TYPE, PlacesUtils.toISupportsString(""), 0);
xferable.setTransferData(TYPE, PlacesUtils.toISupportsString(""));
this.clipboard.setData(xferable, null, Ci.nsIClipboard.kGlobalClipboard);
},
@@ -1122,11 +1122,7 @@ PlacesController.prototype = {
function addData(type, data) {
xferable.addDataFlavor(type);
xferable.setTransferData(
type,
PlacesUtils.toISupportsString(data),
data.length * 2
);
xferable.setTransferData(type, PlacesUtils.toISupportsString(data));
}
let xferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(