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

Slightly simplify the PDFFindController._extractText method, and convert all "private" methods into proper ones #14689

Merged
merged 2 commits into from
Mar 19, 2022

Conversation

Snuffleupagus
Copy link
Collaborator

  • Slightly simplify the PDFFindController._extractText method

    Currently we're resolving the Promises in the _extractTextPromises Array with the page-index, despite that not really being necessary since the Promises in the Array are explicitly inserted in the correct order.
    Furthermore, we can replace the standard for-loop with a for...of-loop which results in ever so slightly more compact code.

  • Convert all "private" methods in PDFFindController into proper ones

    Given that none of these methods are/were ever intended to be called manually, we can now enforce this with modern class-features.

Currently we're resolving the Promises in the `_extractTextPromises` Array with the page-index, despite that not really being necessary since the Promises in the Array are explicitly inserted in the correct order.
Furthermore, we can replace the standard `for`-loop with a `for...of`-loop which results in ever so slightly more compact code.
Given that none of these methods are/were ever intended to be called manually, we can now enforce this with modern class-features.
@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.241.84.105:8877/afdb424229e43b0/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/d2f6f1d4f1d218c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/afdb424229e43b0/output.txt

Total script time: 3.04 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/d2f6f1d4f1d218c/output.txt

Total script time: 6.12 mins

  • Unit Tests: FAILED

@Snuffleupagus
Copy link
Collaborator Author

/botio integrationtest

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.193.163.58:8877/4d51498f9569d5f/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/71f12f48d5010dd/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/71f12f48d5010dd/output.txt

Total script time: 3.97 mins

  • Integration Tests: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/4d51498f9569d5f/output.txt

Total script time: 6.42 mins

  • Integration Tests: Passed

@timvandermeij timvandermeij merged commit 6f2bae6 into mozilla:master Mar 19, 2022
@timvandermeij
Copy link
Contributor

Looks good to me!

@Snuffleupagus Snuffleupagus deleted the PDFFindController-private branch March 19, 2022 13:08
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.

None yet

3 participants