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•8 months ago
|
Assignee | ||
Comment 1•8 months ago
|
||
And we could also have some tests then.
Assignee | ||
Updated•8 months ago
|
Assignee | ||
Comment 2•8 months ago
|
||
Assignee | ||
Comment 3•8 months ago
|
||
Assignee | ||
Comment 4•7 months ago
|
||
Updated•7 months ago
|
Updated•7 months ago
|
Assignee | ||
Comment 5•7 months ago
|
||
Assignee | ||
Comment 6•7 months ago
|
||
Depends on D188526
Updated•7 months ago
|
Comment 7•6 months 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•6 months 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•6 months ago
|
Assignee | ||
Comment 9•6 months ago
•
|
||
Assignee | ||
Comment 10•6 months ago
|
||
Comment 11•6 months ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8561b4726a2 Redesign the async clipboard read API; r=nika
Comment 12•6 months ago
•
|
||
Assignee | ||
Updated•6 months ago
|
Comment 13•6 months ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7355802744d1 Redesign the async clipboard read API; r=nika
Comment 14•6 months 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•6 months ago
|
||
Comment 16•6 months ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b0ff38a7d9fb Redesign the async clipboard read API; r=nika
Comment 17•6 months 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•6 months ago
|
||
Pushed by echen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b9ca7370b303 Redesign the async clipboard read API; r=nika
Comment 19•6 months ago
|
||
bugherder |
Assignee | ||
Updated•6 months ago
|
Description
•