Skip to content

Commit a77d9ba

Browse files
joaorafmaxauthority
authored andcommitted
nsITransferable must be initialized before use. Fixes #660. (#661)
1 parent 829c5a4 commit a77d9ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

common/content/util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -663,6 +663,9 @@ const Util = Module("util", {
663663
try {
664664
const clipboard = Cc["@mozilla.org/widget/clipboard;1"].getService(Ci.nsIClipboard);
665665
const transferable = Cc["@mozilla.org/widget/transferable;1"].createInstance(Ci.nsITransferable);
666+
if("init" in transferable) {
667+
transferable.init(null);
668+
}
666669

667670
transferable.addDataFlavor("text/unicode");
668671

0 commit comments

Comments
 (0)