Support destinations in NameTrees with encoded keys (issue 14847)#14848
Merged
Snuffleupagus merged 1 commit intomozilla:masterfrom Apr 27, 2022
Merged
Support destinations in NameTrees with encoded keys (issue 14847)#14848Snuffleupagus merged 1 commit intomozilla:masterfrom
Snuffleupagus merged 1 commit intomozilla:masterfrom
Conversation
Initially I considered updating the `NameOrNumberTree`-implementation to handle encoded keys, however that quickly became somewhat messy (especially in the `NameOrNumberTree.get`-method) since only NameTrees using string-keys. Hence the easiest solution, as far as I'm concerned, was thus to just update the `Catalog.destinations`-getter instead. Please note that in the referenced PDF document the `Catalog.destination`-method will thus fallback to fetch all destinations, which should be fine since this is the very first case of encoded keys that we've seen. Also changes the `NameOrNumberTree.getAll`-method to prevent a possible run-time error, although we've so far not seen such a case, for any non-Array Kids-entries found in a NameTree/NumberTree. Finally, to improve overall consistency and to hopefully prevent future bugs, the patch also updates a couple of other `NameTree` call-sites to correctly handle encoded keys. (Note that the `Catalog.attachments`-getter was already doing this.)
19e0907 to
71370d0
Compare
Collaborator
Author
|
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.241.84.105:8877/5f3fdfd2c4b79bf/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.193.163.58:8877/26a62102389ec84/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.241.84.105:8877/5f3fdfd2c4b79bf/output.txt Total script time: 24.87 mins
Image differences available at: http://54.241.84.105:8877/5f3fdfd2c4b79bf/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)SuccessFull output at http://54.193.163.58:8877/26a62102389ec84/output.txt Total script time: 26.42 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.
Initially I considered updating the
NameOrNumberTree-implementation to handle encoded keys, however that quickly became somewhat messy (especially in theNameOrNumberTree.get-method) since only NameTrees using string-keys.Hence the easiest solution, as far as I'm concerned, was thus to just update the
Catalog.destinations-getter instead. Please note that in the referenced PDF document theCatalog.destination-method will thus fallback to fetch all destinations, which should be fine since this is the very first case of encoded keys that we've seen.Also changes the
NameOrNumberTree.getAll-method to prevent a possible run-time error, although we've so far not seen such a case, for any non-Array Kids-entries found in a NameTree/NumberTree.Finally, to improve overall consistency and to hopefully prevent future bugs, the patch also updates a couple of other
NameTreecall-sites to correctly handle encoded keys. (Note that theCatalog.attachments-getter was already doing this.)