Closed
Bug 1421655
Opened 7 years ago
Closed 7 years ago
browser.clipboard.setImageData Only Works with a Small Amount of Data
Categories
(WebExtensions :: Untriaged, defect)
WebExtensions
Untriaged
Tracking
(firefox59 verified)
VERIFIED
FIXED
mozilla59
Tracking | Status | |
---|---|---|
firefox59 | --- | verified |
People
(Reporter: bchen, Assigned: baku)
Details
Attachments
(4 files)
2.55 KB,
patch
|
aosmond
:
review+
|
Details | Diff | Splinter Review |
3.76 KB,
patch
|
aosmond
:
review+
|
Details | Diff | Splinter Review |
12.64 KB,
patch
|
aosmond
:
review+
|
Details | Diff | Splinter Review |
41.90 KB,
image/png
|
Details |
Bug 1356543 introduced browser.clipboard.setImageData, which is now used in Screenshots. However, there's a regression starting with the 2017-11-27-22-04-46 build of Nightly. I think it came from bug 1420223. More specifically: https://hg.mozilla.org/mozilla-central/diff/e60f002f07d0/toolkit/components/extensions/ext-clipboard.js#l1.32 That `apply` call will hit the function argument length limit. STR 1. Google image search something with latest Nightly. Page down to the bottom. 2. Start Screenshots and select save full page. 3. Click the copy button. Expected Image successfully copied to system clipboard. Actual Error notification. The error message itself is also incorrect and misleading because the catch block did not make use of the exception.
Comment 1•7 years ago
|
||
Note this is causing a critical bug in the Screenshots' copy feature: https://github.com/mozilla-services/screenshots/issues/3850
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → amarchesini
Flags: needinfo?(amarchesini)
Assignee | ||
Comment 3•7 years ago
|
||
The problem here is that we are copy the buffer too much and we end up reaching the limit of the string size. Let's use arrayBuffer instead.
Attachment #8933249 -
Flags: review?(aosmond)
Assignee | ||
Comment 4•7 years ago
|
||
Attachment #8933250 -
Flags: review?(aosmond)
Assignee | ||
Comment 5•7 years ago
|
||
To be consistent with the other method.
Attachment #8933251 -
Flags: review?(aosmond)
Updated•7 years ago
|
Attachment #8933249 -
Flags: review?(aosmond) → review+
Updated•7 years ago
|
Attachment #8933250 -
Flags: review?(aosmond) → review+
Updated•7 years ago
|
Attachment #8933251 -
Flags: review?(aosmond) → review+
Pushed by amarchesini@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/d2dff894a6dd Using imgITools::decodeImageFromArrayBuffer instead coping data into a string, r=aosmond https://hg.mozilla.org/integration/mozilla-inbound/rev/807297ac2445 Implementation of imgITools::decodeImageFromArrayBuffer, r=aosmond https://hg.mozilla.org/integration/mozilla-inbound/rev/75d2ae4d07c4 Renaming imgITools::decodeImageBuffer to imgITools::decodeImageFromBuffer, r=aosmond
Comment 7•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d2dff894a6dd https://hg.mozilla.org/mozilla-central/rev/807297ac2445 https://hg.mozilla.org/mozilla-central/rev/75d2ae4d07c4
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla59
Comment 8•7 years ago
|
||
I can reproduce this issue on Firefox 59.0a1 (20171128220048) under Wind 10 64-bit. This issue is verified as fixed on Firefox 59.0a1 (20171205100345) under Wind 10 64-bit and Mac OS X 10.13.
Updated•7 years ago
|
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•