Skip to content

Remove the isEOF helper function and slightly re-factor EOF #13859

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

Merged
merged 1 commit into from
Aug 3, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

Given how trivial the isEOF function is, we can simply inline the check at the various call-sites and remove the function (which ought to be ever so slightly more efficient as well).
Furthermore, this patch also changes the EOF primitive itself to a Symbol instead of an Object since that has the nice benefit of making it unclonable (thus preventing accidentally trying to send EOF from the worker-thread).

Given how trivial the `isEOF` function is, we can simply inline the check at the various call-sites and remove the function (which ought to be ever so slightly more efficient as well).
Furthermore, this patch also changes the `EOF` primitive itself to a `Symbol` instead of an Object since that has the nice benefit of making it unclonable (thus preventing *accidentally* trying to send `EOF` from the worker-thread).
@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Aug 3, 2021

From: Bot.io (Windows)


Received

Command cmd_test from @timvandermeij received. Current queue size: 1

Live output at: http://3.101.106.178:8877/9955ba7aacb797b/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 3, 2021

From: Bot.io (Linux m4)


Received

Command cmd_test from @timvandermeij received. Current queue size: 0

Live output at: http://54.67.70.0:8877/38174676a8e4936/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 3, 2021

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/38174676a8e4936/output.txt

Total script time: 33.35 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: Passed
  • Regression tests: FAILED
  different ref/snapshot: 3
  different first/second rendering: 1

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

@pdfjsbot
Copy link

pdfjsbot commented Aug 3, 2021

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/9955ba7aacb797b/output.txt

Total script time: 40.10 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 11
  different first/second rendering: 1

Image differences available at: http://3.101.106.178:8877/9955ba7aacb797b/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit 892af51 into mozilla:master Aug 3, 2021
@timvandermeij
Copy link
Contributor

Thank you for refactoring this!

@Snuffleupagus Snuffleupagus deleted the refactor-EOF branch August 3, 2021 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