Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] Convert Catalog.builtInCMapCache into a Map, instead of an Object, to ensure that it's correctly reset (PR 8064 follow-up) #9935

Conversation

Snuffleupagus
Copy link
Collaborator

Fixes a regression from PR #8064 (split off from PR #9931 since it probably deserves more visibility).

With the builtInCMapCache being a simple Object, it unfortunately means that the Catalog.cleanup method isn't resetting it as intended.
By just replacing the builtInCMapCache with an empty Object, existing references to it will not actually be updated. The result is that e.g. Page instances still keeps references to, what should have been removed, CMap data.

To fix these problems, the builtInCMapCache is converted into a Map instead (since it can be easily reset).

… of an Object, to ensure that it's correctly reset (PR 8064 follow-up)

With the `builtInCMapCache` being a simple Object, it unfortunately means that the `Catalog.cleanup` method isn't resetting it as intended.
By just replacing the `builtInCMapCache` with an empty Object, existing references to it will not actually be updated. The result is that e.g. `Page` instances still keeps references to, what should have been removed, CMap data.

To fix these problems, the `builtInCMapCache` is converted into a `Map` instead (since it can be easily reset).
@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.67.70.0:8877/5f2cbf3ef022ac6/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_test from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.215.176.217:8877/616511a91229f8b/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/5f2cbf3ef022ac6/output.txt

Total script time: 19.94 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/616511a91229f8b/output.txt

Total script time: 26.97 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Regression tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_preview from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/5d414b3ea7e9cbe/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/5d414b3ea7e9cbe/output.txt

Total script time: 3.01 mins

Published

@timvandermeij timvandermeij merged commit 39846a6 into mozilla:master Jul 29, 2018
@timvandermeij
Copy link
Contributor

Good find; thanks!

@Snuffleupagus
Copy link
Collaborator Author

@timvandermeij Thank you for landing this; and of course the other PRs yesterday :-)

@Snuffleupagus Snuffleupagus deleted the builtInCMapCache-cleanup-regression branch July 30, 2018 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants