Consider redesigning the async get API in nsIClipboard
Categories
(Core :: DOM: Copy & Paste and Drag & Drop, enhancement)
Tracking
()
Tracking | Status | |
---|---|---|
firefox121 | --- | fixed |
People
(Reporter: edgar, Assigned: edgar)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
In bug 1755863, we introduce two async get API in nsIClipboard to make async clipboard API really read the clipboard data asynchronously.
When user read the clipboard data through async clipboard API, it gets the available type first, and then get the actual data for s certain type. There's a potential race condition concern if the clipboard has different data on it when we check the types compared to when we actually get the data. Currently, we get the actual data immediate after getting available types (this also follows spec), so there is only a small chance to hit such racing problem. However, if we would like to get the data only when getType()
is called (bug 1691825), that will become a serious issue.
Also, bug 1777448 would like to have a way to track the clipboard data and not show the paste contextmenu when the clipboard data is written by the same-origin page. That also requires a better way of tracking read request and the actual clipboard data/available types and invaliding the request when the clipboard data in system is changed.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 1•2 years ago
|
||
And we could also have some tests then.
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Comment 2•2 years ago
|
||
Assignee | ||
Comment 3•2 years ago
|
||
Assignee | ||
Comment 4•2 years ago
|
||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Comment 6•2 years ago
|
||
Depends on D188526
Updated•2 years ago
|
Comment 7•2 years ago
|
||
Comment on attachment 9353787 [details]
Bug 1852947 - Part 1: Rename nsIAsyncSetClipboardDataCallback to nsIAsyncClipboardRequestCallback; r?nika
Revision D188526 was moved to bug 1861927. Setting attachment 9353787 [details] to obsolete.
Comment 8•2 years ago
|
||
Comment on attachment 9359322 [details]
Bug 1852947 - Part 2: Add function attribute to nsIAsyncClipboardRequestCallback; r?nika
Revision D191409 was moved to bug 1861927. Setting attachment 9359322 [details] to obsolete.
Updated•2 years ago
|
Assignee | ||
Comment 9•2 years ago
•
|
||
Assignee | ||
Comment 10•2 years ago
|
||
Comment 11•2 years ago
|
||
Comment 12•2 years ago
•
|
||
Assignee | ||
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
Backed out changeset 7355802744d1 (Bug 1852947) for causing failures in test_clipboard_asyncGetData.html CLOSED TREE
Log: https://treeherder.mozilla.org/logviewer?job_id=435575766&repo=autoland&lineNumber=19031
https://treeherder.mozilla.org/logviewer?job_id=435577110&repo=autoland&lineNumber=2401
https://treeherder.mozilla.org/logviewer?job_id=435575814&repo=autoland&lineNumber=18442
Backout: https://hg.mozilla.org/integration/autoland/rev/7b73b48fb1cd3b655cf7eb816c0ccca1e2b69673
Assignee | ||
Comment 15•2 years ago
|
||
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
Backed out changeset b0ff38a7d9fb (Bug 1852947) for causing aInstanceSize related assertion failures
Log: https://treeherder.mozilla.org/logviewer?job_id=435872764&repo=autoland&lineNumber=27490
and some almost perma tier2 failures: https://treeherder.mozilla.org/logviewer?job_id=435872506&repo=autoland&lineNumber=18263
Backout: https://hg.mozilla.org/integration/autoland/rev/4d951aaaeb357f1f837c064f3c0f2670aedf8615
Comment 18•2 years ago
|
||
Comment 19•2 years ago
|
||
bugherder |
Assignee | ||
Updated•2 years ago
|
Description
•