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

[api-minor] Adds controlled destruction of the worker. #6546

Merged
merged 4 commits into from
Oct 23, 2015

Conversation

yurydelendik
Copy link
Contributor

Introduces PDFDocumentLoadingTask destroy() method to initiate tear down and onDestroyed callback to wait on its completion.

Attempt to address intermittent failures during FF testing, e.g. https://bugzilla.mozilla.org/show_bug.cgi?id=1016737

That is also an alternative solution for #5629


/**
* Cleans up resources allocated by the page.
* Deprecated, use cleanup() instead.
Copy link
Collaborator

Choose a reason for hiding this comment

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

How about also including a warn(...) below to notify users of the deprecation (since it's not unlikely that people won't bother reading comments such as this)?

@Snuffleupagus
Copy link
Collaborator

/botio test

@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/34925907f0c548c/output.txt

@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/cc367b486b03a90/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 18.17 mins

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

@pdfjsbot
Copy link

From: Bot.io (Linux)


Failed

Full output at http://107.21.233.14:8877/34925907f0c548c/output.txt

Total script time: 19.99 mins

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

Image differences available at: http://107.21.233.14:8877/34925907f0c548c/reftest-analyzer.html#web=eq.log

@yurydelendik yurydelendik force-pushed the destroy branch 2 times, most recently from d67f6ec to 61e7bde Compare October 21, 2015 13:34
@yurydelendik yurydelendik changed the title Adds controlled destruction of the worker. [api-minor] Adds controlled destruction of the worker. Oct 21, 2015
@yurydelendik
Copy link
Contributor Author

(We need to start 1.2 version for this one)

@brendandahl
Copy link
Contributor

As discussed on IRC: changing WorkerThread name and making destroy() return a promise. Then r+

};
waitsForPromiseRejected(loadingTask.promise, function(reason) {
expect(true).toEqual(true);
// expect(destroyed).toEqual(true);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be commented out?

@yurydelendik
Copy link
Contributor Author

/botio test

@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/0965ea6f5fdfa55/output.txt

Also renames PDFPageProxy.destroy method to cleanup.
@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/0965ea6f5fdfa55/output.txt

Total script time: 19.78 mins

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

@yurydelendik
Copy link
Contributor Author

/botio-windows test

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

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

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

@pdfjsbot
Copy link

From: Bot.io (Windows)


Success

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

Total script time: 18.80 mins

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

@yurydelendik
Copy link
Contributor Author

Fixes #5278

@timvandermeij
Copy link
Contributor

Really nice work!

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