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

Move IsLittleEndianCached/IsEvalSupportedCached to src/shared/util.js, and rename the isSpace helper function to isWhiteSpace #11692

Merged
merged 2 commits into from
Mar 12, 2020

Conversation

Snuffleupagus
Copy link
Collaborator

This is the first part in a series of patches that will try to split PR #11566 into smaller chunks, to make reviewing more feasible.

This is part of the work necessary in order to eventually enable the ESLint no-shadow rule; see https://eslint.org/docs/rules/no-shadow

…d/util.js`

Rather than duplicating the lookup and caching in multiple files, it seems easier to simply move all of this functionality into `src/shared/util.js` instead.
This will also help avoid a bunch of ESLint errors once the `no-shadow` rule is eventually enabled.
Trying to enable the ESLint rule `no-shadow`, against the `master` branch, would result in a fair number of errors in the `Glyph` class in `src/core/fonts.js`.
Since the glyphs are exposed through the API, we can't very well change the `isSpace` property on `Glyph` instances. Thus the best approach seems, at least to me, to simply rename the `isSpace` helper function to `isWhiteSpace` which shouldn't cause any issues given that it's only used in the `src/core/` folder.
@Snuffleupagus Snuffleupagus changed the title /shared/utMove IsLittleEndianCached/IsEvalSupportedCached to srcil.js, and rename the isSpace helper function to isWhiteSpace Move IsLittleEndianCached/IsEvalSupportedCached to src/shared/util.js, and rename the isSpace helper function to isWhiteSpace Mar 12, 2020
@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/50a45099b00d08f/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/cc1d5574d7badfa/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/50a45099b00d08f/output.txt

Total script time: 19.71 mins

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

Image differences available at: http://54.67.70.0:8877/50a45099b00d08f/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.215.176.217:8877/cc1d5574d7badfa/output.txt

Total script time: 25.13 mins

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

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

@timvandermeij timvandermeij merged commit a23ce6b into mozilla:master Mar 12, 2020
@timvandermeij
Copy link
Contributor

Thank you! I have been a bit short on time lately, so splitting this up really helps.

@Snuffleupagus Snuffleupagus deleted the no-shadow-prepare branch March 12, 2020 22:51
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