Ensure that pending requests are resolved when calling PDFDataTransportStreamReader.prototype.progressiveDone#20634
Open
Snuffleupagus wants to merge 1 commit intomozilla:masterfrom
Conversation
09796ab to
6f2bb9e
Compare
…ortStreamReader.prototype.progressiveDone` Doing skip-cache reloading of https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#disableRange=true in the latest Firefox Nightly version I noticed an *intermittent* bug, where the loadingBar would fill up but without the PDF ever rendering. Initially I was quite worried that the changes in PR 20602 had somehow caused this, however after a bunch of testing in a slightly older Nightly I was able to reproduce the problem there as well.[1] Instead I believe that this problem goes all the back to PR 10675, so still my fault, since the `progressiveDone` handling there was incomplete. Note how we only set the `this._done` property, but don't actually resolve any still pending requests. For reference, compare with the handling in the `PDFDataTransportStreamRangeReader.prototype._enqueue` method. Depending on the exact order in which the `PDFDataTransportStreamReader.prototype.{_enqueue, read, progressiveDone}` methods are invoked, which depends on how/when the PDF data arrives, the bug might occur. The reason that this bug hasn't been caught before now is likely that `disableRange=true` isn't used by default and Firefox users are unlikely to manually set that in e.g. `about:config`. --- [1] Possibly some timings changed to make it slightly more common, but given the intermittent nature of this it's difficult to tell.
6f2bb9e to
2d643ef
Compare
Collaborator
From: Bot.io (Linux m4)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/f51a4fb7506b735/output.txt |
Collaborator
From: Bot.io (Windows)ReceivedCommand cmd_unittest from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/675c5e925d4f432/output.txt |
Collaborator
From: Bot.io (Linux m4)SuccessFull output at http://54.241.84.105:8877/f51a4fb7506b735/output.txt Total script time: 2.69 mins
|
Collaborator
From: Bot.io (Windows)FailedFull output at http://54.193.163.58:8877/675c5e925d4f432/output.txt Total script time: 8.67 mins
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Doing skip-cache reloading of https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf#disableRange=true in the latest Firefox Nightly version I noticed an intermittent bug, where the loadingBar would fill up but without the PDF ever rendering.
Initially I was quite worried that the changes in PR #20602 had somehow caused this, however after a bunch of testing in a slightly older Nightly I was able to reproduce the problem there as well.[1]
Instead I believe that this problem goes all the back to PR #10675, so still my fault, since the
progressiveDonehandling there was incomplete.Note how we only set the
this._doneproperty, but don't actually resolve any still pending requests. For reference, compare with the handling in thePDFDataTransportStreamRangeReader.prototype._enqueuemethod.Depending on the exact order in which the
PDFDataTransportStreamReader.prototype.{_enqueue, read, progressiveDone}methods are invoked, which depends on how/when the PDF data arrives, the bug might occur.The reason that this bug hasn't been caught before now is likely that
disableRange=trueisn't used by default and Firefox users are unlikely to manually set that in e.g.about:config.[1] Possibly some timings changed to make it slightly more common, but given the intermittent nature of this it's difficult to tell.