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

Fix another seac regression (issue 4801) #4995

Merged
merged 1 commit into from
Jul 22, 2014
Merged

Fix another seac regression (issue 4801) #4995

merged 1 commit into from
Jul 22, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

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.)

@yurydelendik yurydelendik self-assigned this Jul 21, 2014
@@ -4096,11 +4096,18 @@ var Font = (function FontClosure() {
var numGlyphs = font.numGlyphs;

function getCharCode(charCodeToGlyphId, glyphId, addMap) {
var charCodes = [];
Copy link
Contributor

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@yurydelendik
Copy link
Contributor

Hack looks good with comment above addressed

};
for (var i = 0, ii = charCodes.length; i < ii; i++) {
var charCode = charCodes[i];
if (charCode === null) {
Copy link
Contributor

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

@yurydelendik
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/8267c190cc23fda/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/af0cacc486db3ba/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/8267c190cc23fda/output.txt

Total script time: 21.50 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/af0cacc486db3ba/output.txt

Total script time: 23.35 mins

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

@yurydelendik
Copy link
Contributor

/botio makeref

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/7650868eaccfa52/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/3579f8f03dea37b/output.txt

yurydelendik added a commit that referenced this pull request Jul 22, 2014
Fix another seac regression (issue 4801)
@yurydelendik yurydelendik merged commit 1694cd8 into mozilla:master Jul 22, 2014
@yurydelendik
Copy link
Contributor

Thank you

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/7650868eaccfa52/output.txt

Total script time: 23.06 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/3579f8f03dea37b/output.txt

Total script time: 23.28 mins

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

@Snuffleupagus Snuffleupagus deleted the issue-4801 branch July 22, 2014 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants