Update PDF.js to new version 517d7a6dc3f3d2b205f045281bfa2001e198d931 from 2023-01-14 14:24:53
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: CjIk0ohrS0mOQtJjwYfn5A])
Attachments
(1 obsolete file)
This update covers 3 commits:
9e3adb5ec70f62ecc9dd7c2b3cb15a02286b3d45 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/9e3adb5ec70f62ecc9dd7c2b3cb15a02286b3d45
Authored: 2023-01-08 14:49:20 +0100
Committed: 2023-01-14 15:09:58 +0100
Implement unit tests for the numberToString
utility function
Files Modified:
- test/unit/core_utils_spec.js
a6dfcc89fab6a82000b3bf07a851a1b913190fc5 by Tim van der Meij
https://github.com/mozilla/pdf.js/commit/a6dfcc89fab6a82000b3bf07a851a1b913190fc5
Authored: 2023-01-08 14:43:07 +0100
Committed: 2023-01-14 15:09:58 +0100
Implement unit tests for the recoverJsURL
utility function
Files Modified:
- test/unit/core_utils_spec.js
cee97fcd15cda22953f1eacf42f82a0039f362b7 by Jonas Jenwald
https://github.com/mozilla/pdf.js/commit/cee97fcd15cda22953f1eacf42f82a0039f362b7
Authored: 2023-01-11 22:03:36 +0100
Committed: 2023-01-12 13:59:21 +0100
[api-minor] Enabling transferring of data fetched with the PDFFetchStream
implementation
Note how in the API we're transferring the PDF data that's fetched over the network[1]:
- https://github.com/mozilla/pdf.js/blob/f28bf23a314e36d9e255037f5716ae1eb8e16fbf/src/display/api.js#L2467-L2480
- https://github.com/mozilla/pdf.js/blob/f28bf23a314e36d9e255037f5716ae1eb8e16fbf/src/display/api.js#L2553-L2564
To support that functionality we have the PDFDataTransportStream
, PDFFetchStream
, PDFNetworkStream
, and PDFNodeStream
implementations. Here these stream-implementations vary slightly in how they handle ArrayBuffer
s internally, w.r.t. transferring or copying the data:
- In
PDFDataTransportStream
we optionally, after PR 15908, allow transferring of the PDF data as provided externally (used e.g. in the Firefox PDF Viewer). - In
PDFFetchStream
we're currenly always copying the PDF data returned by the Fetch API, which seems unnecessary. As discussed in PR 15908, it'd seem very weird if this sort of browser API didn't allow transferring of the returned data. - In
PDFNetworkStream
we're already, since many years, transferring the PDF data returned by theXMLHttpRequest
functionality. Note how thegetArrayBuffer
helper function simply returns anArrayBuffer
response as-is. - In
PDFNodeStream
we're currently copying the PDF data, however this is unfortunately necessary since Node.js returns data as aBuffer
object[2].
Given that the PDFNetworkStream
has been, indirectly, supporting transferring of PDF data for years it would seem really strange if this didn't also apply to the PDFFetchStream
-implementation.
Hence this patch simply enables transferring of PDF data, when accessed using the Fetch API, unconditionally to help reduced main-thread memory usage since the PDFFetchStream
-implementation is used by default in browsers (for the GENERIC build).
[1] As opposed to PDF data being provided as e.g. a TypedArray when calling getDocument
in the API.
[2] This is a "special" Node.js object, see https://nodejs.org/api/buffer.html#buffer, which doesn't exist in browsers.
Files Modified:
- src/display/api.js
- src/display/fetch_stream.js
- src/display/network.js
Reporter | ||
Comment 1•2 years ago
|
||
CjIk0ohrS0mOQtJjwYfn5A |
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=6853129edf3dc9945afa6597077804eb0ec7d5da
Reporter | ||
Comment 2•2 years ago
|
||
Reporter | ||
Comment 3•2 years ago
|
||
GFc3RZBMROGkVv1aBx-fAQ |
The try push is done, we found jobs with unclassified failures.
Known Issues (From Push Health):
dom/canvas/test/crossorigin/test_video_crossorigin.html | application terminated with exit code 1
- 1 of 4 failed on the same (retriggered) task
- test-windows10-32-2004-qr/debug-mochitest-plain-gpu (a_78BTJOR1qbdhh7KfjxIQ)
Force-terminating active process(es).
- 1 of 4 failed on the same (retriggered) task
- test-windows10-32-2004-qr/debug-mochitest-plain-gpu (a_78BTJOR1qbdhh7KfjxIQ)
Needs Investigation (From Push Health):
No tests were found for flavor 'plain' and the following manifest filters:
skip_if, run_if, fail_if, subsuite(name=None), tags(['condprof']), pathprefix(['toolkit/components/pdfjs/test'])
Make sure the test paths (if any) are spelt correctly and the corresponding
--flavor and --subsuite are being used. See mach mochitest --help
for a
list of valid flavors.
- 2 of 2 failed on different tasks
- test-linux1804-64-qr/opt-mochitest-plain-condprof-1 (aafLGXFmRamcUxvmdROhyQ)
- test-windows10-64-2004-qr/opt-mochitest-plain-condprof-1 (VRI0yDIWQ9WI6UFeUpu_bA)
dom/canvas/test/crossorigin/test_video_crossorigin.html
- 1 of 4 failed on the same (retriggered) task
- test-windows10-32-2004-qr/debug-mochitest-plain-gpu (a_78BTJOR1qbdhh7KfjxIQ)
minidumpwriter exited with status: 1
- 1 of 4 failed on the same (retriggered) task
- test-windows10-32-2004-qr/debug-mochitest-plain-gpu (a_78BTJOR1qbdhh7KfjxIQ)
Needs Investigation (Other Failed Jobs):
test-linux1804-64-qr/debug-mochitest-devtools-chrome-swr-1
- 4 of 4 failed on the same (retriggered) task (df2Rmy-QRGCIcd0UNdujWw, Q7NSd8-tQnWt7-TwMoO2Aw, EeoegRWrRgimxNP2IzkeGA, XLwl5IeDT2K_KmyASE7dEA)
test-linux1804-64-qr/debug-mochitest-devtools-chrome-1
- 4 of 4 failed on the same (retriggered) task (YMgOWU53SRC-2udbPuLtXg, EVtDLJ0jTIa5kF83eDKTZQ, WEUYo4XBTKOJyg6TO5D4Ng, LxhhlTu-S2qzwpqVeqn5qA)
test-windows10-64-2004-qr/debug-mochitest-devtools-chrome-1
- 4 of 4 failed on the same (retriggered) task (BLYoUYJlQeKXYHbmB0JdFA, TvsUoX2WR-mnqkXdb1qaTw, JcLJrk5bR4KBuQlv_d1w6w, T8Qc4rO_QsG9S5jQ-9LaUw)
test-macosx1015-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
- 4 of 4 failed on the same (retriggered) task (BTUc_kyGSZ6V8mBXlELgMg, fokRfLXvSgC2p_i-qXV3kA, NzZLlo_XRpimlpGbUY2pxQ, K7zNC1E9RqWS7LRYEye-Lg)
test-windows10-64-2004-qr/debug-mochitest-devtools-chrome-spi-nw-1
- 4 of 4 failed on the same (retriggered) task (YUKDqr9fTpGYni_nuS6Lkg, a63JZ2J0RvCa4sTXzC9lfQ, ZhaHYJGiQ3CauOADMzY6HQ, ZA9NHqBsQiWwUDzvtCXzbA)
test-macosx1015-64-qr/debug-mochitest-devtools-chrome-1
- 4 of 4 failed on the same (retriggered) task (C72Tn-ucRvmCF1yLkqStSw, V6-XgnabQxCb9NaPWYGCFQ, Jjf7WDEGRbKaguIV8t2tzA, P3InqYR2QXCiaLQ_KlTwnA)
test-linux1804-64-qr/debug-mochitest-devtools-chrome-spi-nw-1
- 4 of 4 failed on the same (retriggered) task (AuOgRMgMReCJNHuhbB4hbw, GzhVXhQCRcWuWUDjVu1b-Q, ZtqKMkGVSY-YChoFBQ1wWQ, MzlvX5dbQoyQ6t5huOm4CA)
These failures could mean that the library update changed something and caused
tests to fail. You'll need to review them yourself and decide where to go from here.
In either event, I have done all I can and you will need to take it from here. If you
don't want to land my patch, you can replicate it locally for editing with
./mach vendor toolkit/components/pdfjs/moz.yaml
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
Reporter | ||
Updated•2 years ago
|
Reporter | ||
Comment 4•2 years ago
|
||
SRzKDqFRRK6i3HZF-jSgpg |
This bug is being closed because a newer revision of the library is available.
This bug will be marked as a duplicate of it (because although this bug is older, it is superseded by the newer one).
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Description
•