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 worker resolution on using minified version #8262

Merged
merged 1 commit into from
Apr 13, 2017

Conversation

tcorral
Copy link

@tcorral tcorral commented Apr 10, 2017

  • When the minified version is used the resolver of the worker can not find it properly and throws 404 error.
  • The problem was that:
    • It was getting the current name of the file.
    • It was replacing .js by .worker.js
  • When it was loading the unminified version it was working fine because:
    • pdf.js - .js + .worker.js = pdf.worker.js
  • When it was loading the minified version it didtn't work because:
    • pdf.min.js - .js + .worker.js = pdf.min.worker.js
    • pdf.min.worker.js doesn't exist the real file name is pdf.worker.min.js

- When the minified version is used the resolver of the worker can not find it properly and throws 404 error.
- The problem was that:
  - It was getting the current name of the file.
  - It was replacing **.js** by **.worker.js**
- When it was loading the unminified version it was working fine because:
  - *pdf.js - .js + .worker.js*  = **pdf.worker.js**
- When it was loading the minified version it didtn't work because:
  - *pdf.min.js - .js + .worker.js* = **pdf.min.worker.js**
  - **pdf.min.worker.js** doesn't exist the real file name is **pdf.worker.min.js**
@timvandermeij
Copy link
Contributor

/botio-linux preview

@pdfjsbot
Copy link

From: Bot.io (Linux)


Received

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

Live output at: http://107.21.233.14:8877/34e8aefb10ac767/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux)


Success

Full output at http://107.21.233.14:8877/34e8aefb10ac767/output.txt

Total script time: 2.75 mins

Published

@yurydelendik yurydelendik merged commit ad1023f into mozilla:master Apr 13, 2017
@yurydelendik
Copy link
Contributor

Thank you.

@timvandermeij timvandermeij removed the request for review from yurydelendik April 13, 2017 20:16
movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Fix worker resolution on using minified version
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.

4 participants