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

Remove unnecessary xref parameters from various method signatures in PartialEvaluator, since this.xref is already available in the relevant scope #8196

Merged
merged 2 commits into from
Mar 26, 2017

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Mar 26, 2017

My intention was, at this time, to avoid adding even more stuff to the review queues. However, this PR ties into the point made in #8176 (review) about all of the parameter passing in evaluator.js, and seems to me to be fairly low-hanging fruit in that regard.

@timvandermeij I'm flagging you for review, since this is a (small) first step with regards to the issue you raised in #8176 (review). If you don't have time, just un-assign yourself :-)

… error(...); }` instances to `assert(someVariable);` instead

Rather than, in a number of places, basically duplicating the logic of `assert` we can simply utilize the function directly instead.
…n `PartialEvaluator`, since `this.xref` is already available in the relevant scope

For reasons I don't pretend to understand, we're passing around `xref` arguments to a bunch of methods despite `this.xref` being available in `PartialEvaluator`.

This patch is a small first small step towards cleaning up the, often unwieldy, signatures of methods in `PartialEvaluator`.
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/6d3698c2b747ebf/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/6d3698c2b747ebf/output.txt

Total script time: 2.14 mins

Published

@timvandermeij
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/6ba928d6dc63677/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/6ba928d6dc63677/output.txt

Total script time: 22.55 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/b9f3673308103a1/output.txt

Total script time: 29.00 mins

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

@timvandermeij timvandermeij merged commit b6bf1a3 into mozilla:master Mar 26, 2017
@timvandermeij
Copy link
Contributor

Thank you for cleaning this up!

@Snuffleupagus Snuffleupagus deleted the evaluator-rm-redundant-xref branch March 26, 2017 18:59
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
…dant-xref

Remove unnecessary `xref` parameters from various method signatures in `PartialEvaluator`, since `this.xref` is already available in the relevant scope
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