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 the PDFFunctionFactory._localFunctionCache initialization (PR 12034 follow-up); Fix the gStateObj lookup in TranslatedFont._removeType3ColorOperators (PR 12718 follow-up) #12885

Merged
merged 2 commits into from
Jan 22, 2021

Conversation

Snuffleupagus
Copy link
Collaborator

These two commits are not directly related, but given their small size I figured that one PR won't hurt since that reduces bot usage slightly.

  • Simplify the PDFFunctionFactory._localFunctionCache initialization (PR 12034 follow-up)

    By changing this a shadowed getter, we can simply access it directly and not worry about it being initialized. I have no idea why I didn't just implement it this way in the first place.

  • Fix the gStateObj lookup in TranslatedFont._removeType3ColorOperators (PR 12718 follow-up)

    As can be seen in

    operatorList.addOp(OPS.setGState, [gStateObj]);
    the gStateObj (which is actually an Array despite its name), is wrapped in Array when it's inserted into the OperatorList. Hence we obviously need to take this into account when accessing it in TranslatedFont._removeType3ColorOperators; this mistake happened because we don't have any test-cases for this particular code-path as far as I know.

…(PR 12034 follow-up)

By changing this a `shadow`ed getter, we can simply access it directly and not worry about it being initialized. I have no idea why I didn't just implement it this way in the first place.
…ors` (PR 12718 follow-up)

As can be seen in https://github.com/mozilla/pdf.js/blob/2cba29036180b420778bd2c91d21d71bd207c146/src/core/evaluator.js#L986 the `gStateObj` (which is actually an Array despite its name), is wrapped in Array when it's inserted into the OperatorList. Hence we obviously need to take this into account when accessing it in `TranslatedFont._removeType3ColorOperators`; this mistake happened because we don't have any test-cases for this particular code-path as far as I know.
@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/0086e1685edaf38/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://3.101.106.178:8877/1d3d4698081d193/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/0086e1685edaf38/output.txt

Total script time: 26.82 mins

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://3.101.106.178:8877/1d3d4698081d193/output.txt

Total script time: 28.14 mins

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

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

@timvandermeij timvandermeij merged commit 6ffb6b1 into mozilla:master Jan 22, 2021
@timvandermeij
Copy link
Contributor

Looks good!

/botio makeref (since it looks like some browsers got updated)

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/a10a2a620aa05b7/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_makeref from @timvandermeij received. Current queue size: 2

Live output at: http://3.101.106.178:8877/291699cbda597e5/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

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

Total script time: 24.81 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://3.101.106.178:8877/291699cbda597e5/output.txt

Total script time: 25.78 mins

  • Lint: Passed
  • Make references: Passed
  • Check references: Passed

@Snuffleupagus Snuffleupagus deleted the worker-tweak-caching branch January 22, 2021 20:42
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