Closed Bug 1115197 Opened 10 years ago Closed 10 years ago

Make JS callers of ios.newChannel call ios.newChannel2 in browser/extensions/pdfjs

Categories

(Firefox :: PDF Viewer, defect, P2)

defect

Tracking

()

RESOLVED FIXED
Firefox 39

People

(Reporter: ckerschb, Assigned: yury)

References

Details

(Whiteboard: [pdfjs-c-integration][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/5819)

Attachments

(1 file)

No description provided.
Assignee: nobody → mozilla
Status: NEW → ASSIGNED
Whoever ends up reviewing those patches, please find useful documentation here: https://bugzilla.mozilla.org/show_bug.cgi?id=1087726#c2
Component: DOM: Security → PDF Viewer
Product: Core → Firefox
Comment on attachment 8540999 [details] [diff] [review] js_3_c_browser_pdfjs.patch I don't think it makes sense to use "frontWindow" here (that is an arbitrary window). In fact I'm not sure why that is used at all, instead of this.domWindow.
Attachment #8540999 - Flags: review?(ydelendik)
We are trying to support the PDF.js extension (Firefox PDF Viewer is built on it) for testing and development purpose. We are trying to patch code at https://github.com/mozilla/pdf.js/tree/master/extensions/firefox/content and then uplift it to the m-c. Notice that we are trying to support the extension for older Firefox versions. Do newChannel2 and asyncFetch2 present and usable starting from FF36? What will be best way to feature test it?
Flags: needinfo?(mozilla)
(In reply to Yury Delendik (:yury) from comment #4) > We are trying to support the PDF.js extension (Firefox PDF Viewer is built > on it) for testing and development purpose. We are trying to patch code at > https://github.com/mozilla/pdf.js/tree/master/extensions/firefox/content and > then uplift it to the m-c. > > Notice that we are trying to support the extension for older Firefox > versions. Do newChannel2 and asyncFetch2 present and usable starting from > FF36? What will be best way to feature test it? Yuri, thanks for checking back. At the moment the arguments (loadingPrincipal, loadingNode, etc.) will only hang off a channel and will *not* really be used for some time. Once we have a loadInfo on all channels, we are going to move security checks into asyncOpen(). Once that infrastructure is in place, we are going to consume the arguments you provide when creating a channel. I don't think you can feature test at the moment. Worth mentioning is, whenever some addon still calls ioservice::NewChannel() instead of ioservice::NewChannel2() - we forward that call (see [1]) and then try to create a channel using either protocolhandler::NewChannel2() or protocolhandler::NewChannel(), see [2]. In easier words, we provide a wrapper (shim) that allows addons to still work even if not calling ioservice::NewChannel2(). The rule of thumb should be: All of the code we (like we as Mozilla) write, should call ::NewChannel2() instead of ::NewChannel(). To answer your question, newChannel2 and also asyncFetch2 landed on mc recently (first being tested with Bug 1087739, which landed on 12/29 and is therefore a milestone for FF37. [1] http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsIOService.cpp#804 [2] http://mxr.mozilla.org/mozilla-central/source/netwerk/base/src/nsIOService.cpp#647
Flags: needinfo?(mozilla)
Hi Christoph, can you create a pull request against the pdf.js repo https://github.com/mozilla/pdf.js as well?
Flags: needinfo?(mozilla)
Priority: -- → P2
Whiteboard: [pdfjs-c-integration]
(In reply to Brendan Dahl [:bdahl] from comment #6) > Hi Christoph, can you create a pull request against the pdf.js repo > https://github.com/mozilla/pdf.js as well? Here we go: https://github.com/mozilla/pdf.js/pull/5620
Flags: needinfo?(mozilla)
As discussed over email I am assigning this bug to you. Thanks for fixing!
Assignee: mozilla → ydelendik
Comment on attachment 8540999 [details] [diff] [review] js_3_c_browser_pdfjs.patch Clearing review request since the patch is slighlty outdated.
Attachment #8540999 - Flags: review?(ydelendik)
Yury, thanks for fixing and landing on github! When is this code actually merged into mc? We are about to land a channel wrapper (bug 1120487) which wraps all channels that do not call newChannel2 early in the next cycle (early April) which is very likely to cause problems for pdf.js.
Flags: needinfo?(ydelendik)
Christoph, this will land on mozilla-central as part of bug 1148192.
Depends on: 1148192
Flags: needinfo?(ydelendik)
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [pdfjs-c-integration] → [pdfjs-c-integration][pdfjs-f-fixed-upstream] https://github.com/mozilla/pdf.js/pull/5819
Target Milestone: --- → Firefox 39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: