-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Conversation
…(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.
/botio test |
From: Bot.io (Linux m4)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://54.67.70.0:8877/0086e1685edaf38/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_test from @Snuffleupagus received. Current queue size: 0 Live output at: http://3.101.106.178:8877/1d3d4698081d193/output.txt |
From: Bot.io (Linux m4)FailedFull output at http://54.67.70.0:8877/0086e1685edaf38/output.txt Total script time: 26.82 mins
Image differences available at: http://54.67.70.0:8877/0086e1685edaf38/reftest-analyzer.html#web=eq.log |
From: Bot.io (Windows)FailedFull output at http://3.101.106.178:8877/1d3d4698081d193/output.txt Total script time: 28.14 mins
Image differences available at: http://3.101.106.178:8877/1d3d4698081d193/reftest-analyzer.html#web=eq.log |
Looks good! /botio makeref (since it looks like some browsers got updated) |
From: Bot.io (Linux m4)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/a10a2a620aa05b7/output.txt |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @timvandermeij received. Current queue size: 2 Live output at: http://3.101.106.178:8877/291699cbda597e5/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/a10a2a620aa05b7/output.txt Total script time: 24.81 mins
|
From: Bot.io (Windows)SuccessFull output at http://3.101.106.178:8877/291699cbda597e5/output.txt Total script time: 25.78 mins
|
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
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.Fix the
gStateObj
lookup inTranslatedFont._removeType3ColorOperators
(PR 12718 follow-up)As can be seen in
pdf.js/src/core/evaluator.js
Line 986 in 2cba290
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 inTranslatedFont._removeType3ColorOperators
; this mistake happened because we don't have any test-cases for this particular code-path as far as I know.