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

Fix the inconsistent return types for Dict.{get, getAsync} #11171

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

Having these methods fallback to returning null in only one particular case seems outright wrong, since a "falsy" value will thus be handled incorrectly.
The only reason that this hasn't caused issues in practice is that there's only one call-site passing in three keys, and in that case we're trying to read a font file where falling back to null isn't a problem.

Having these methods fallback to returning `null` in only *one* particular case seems outright wrong, since a "falsy" value will thus be handled incorrectly.
The only reason that this hasn't caused issues in practice is that there's only one call-site passing in three keys, and in that case we're trying to read a font file where falling back to `null` isn't a problem.
@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/0def48869e790bb/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/05a0e25e37af430/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/0def48869e790bb/output.txt

Total script time: 17.71 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/05a0e25e37af430/output.txt

Total script time: 26.07 mins

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

Image differences available at: http://54.215.176.217:8877/05a0e25e37af430/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 44f4cd5 into mozilla:master Sep 23, 2019
@timvandermeij
Copy link
Contributor

timvandermeij commented Sep 23, 2019

The new situation looks much better. For reference, the only call-site is:

var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3');

Thanks!

@Snuffleupagus Snuffleupagus deleted the Dict-get-consistent-return-type branch September 23, 2019 21:21
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