Update PDF.js to new version 2b5c986f0cfc7668fa55ddfca0a94f54958867ff from 2026-11-12 12:32:54 UTC
Categories
(Firefox :: PDF Viewer, enhancement)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox162 | --- | affected |
People
(Reporter: update-bot, Assigned: calixte)
References
(Blocks 1 open bug)
Details
(Whiteboard: [3pl-filed][task_id: CVIEw35gQ12Dtl42KVqvWg])
Attachments
(1 obsolete file)
This update covers 3 commits. Here are the overall diff statistics, and then the commit information.
toolkit/components/pdfjs/content/PdfJsVersion.sys.mjs | 2 +-
toolkit/components/pdfjs/content/build/pdf.mjs | 100 +++++++------
toolkit/components/pdfjs/content/build/pdf.renderer.mjs | 37 ++--
toolkit/components/pdfjs/content/build/pdf.scripting.mjs | 4 +-
toolkit/components/pdfjs/content/build/pdf.worker.mjs | 78 +++++-----
toolkit/components/pdfjs/content/web/viewer-geckoview.mjs | 68 +++++----
toolkit/components/pdfjs/content/web/viewer.mjs | 80 ++++++-----
toolkit/components/pdfjs/moz.yaml | 4 +-
8 files changed, 199 insertions(+), 174 deletions(-)
30c5523f3cad591ed7717d468442c07171523673 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/30c5523f3cad591ed7717d468442c07171523673
Authored: 2026-11-12 11:44:47 +0100
Committed: 2026-11-12 12:33:59 +0100
Add a no-op helper function for catch handlers that ignore errors
Currently there's a fair number of catch handlers that just suppress "uncaught exceptions", and rather than creating potentially a lot of inline functions we can re-use just a single helper instead.
Note that such a function already existed, in the src/shared/message_handler.js file, hence that one is simply moved and re-named.
Files Modified:
- src/core/decode_stream.js
- src/core/document.js
- src/core/editor/pdf_images.js
- src/core/parser.js
- src/core/worker.js
- src/core/worker_stream.js
- src/core/writer.js
- src/display/annotation_layer.js
- src/display/api.js
- src/display/editor/drawers/signaturedraw.js
- src/display/fetch_stream.js
- src/display/node_stream.js
- src/display/text_layer.js
- src/pdf.js
- src/shared/message_handler.js
- src/shared/util.js
- test/unit/pdf_spec.js
- web/app.js
- web/pdf_print_service.js
- web/pdf_scripting_manager.js
- web/pdf_viewer.js
- web/pdfjs.js
8ecaef3b3e7b2594877cf97d4aab6f685f522195 by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/8ecaef3b3e7b2594877cf97d4aab6f685f522195
Authored: 2026-11-11 17:12:49 +0100
Committed: 2026-11-11 22:39:31 +0100
Add a helper to avoid "uncaught exceptions" from Promise.withResolvers()
The new createPromiseCapability helper is a simple wrapper around the Promise.withResolvers() function, to help avoid any "uncaught exception: Object"-messages in the console for unhandled promises.
This should hopefully remove the need for manual fixes all over the code-base, since we've seen a fair number of (suspected AI) reports about unhandled promises recently.
Files Modified:
- src/core/chunked_stream.js
- src/core/document.js
- src/core/evaluator.js
- src/core/wasm_image.js
- src/core/worker.js
- src/display/api.js
- src/display/editor/tools.js
- src/display/fetch_stream.js
- src/display/font_loader.js
- src/display/network.js
- src/display/node_stream.js
- src/display/pdf_objects.js
- src/display/renderer_worker.js
- src/display/renderer_worker_proxy.js
- src/display/text_layer.js
- src/display/transport_stream.js
- src/pdf.js
- src/shared/base_pdf_stream.js
- src/shared/message_handler.js
- src/shared/util.js
- test/unit/pdf_spec.js
- web/app.js
- web/event_utils.js
- web/firefoxcom.js
- web/genericcom.js
- web/password_prompt.js
- web/pdf_attachment_viewer.js
- web/pdf_document_properties.js
- web/pdf_find_controller.js
- web/pdf_outline_viewer.js
- web/pdf_print_service.js
- web/pdf_scripting_manager.js
- web/pdf_text_extractor.js
- web/pdf_thumbnail_view.js
- web/pdf_viewer.js
- web/pdfjs.js
- web/struct_tree_layer_builder.js
ce93690a0f3bafe26b272e2c80e4a2e69da68a8c by Jonas Jenwald <jonas.jenwald@gmail.com>
https://github.com/mozilla/pdf.js/commit/ce93690a0f3bafe26b272e2c80e4a2e69da68a8c
Authored: 2026-11-11 09:32:03 +0100
Committed: 2026-11-11 09:37:18 +0100
Prevent "uncaught exceptions" from the BasePDFStreamReader class (issue 22503)
This could (apparently) occur if the loading fails before the headersReady getter has been accessed; somewhat similar to issue 22171.
Note: This seems potentially annoying to test, given the timing involved, and considering that the issue lacks a runnable test-case and that it looks like it's written by AI that doesn't really make me want to spend a lot of time on this.
Files Modified:
- src/shared/base_pdf_stream.js
| Reporter | ||
Comment 1•17 days ago
|
||
| CVIEw35gQ12Dtl42KVqvWg | ||
I've submitted a try run for this commit: https://treeherder.mozilla.org/jobs?repo=try&revision=d7dba21672f80ae0430b71e1d55aed36c7f74955
| Reporter | ||
Comment 2•17 days ago
|
||
| Reporter | ||
Comment 3•17 days ago
|
||
| DUCefJLnTFuK5vl5OtafzQ | ||
All the jobs in the try run succeeded. Like literally all of them, there weren't
even any intermittents. That is pretty surprising to me, so maybe you should double
check to make sure I didn't misinterpret things and that the correct tests ran...
Anyway, I've done all I can, so I'm passing to you to review and land the patch.
When reviewing, please note that this is external code, which needs a full and
careful inspection - not a rubberstamp.
| Reporter | ||
Comment 4•17 days ago
|
||
| DUCefJLnTFuK5vl5OtafzQ | ||
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•17 days ago
|
Description
•