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

Let Parser_makeFilter return NullStream when an invalid stream is encountered (issue 3417) #4945

Merged
merged 1 commit into from
Jun 19, 2014
Merged

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus
Copy link
Collaborator Author

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/89a9a0a53377dba/output.txt

@Snuffleupagus
Copy link
Collaborator Author

/botio test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/42780c5c5a2dfb4/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/42780c5c5a2dfb4/output.txt

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

Total script time: 24.74 mins

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

@yurydelendik
Copy link
Contributor

I don't think we shall throw the exception in the constructor anyway (if this case FlateStream) -- we shall throw it when we started decoding. To make it easy, can we just throw warning in the constructor and make stream empty?

On different note, it looks like the stream is encoded using Deflate64, we shall look if we can add than to PDF.js.

@Snuffleupagus
Copy link
Collaborator Author

can we just throw warning in the constructor

That seems to work just fine. The error is indeed triggered when decoding the stream, which enables the rest of the page to load.

and make stream empty?

I'm guessing that you meant setting this.str.bytes = new Uint8array(0)?
If that's the case, then that will prevent triggering any errors at all, since in that case there isn't anything to decode.

@yurydelendik
Copy link
Contributor

Okay, it's good as is

/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/3a18c6243a5c98f/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/a5fab83d0521771/output.txt

}
warn('filter "' + name + '" not supported yet');
return stream;
} catch (ex) {
Copy link
Contributor

Choose a reason for hiding this comment

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

we shall not catch MissingDataException here

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/3a18c6243a5c98f/output.txt

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

Total script time: 23.76 mins

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

@yurydelendik yurydelendik merged commit ab67e1c into mozilla:master Jun 19, 2014
@yurydelendik
Copy link
Contributor

Thank you

@Snuffleupagus Snuffleupagus deleted the issue-3417 branch June 19, 2014 08:36
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.

Unhandled rejections
3 participants