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 the exception propagation when rejecting workerReadyCapability #5275

Merged
merged 5 commits into from
Sep 16, 2014
Merged

Fix the exception propagation when rejecting workerReadyCapability #5275

merged 5 commits into from
Sep 16, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

Currently when an exception is thrown, we try to reject workerReadyCapability with multiple arguments in src/core/api.js. This obviously doesn't work, hence this PR changes that to instead reject with the exception object as is.
In src/core/worker.js the exception is currently (unncessarily) wrapped in an object, so this patch also simplifies that to directly send the exception object instead.

Also, this PR adds a unit test to check that the exception handling is working as expected (it fails with the current master).

Note: Two commits were extracted from PR #5234, since I think it makes sense to get the exception handling fixed as soon as possible!

Currently when an exception is thrown, we try to reject `workerReadyCapability` with multiple arguments in src/core/api.js. This obviously doesn't work, hence this patch changes that to instead reject with the exception object as is.
In src/core/worker.js the exception is currently (unncessarily) wrapped in an object, so this patch also simplifies that to directly send the exception object instead.
…itsForPromiseResolved`and add a `waitsForPromiseRejected` function
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/15ca58dff4c1316/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/a726701694b1ca6/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/15ca58dff4c1316/output.txt

Total script time: 0.66 mins

  • Unit Tests: Passed

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/a726701694b1ca6/output.txt

Total script time: 0.82 mins

  • Unit Tests: Passed

@yurydelendik
Copy link
Contributor

/botio-windows preview

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/356f308e29f0d4e/output.txt

@yurydelendik
Copy link
Contributor

/botio test

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/83b41aea9c757a1/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Windows)


Received

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

Live output at: http://107.22.172.223:8877/d6774e5576fabde/output.txt

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Windows)


Success

Full output at http://107.22.172.223:8877/d6774e5576fabde/output.txt

Total script time: 20.10 mins

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

@pdfjsbot
Copy link

pdfjsbot commented Sep 8, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/83b41aea9c757a1/output.txt

Total script time: 22.46 mins

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

@Snuffleupagus
Copy link
Collaborator Author

I found yet another case of incorrect exception throwing, that I previously missed, so I've added another commit to address this.

@yurydelendik Anything else you want me to change in this PR?

…file loading fails because the server responds with a non 404 status message
@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/318170c12c53fac/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/64ff34d8e8d709a/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://107.22.172.223:8877/318170c12c53fac/output.txt

Total script time: 3.05 mins

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

Image differences available at: http://107.22.172.223:8877/318170c12c53fac/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/64ff34d8e8d709a/output.txt

Total script time: 22.57 mins

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

yurydelendik added a commit that referenced this pull request Sep 16, 2014
Fix the exception propagation when rejecting workerReadyCapability
@yurydelendik yurydelendik merged commit ffb613b into mozilla:master Sep 16, 2014
@yurydelendik
Copy link
Contributor

Thank you for the patch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants