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

Stub out Firefox addon Telemetry wrapper #8239

Merged
merged 1 commit into from
Apr 5, 2017
Merged

Conversation

georgf
Copy link
Contributor

@georgf georgf commented Apr 5, 2017

We are planning to remove the addon histogram APIs from Firefox
Telemetry in bug 1353295.

pdf.js is one of 3 projects that ever used them.
The easy solution here seems to just stub out all calls that use addon histograms, that should keep things working just as before.

linting passes fine locally.
I had trouble getting the tests to run due to grunt makeref running into md5 mismatches.

We are planning to remove the addon histogram APIs from Firefox
Telemetry.
The easy solution here is to just stub out all calls that use them.
@georgf
Copy link
Contributor Author

georgf commented Apr 5, 2017

@yurydelendik for review?

@Snuffleupagus
Copy link
Collaborator

With these changes, I think that you can also remove the following lines since they shouldn't be neecessary: https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/content/PdfJsTelemetry-addon.jsm#L15-L16.

I had trouble getting the tests to run due to grunt makeref running into md5 mismatches.

Unfortunately, running e.g. gulp test won't help with testing the add-on code.
You can however use gulp firefox to build the add-on locally and then install that in Firefox (pleases note that xpinstall.signatures.required needs to be turned off, since a locally built add-on won't be signed).

@yurydelendik yurydelendik merged commit c380d25 into mozilla:master Apr 5, 2017
@yurydelendik
Copy link
Contributor

Thank you for the patch.

@timvandermeij
Copy link
Contributor

timvandermeij commented Apr 5, 2017

Is there a reason why we cannot just remove the file altogether? I don't really see why we need to keep this around if it does nothing anymore, especially since the add-on is primarily used for development purposes. I don't think we need to be backwards compatible here, unless I'm missing something...

@yurydelendik
Copy link
Contributor

We use it at PdfStreamConverter.jsm, we can further rename it to have a "-stub", similar to pdfjs-stub.jsm

@timvandermeij
Copy link
Contributor

timvandermeij commented Apr 5, 2017

Thank you. In that case we probably need to keep it around for compatibility. Renaming it to have a -stub suffix, together with removing https://github.com/mozilla/pdf.js/blob/master/extensions/firefox/content/PdfJsTelemetry-addon.jsm#L15-L16, would be good, but it's also fine as-is then.

movsb pushed a commit to movsb/pdf.js that referenced this pull request Jul 14, 2018
Stub out Firefox addon Telemetry wrapper
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.

4 participants