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

Simplify, and inline, the finalize function in the MessageHandler class #10970

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

The finalize helper function has only a single call-site, and furthermore it's just a one-liner too. Furthermore it's only ever called with a Promise as its argument, meaning that it's unnecessarily convoluted as well (i.e. the Promise.resolve() part shouldn't be necessary).
Hence this code can be both simplified and inlined at its only call-site instead.

… class

The `finalize` helper function has only a *single* call-site, and furthermore it's just a one-liner too. Furthermore it's only ever called with a `Promise` as its argument, meaning that it's unnecessarily convoluted as well (i.e. the `Promise.resolve()` part shouldn't be necessary).
Hence this code can be both simplified *and* inlined at its only call-site instead.
@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/cd26c675bfb5f82/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/e9dd0b2775ef916/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/cd26c675bfb5f82/output.txt

Total script time: 17.49 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/e9dd0b2775ef916/output.txt

Total script time: 25.83 mins

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

@timvandermeij timvandermeij merged commit 766d076 into mozilla:master Jul 14, 2019
@timvandermeij
Copy link
Contributor

Nice clean-up!

@Snuffleupagus Snuffleupagus deleted the MessageHandler-simplify-finalize branch July 14, 2019 15:07
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