Send 'Terminate' to the worker when destroy races the load-time handshake (bug 1942304)#21175
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21175 +/- ##
==========================================
- Coverage 63.76% 63.76% -0.01%
==========================================
Files 213 213
Lines 134580 134605 +25
==========================================
+ Hits 85812 85827 +15
- Misses 48768 48778 +10
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…hake (bug 1942304) If `PDFDocumentLoadingTask.destroy` ran while `workerIdPromise` was pending, the inner `.then` in `getDocument` threw "Loading aborted" before `WorkerTransport` was constructed, so `_transport` was never set and the "Terminate" message was never posted.
Snuffleupagus
left a comment
There was a problem hiding this comment.
I believe that this should be safe, and in "normal" (i.e. non-test) usage destruction won't happen in the middle of loading anyway.
r=me, assuming that you've checked that this actually fixes the referenced bug; thanks.
|
/botio browsertest |
From: Bot.io (Windows)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/af56c44b7fe5ff6/output.txt |
From: Bot.io (Linux m4)ReceivedCommand cmd_browsertest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/d3fb7c743aead17/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/d3fb7c743aead17/output.txt Total script time: 18.24 mins
Image differences available at: http://54.241.84.105:8877/d3fb7c743aead17/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/af56c44b7fe5ff6/output.txt Total script time: 24.23 mins
Image differences available at: http://54.193.163.58:8877/af56c44b7fe5ff6/reftest-analyzer.html#web=eq.log |
If
PDFDocumentLoadingTask.destroyran whileworkerIdPromisewas pending, the inner.theningetDocumentthrew "Loading aborted" beforeWorkerTransportwas constructed, so_transportwas never set and the "Terminate" message was never posted.