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 LegacyPromise in src/shared/annotation.js #4727

Merged
merged 1 commit into from
May 2, 2014
Merged

Remove LegacyPromise in src/shared/annotation.js #4727

merged 1 commit into from
May 2, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

No description provided.

@@ -498,7 +496,7 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
return Annotation.prototype.getOperatorList.call(this, evaluator);
}

var promise = new LegacyPromise();
var capability = createPromiseCapability();
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think that we could just as well replace this with return new Promise(function (resolve) { (and of course with some adjustments in the code below), but I wasn't sure if that kind of change was really desirable w.r.t. readability of the code.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we can use Promise.resolve() for now (I don't see any async operation). However I would like to see better exception handling in the future for this.

@Snuffleupagus Snuffleupagus mentioned this pull request May 2, 2014
4 tasks
objectLoader.load().then(function() {
promise.resolve(resources);
loadResources: function Annotation_loadResources(keys) {
return new Promise(function (resolve) {
Copy link
Contributor

Choose a reason for hiding this comment

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

add reject and use it in the then's below

@Snuffleupagus
Copy link
Collaborator Author

Comments addressed.

@yurydelendik
Copy link
Contributor

Really good

/botio test

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2014

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/562e1a00cb530b9/output.txt

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2014

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2014

From: Bot.io (Windows)


Success

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

Total script time: 21.95 mins

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

@pdfjsbot
Copy link

pdfjsbot commented May 2, 2014

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/562e1a00cb530b9/output.txt

Total script time: 25.83 mins

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

yurydelendik added a commit that referenced this pull request May 2, 2014
…tation.js

Remove LegacyPromise in src/shared/annotation.js
@yurydelendik yurydelendik merged commit c68ba07 into mozilla:master May 2, 2014
@yurydelendik
Copy link
Contributor

Thank you

@Snuffleupagus Snuffleupagus deleted the remove-LegacyPromise-annotation.js branch May 2, 2014 22:05
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.

3 participants