Closed Bug 1811457 Opened 1 year ago Closed 1 year ago

Transfer, rather than copy, PDF-data to the viewer

Categories

(Firefox :: PDF Viewer, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: Snuffleupagus, Assigned: Snuffleupagus)

Details

Attachments

(1 file)

In order to reduce overall memory usage, we should transfer PDF-data from the platform code to the PDF Viewer.

In order to reduce overall memory usage, we should transfer PDF-data from the platform code to the PDF Viewer.

:Snuffleupagus, are you able to run mach try ?

Flags: needinfo?(jonas.jenwald)

(In reply to Calixte Denizet (:calixte) from comment #2)

:Snuffleupagus, are you able to run mach try ?

Unfortunately not, since I don't have access.

(In reply to Calixte Denizet (:calixte) from comment #3)

If not you can ask for Level 1 access: https://firefox-source-docs.mozilla.org/tools/try/configuration.html#getting-level-1-commit-access

Given that I'm submitting so few mozilla-central patches, I'm not sure if it's really worth it. (Every time that I do, I usually need to refer back to the documentation for how to do things...)

Flags: needinfo?(jonas.jenwald)
Pushed by cdenizet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/20bb31347ce4
Transfer, rather than copy, PDF-data to the viewer. r=pdfjs-reviewers,robwu

TL;DR It seems that using null as the default value for the transfers parameter, in the postMessage-calls, doesn't work in some(?) of the test-suites; however using undefined instead seems to work.


The error comes from https://treeherder.mozilla.org/logviewer?job_id=403057239&repo=autoland&lineNumber=14240 and happens in the https://searchfox.org/mozilla-central/source/dom/base/test/test_pdf_print.html test-case.
As can be seen there that test-case opens nonsensical "PDF documents", and in particular this line causes the error.

Strangely enough directly loading data:application/pdf, in the browser, with the original patch applied, works fine so it seems to be something "special" about the test-suite in use.
Locally this test-case does work with the updated patch, although I don't at all understand why it fixes things; however it's probably the best I can do here.

Flags: needinfo?(jonas.jenwald)

The error comes from WindowBinding.cpp which means that null is not a valid argument hence your fix is the correct one.

Pushed by cdenizet@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/52f9e6382dce
Transfer, rather than copy, PDF-data to the viewer. r=pdfjs-reviewers,robwu,calixte
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: