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

Use Array.isArray in the LoopbackPort. #8813

Merged
merged 1 commit into from
Aug 23, 2017

Conversation

yurydelendik
Copy link
Contributor

For better serialization of Arrays that belong to different sandboxes.

See also http://logs.glob.uno/?c=mozilla%23pdfjs#c66373

/cc @tobytailor

@Rob--W
Copy link
Member

Rob--W commented Aug 22, 2017

Can we use Array.isArray everywhere?

For IE9, a polyfill can be added to compatibility.js.

@timvandermeij
Copy link
Contributor

timvandermeij commented Aug 22, 2017

Indeed, wouldn't just changing https://github.com/mozilla/pdf.js/blob/master/src/shared/util.js#L1097 suffice so it's immediately used everywhere? For the polyfill we can use core-js since we already use it for clamped arrays (see be36c60).

@yurydelendik
Copy link
Contributor Author

Can we use Array.isArray everywhere?

Maybe. There are too many places to check if they will work as expected when changed. For now I'm just addressing regression (and hope will not add another one :).

@yurydelendik
Copy link
Contributor Author

For IE9, a polyfill can be added to compatibility.js.

Per MDN, Array.isArray is implemented in IE9

@Rob--W
Copy link
Member

Rob--W commented Aug 22, 2017

Even better. Then we don't need a polyfill at all.

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

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

This seems fine, but it now needs a rebase :-)

r=me, with passing tests.

@Snuffleupagus
Copy link
Collaborator

/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/2c396b7034ac963/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/4b9d5b098bdaf77/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/2c396b7034ac963/output.txt

Total script time: 16.47 mins

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/4b9d5b098bdaf77/output.txt

Total script time: 29.25 mins

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

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.

5 participants