Open Bug 1973305 Opened 1 month ago Updated 1 month ago

Use cloned nsITransferable for clipboard cache

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)

enhancement

Tracking

()

People

(Reporter: edgar, Assigned: edgar)

Details

Currently, we use the nsITransferable passed for clipboard write as the clipboard cache directly, https://searchfox.org/mozilla-central/rev/338a8ecb357df66ee19e875227d706fb0dde5f30/widget/nsBaseClipboard.cpp#408. This means that if the nsITransferable is modified later, the clipboard cache is also affected. This is error-prone, using a cloned one looks more reasonable to me.

Oh, the DataStruct is not copy-able due to bug 335545.

You need to log in before you can comment on or make changes to this bug.