Clipboard doesn't allow roundtripping arbitrary data (i.e xpcom objects)

NEW
Unassigned

Status

()

Core
Widget
9 years ago
9 years ago

People

(Reporter: Fallen, Unassigned)

Tracking

({testcase})

1.9.1 Branch
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

3.78 KB, application/vnd.mozilla.xul+xml
Details
(Reporter)

Description

9 years ago
I'd like to move a set of xpcom objects around in calendar. While nsITransferable seems to support this using a nsISupportsInterfacePointer, nsIClipboard fails to roundtrip this when doing clipboard.setData() then clipboard.getData().

The solution seems quite simple to me: when iterating through the flavors wanted in nsIClipboard::getData() and the data could not be retrieved from the system clipboard, try to get the data (in the current flavor) from the nsClipboard's own transferable. If this is there, return it. Otherwise check the next flavor.

Possibly we might want to add a marker flavor to the system clipboard to make sure the internal transferable isn't out of sync.

I would of course like to see this for 1.9.1 since a calendar blocker depends on it.
(Reporter)

Comment 1

9 years ago
Created attachment 359540 [details]
Testcase - v1

This testcase exhibits the problem. You'll need signed.applets.codebase_principal_support (Sorry!) to allow access to the clipboard.
(Reporter)

Updated

9 years ago
Keywords: testcase
(Reporter)

Updated

9 years ago
Blocks: 345607
You need to log in before you can comment on or make changes to this bug.