PDF.js Print dialog's "Open PDF in Preview" or "Save as PDF" opens an empty PDF file

VERIFIED FIXED in Firefox 41

Status

()

defect
VERIFIED FIXED
4 years ago
4 years ago

People

(Reporter: cpeterson, Assigned: bas.schouten)

Tracking

({regression})

unspecified
mozilla42
Unspecified
macOS
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox39 unaffected, firefox40 unaffected, firefox41+ verified, firefox42 verified, firefox43 verified)

Details

()

Attachments

(1 attachment)

@ Bas, I bisected this regression to this pushlog, which implicates bug 1167235 ("Use a fast method of double buffering for canvas"):

https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=d1d45ce7cbf5&tochange=eccde665c72a

STR:
1. Load http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4280.pdf in pdf.js
2. Click pdf.js' "Print" button.
3. From the OS X Print dialog, select the "PDF" drop down menu > "Open PDF in Preview" or "Save as PDF" menu item.

RESULT:
The PDF that is saved or opened in Preview has the correct number of pages, but it is empty.

[Tracking Requested - why for this release]:

This is a regression in Firefox 41.
Flags: needinfo?(bas)
Tracked, seems like a bad regression.
I can reproduce this.
Assignee: nobody → bas
To be clear, this is non-E10S scenario.
Bas is on this, there are some problems on Windows as well.
Flags: needinfo?(bas)
Attachment #8643512 - Flags: review?(jmuizelaar)
(In reply to Bas Schouten (:bas.schouten) from comment #5)
> Created attachment 8643512 [details] [diff] [review]
> Ensure persistance of the surface coming from InitializeWithSurface.

Makes the problem go away for me.
Comment on attachment 8643512 [details] [diff] [review]
Ensure persistance of the surface coming from InitializeWithSurface.

Review of attachment 8643512 [details] [diff] [review]:
-----------------------------------------------------------------

Are the lifetimes OK here, in the sense that we can't do something to the mTarget that would mess things up while we're still in the middle of printing?
Attachment #8643512 - Flags: review?(jmuizelaar) → review+
https://hg.mozilla.org/mozilla-central/rev/c3c11f8a33aa
https://hg.mozilla.org/mozilla-central/rev/a7aa35707f31
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Chris, could you please verify that this issue if fixed? That will help me decide whether the patch is ready to be uplifted to Beta41 or not. Thanks!
Flags: needinfo?(cpeterson)
Verified fixed in Nightly 43 and Aurora 42.
Status: RESOLVED → VERIFIED
Flags: needinfo?(cpeterson)
Thanks Chris for the verification!

Bas, this bug is marked as FF41+ tracking. Do you want to request uplift to Beta? Thanks!
Flags: needinfo?(bas)
Comment on attachment 8643512 [details] [diff] [review]
Ensure persistance of the surface coming from InitializeWithSurface.

Approval Request Comment
[Feature/regressing bug #]: Bug 1167235
[User impact if declined]: Incorrect printing of canvases
[Describe test coverage new/current, TreeHerder]: Nightly and Aurora usage
[Risks and why]: Low, minor change which returns behavior somewhat closer to pre-bug behavior.
[String/UUID change made/needed]: None
Flags: needinfo?(bas)
Attachment #8643512 - Flags: approval-mozilla-beta?
Duplicate of this bug: 1185580
Comment on attachment 8643512 [details] [diff] [review]
Ensure persistance of the surface coming from InitializeWithSurface.

Fix was verified and baked for 2 weeks on Nightly. Seems safe to uplift to Beta.
Attachment #8643512 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Also verified on Mac OS X 10.8.5 with Firefox 41 Beta 5.
Duplicate of this bug: 1184499
Depends on: 1201874
You need to log in before you can comment on or make changes to this bug.