Skip to content

[api-minor] Fix the annotationStorage parameter in PDFPageProxy.render #12173

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

Merged

Conversation

Snuffleupagus
Copy link
Collaborator

While the parameter name (clearly) suggests that an AnnotationStorage-instance is expected, looking at the only call-sites that include the parameter (i.e. the PDFPrintServiceFactory instances) it actually contains just a normal Object.

Hence it seems much more reasonable to actually pass a valid AnnotationStorage-instance, as the name suggests, and simply have PDFPageProxy.render do the annotationStorage.getAll() call. (Since we cannot send an AnnotationStorage-instance as-is to the worker-thread, given the "structured clone algorithm".)

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/20258da435200d9/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/e898d8f1c846afb/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/20258da435200d9/output.txt

Total script time: 3.97 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/e898d8f1c846afb/output.txt

Total script time: 4.99 mins

  • Unit Tests: Passed

@Snuffleupagus Snuffleupagus force-pushed the render-annotationStorage branch 2 times, most recently from 8607756 to 3d588fb Compare August 5, 2020 20:56
…nder`

While the parameter name (clearly) suggests that an `AnnotationStorage`-instance is expected, looking at the only call-sites that include the parameter (i.e. the `PDFPrintServiceFactory` instances) it actually contains just a normal Object.

Hence it seems much more reasonable to actually pass a valid `AnnotationStorage`-instance, as the name suggests, and simply have `PDFPageProxy.render` do the `annotationStorage.getAll()` call. (Since we cannot send an `AnnotationStorage`-instance as-is to the worker-thread, given the "structured clone algorithm".)
…to accurately reflect `IPDFAnnotationLayerFactory` (PR 12147 follow-up)
@Snuffleupagus Snuffleupagus force-pushed the render-annotationStorage branch from 3d588fb to a6c1ef8 Compare August 5, 2020 21:02
@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/b1f6a0b4e4969f6/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Windows)


Received

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

Live output at: http://54.215.176.217:8877/773b4bec94c356f/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Failed

Full output at http://54.67.70.0:8877/b1f6a0b4e4969f6/output.txt

Total script time: 3.86 mins

  • Unit Tests: FAILED

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Windows)


Success

Full output at http://54.215.176.217:8877/773b4bec94c356f/output.txt

Total script time: 4.89 mins

  • Unit Tests: Passed

@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.67.70.0:8877/8ef8e99e96b34e4/output.txt

@timvandermeij timvandermeij added viewer and removed core labels Aug 5, 2020
@pdfjsbot
Copy link

pdfjsbot commented Aug 5, 2020

From: Bot.io (Linux m4)


Success

Full output at http://54.67.70.0:8877/8ef8e99e96b34e4/output.txt

Total script time: 3.53 mins

Published

@timvandermeij timvandermeij merged commit 95e102c into mozilla:master Aug 5, 2020
@timvandermeij
Copy link
Contributor

Thanks!

@Snuffleupagus Snuffleupagus deleted the render-annotationStorage branch August 5, 2020 22:09
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