Part of our deliverable should be to get rid of out clumsy attempts to hook the external applications helper dialog. We should patch the Mozilla code instead doing trying to fix that from extensions land. This might avoid #18090 (moved) and other weird side-effects.
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Child items 0
Show closed items
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Linked items 0
Link issues together to show that they're related.
Learn more.
It looks like you will get a random result, if there are multiple observers that disagree. Presumably, there is only one right now, but what happens if this code is upstreamed?
It looks like you will get a random result, if there are multiple observers that disagree. Presumably, there is only one right now, but what happens if this code is upstreamed?
Good point. The observer service does not provide a way to avoid notifying all the observers, but we could specify that all modules that handle "external-app-requested" should not do anything if cancel has already been requested (subject.data == true). I think that will solve the problem.
I have looked over the code and I think it looks good. (I am still building it and will report if I see any problems.)
General question: do you think a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=440892 would use this observer mechanism? Or could a proper check for "network.protocol-handler.warn-external" be simply built directly into the code? I'm wondering what the right approach would be for future upstreaming.
I have looked over the code and I think it looks good. (I am still building it and will report if I see any problems.)
Thanks for looking at the code.
General question: do you think a fix for https://bugzilla.mozilla.org/show_bug.cgi?id=440892 would use this observer mechanism? Or could a proper check for "network.protocol-handler.warn-external" be simply built directly into the code? I'm wondering what the right approach would be for future upstreaming.
I think a proper fix should just be built into the code (probably inside uriloader/exthandler/nsHandlerService.js). But given the uncertainty that was expressed by mikeperry in the following comment, Kathy and I thought it would be best to mimic the existing hooks that were in Torbutton (replacing the component overrides with an observer notification):
https://trac.torproject.org/projects/tor/ticket/9901#comment:74
Also, if we want to include a custom message it is easier to have our own separate dialog (although we did experiment with using a XUL overlay; see ticket:16623#comment:3).
Okay, finally. Looks good to me and I am happy to see my crazy workaround going. I made a fixup commit removing the remaining bits from my #9901 (closed) patch we don't need anymore (7dd710152955bd4145814c8bafed3b50dfacff75 on torbutton master). mcs' and brade's patches are commit 6d5dc7845579ca99d9c46d921876e477ba60935f on torbutton master and commit 4b7123f235465f26052ea0dfaeebb590a3f31e0f on tor-browser-45.2.0esr-6.5-1.
This will be in the next alpha for broader testing. I expect this will help with usability things like #18090 (moved) as well.
Okay, finally. Looks good to me and I am happy to see my crazy workaround going. I made a fixup commit removing the remaining bits from my #9901 (closed) patch we don't need anymore (7dd710152955bd4145814c8bafed3b50dfacff75 on torbutton master). mcs' and brade's patches are commit 6d5dc7845579ca99d9c46d921876e477ba60935f on torbutton master and commit 4b7123f235465f26052ea0dfaeebb590a3f31e0f on tor-browser-45.2.0esr-6.5-1.
Thanks for your review and for catching what we missed.