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

Use a Map, rather than an Object, internally in the Catalog.openAction getter (PR 11644 follow-up) #12543

Merged
merged 2 commits into from
Oct 28, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Oct 28, 2020

This provides a work-around to avoid having to conditionally try to initialize the openAction-object in multiple places; this indirectly fixes #11644 (comment).
Given that Object.fromEntries doesn't seem to guarantee that a null prototype is used, we thus hack around that by using Object.assign with Object.create(null).

…Action` getter (PR 11644 follow-up)

This provides a work-around to avoid having to conditionally try to initialize the `openAction`-object in multiple places.
Given that `Object.fromEntries` doesn't seem to *guarantee* that a `null` prototype is used, we thus hack around that by using `Object.assign` with `Object.create(null)`.
…ototype is used

Given that `Object.fromEntries` doesn't seem to *guarantee* that a `null` prototype is used, we thus hack around that by using `Object.assign` with `Object.create(null)`.
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/9ab37fc453b6606/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/9ab37fc453b6606/output.txt

Total script time: 3.46 mins

  • Unit Tests: Passed

@timvandermeij timvandermeij merged commit 7853d97 into mozilla:master Oct 28, 2020
@timvandermeij
Copy link
Contributor

Looks good!

@Snuffleupagus Snuffleupagus deleted the openActionMap branch October 29, 2020 08:52
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