-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Fix another seac regression (issue 4801) #4995
Conversation
@@ -4096,11 +4096,18 @@ var Font = (function FontClosure() { | |||
var numGlyphs = font.numGlyphs; | |||
|
|||
function getCharCode(charCodeToGlyphId, glyphId, addMap) { | |||
var charCodes = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split this function into getCharCodes
and createCharCode
to avoid the addMap parameter and related branching. Also, don't create charCodes until needed, e.g. you can initialize it with null and create when the first code is found.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Hack looks good with comment above addressed |
}; | ||
for (var i = 0, ii = charCodes.length; i < ii; i++) { | ||
var charCode = charCodes[i]; | ||
if (charCode === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that will never happen
/botio test |
From: Bot.io (Windows)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/8267c190cc23fda/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_test from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/af0cacc486db3ba/output.txt |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/8267c190cc23fda/output.txt Total script time: 21.50 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/af0cacc486db3ba/output.txt Total script time: 23.35 mins
|
/botio makeref |
From: Bot.io (Windows)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 0 Live output at: http://107.22.172.223:8877/7650868eaccfa52/output.txt |
From: Bot.io (Linux)ReceivedCommand cmd_makeref from @yurydelendik received. Current queue size: 0 Live output at: http://107.21.233.14:8877/3579f8f03dea37b/output.txt |
Fix another seac regression (issue 4801)
Thank you |
From: Bot.io (Windows)SuccessFull output at http://107.22.172.223:8877/7650868eaccfa52/output.txt Total script time: 23.06 mins
|
From: Bot.io (Linux)SuccessFull output at http://107.21.233.14:8877/3579f8f03dea37b/output.txt Total script time: 23.28 mins
|
This is a _very_ tentative attempt at fixing #4801. (It's by far the ugliest hack that I've ever submitted for review :-)
The proper way to handle these kind of issues is probably a much more invasive re-factoring/re-write of the entire seac analysis, but that's unfortunately beyond my ability.
Given that the issue that this PR fixes is a regression, I think that it makes a certain amount of sense to accept an (ugly) workaround for now. (If the issue wasn't a regression, I wouldn't even have bothered with this patch.)