Instead of checking the service, it should just import PrivateBrowsingUtils.jsm and use PrivateBrowsingUtils.isWindowPrivate on the relevant window object.
This patch basically does the job: https://github.com/mozilla/pdf.js/pull/2481 I've commented there on a few things that need to be improved there.
Whiteboard: [pdfjs-c-integration] https://github.com/mozilla/pdf.js/pull/2481
Can I land the patch in https://github.com/mozilla/pdf.js/pull/2481 on mozilla-central now that it has landed on pdf.js's master? We really need this to be fixed on m-c as soon as possible.
The fix(though not your smaller one) will be landed in bug 824174.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.