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

[Firefox] Only load 'PdfStreamConverter' and 'PdfRedirector' when PDF.js is enabled #4525

Merged
merged 1 commit into from
Mar 27, 2014
Merged

[Firefox] Only load 'PdfStreamConverter' and 'PdfRedirector' when PDF.js is enabled #4525

merged 1 commit into from
Mar 27, 2014

Conversation

Snuffleupagus
Copy link
Collaborator

This PR moves the import of PdfStreamConverter and PdfRedirector inside of the _ensureRegistered funtion in PdfJs.jsm, to avoid loading them if PDF.js is disabled.

Note that this is already done for the addon, so this change makes the mozcentral and firefox implementations behave the same way.

@yurydelendik
Copy link
Contributor

Use Cu.unload when it's not used. See also http://mxr.mozilla.org/mozilla-central/source/js/xpconnect/idl/xpccomponents.idl#221

@Snuffleupagus
Copy link
Collaborator Author

Use Cu.unload when it's not used.

I'm not sure I follow, do you mean in: https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/content/PdfJs.jsm#L259, or some other place?

@yurydelendik
Copy link
Contributor

Use Cu.unload when it's not used.

I'm not sure I follow, do you mean in: https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/content/PdfJs.jsm#L259, or some other place

yep, _ensureUnregistered, similar to https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/bootstrap.js#L154

@Snuffleupagus
Copy link
Collaborator Author

Done.

yurydelendik added a commit that referenced this pull request Mar 27, 2014
[Firefox] Only load 'PdfStreamConverter' and 'PdfRedirector' when PDF.js is enabled
@yurydelendik yurydelendik merged commit 5a13fd1 into mozilla:master Mar 27, 2014
@yurydelendik
Copy link
Contributor

Thanks

@Snuffleupagus Snuffleupagus deleted the firefox-move-module-import branch March 27, 2014 17:08
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.

2 participants