trop[bot]
35aea3afcc
fix: reset printToPDF queue after a rejection ( #51221 )
...
fix: reset printToPDF queue after a rejection
The module-scoped `pendingPromise` in `webContents.printToPDF` was chained
with `.then(onFulfilled)` and never cleared. Once a call rejected (e.g.
an out-of-range `pageRanges` like `"999"`), subsequent calls chained onto
the rejected promise and short-circuited without ever invoking
`_printToPDF` — so every following call re-surfaced the original error.
Replace the shared variable with a per-`WebContents` `WeakMap` queue that
swallows prior rejections before chaining and clears its entry once the
tail drains.
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com >
2026-04-22 12:32:47 +02:00
..
2026-04-21 16:42:34 -05:00
2026-03-05 10:12:33 -06:00
2025-08-29 12:31:47 +09:00
2025-07-08 15:20:56 +02:00
2024-09-27 10:17:06 +09:00
2025-11-24 12:30:57 -05:00
2026-04-21 16:42:34 -05:00
2026-03-05 10:12:33 -06:00
2026-04-15 11:00:07 +02:00
2026-02-02 14:21:40 +01:00
2025-08-28 10:31:41 +02:00
2026-04-20 15:25:00 -07:00
2024-10-02 19:10:44 -07:00
2026-04-13 17:09:46 -04:00
2026-04-17 16:49:56 -05:00
2025-07-16 08:39:17 -07:00
2026-04-10 10:18:48 +02:00
2024-11-20 08:55:09 -06:00
2026-04-15 11:36:07 +02:00
2026-03-27 08:20:36 -04:00
2025-05-06 14:09:35 -04:00
2025-05-29 10:24:16 -07:00
2024-10-02 19:10:44 -07:00
2024-11-18 14:44:30 -08:00
2024-11-18 14:44:30 -08:00
2025-10-30 19:16:48 +01:00
2025-02-21 10:17:52 -06:00
2026-02-05 10:58:19 -05:00
2026-02-26 16:55:19 -05:00
2025-11-04 11:15:34 +01:00
2026-03-25 15:53:31 -04:00
2026-04-11 19:07:02 -07:00
2024-10-02 19:10:44 -07:00
2026-02-17 16:19:16 -05:00
2026-04-11 19:07:02 -07:00
2025-11-24 12:30:57 -05:00
2024-10-02 19:10:44 -07:00
2025-11-24 12:30:57 -05:00
2024-10-02 19:10:44 -07:00
2025-03-09 17:37:14 -05:00
2026-04-02 20:09:56 -07:00
2024-10-02 19:10:44 -07:00
2024-10-02 19:10:44 -07:00
2025-03-14 21:00:13 -04:00
2025-01-31 09:32:45 -05:00
2026-04-05 00:32:03 +00:00
2025-11-24 12:30:57 -05:00
2026-01-26 11:57:56 +01:00
2025-07-14 13:42:37 -07:00
2025-10-21 14:26:30 -04:00
2024-10-02 19:10:44 -07:00
2025-08-07 19:25:50 +02:00
2026-03-19 18:48:27 -07:00
2025-11-14 14:46:21 +01:00
2026-04-22 12:32:47 +02:00
2026-04-06 16:01:41 -04:00
2025-10-28 11:17:29 -04:00
2025-07-14 13:42:37 -07:00
2025-12-19 23:08:40 +13:00
2024-10-02 19:10:44 -07:00
2024-10-02 19:10:44 -07:00
2026-04-10 12:15:26 +02:00
2026-04-11 19:05:11 -07:00
2026-04-20 12:01:52 +02:00
2026-04-10 10:40:40 -05:00
2025-03-25 19:33:10 +09:00
2024-10-02 19:10:44 -07:00
2024-04-30 21:13:38 -04:00
2025-10-08 10:44:09 +02:00
2026-04-11 07:35:25 -05:00
2024-10-02 19:10:44 -07:00
2024-06-21 10:31:10 -04:00
2026-04-11 19:04:40 -07:00
2026-02-19 16:10:03 -05:00
2025-05-02 16:27:29 -05:00
2026-02-18 14:01:18 +01:00
2025-08-09 09:47:47 +02:00
2026-02-25 12:56:35 -05:00
2026-03-27 08:20:36 -04:00
2026-04-11 19:04:40 -07:00
2022-08-16 15:23:13 -04:00
2024-10-02 19:10:44 -07:00
2025-12-12 13:43:12 -05:00
2024-10-18 16:07:06 -04:00
2025-11-24 12:30:57 -05:00
2023-01-18 14:46:27 +01:00
2025-12-12 13:43:12 -05:00
2024-12-12 11:51:24 -05:00
2025-09-24 13:35:14 -07:00