isRegisteredProtocolHandler based on flawed assumption on Windows

RESOLVED FIXED

Status

RESOLVED FIXED
8 years ago
8 years ago

People

(Reporter: matthew.gertner, Assigned: matthew.gertner)

Tracking

Details

Attachments

(1 attachment)

(Assignee)

Description

8 years ago
The current implementation of nsIPlatformGlue.isRegisteredProtocolHandler assumes on Windows that the registered handler will set the application name in the registry key for DDE execution (HKCR\{scheme}\shell\open\ddeexec\Application). This turns out not to be true in some cases (e.g. Thunderbird doesn't use DDE), in which case the app might think it is still handing a protocol when in reality it isn't.
(Assignee)

Comment 1

8 years ago
Created attachment 483464 [details] [diff] [review]
Use the icon path to identify the app in the registry
Attachment #483464 - Flags: review?(mark.finkle)
Comment on attachment 483464 [details] [diff] [review]
Use the icon path to identify the app in the registry


>Index: components/src/nsCommandLineHandler.js
>===================================================================

>     if (protocolURI && protocolURI.length > 0) {
>       WebAppProperties.uri = protocolURI;
>+      url = null;

>+    if (win) {
>+      if (callback.value) {
>+        // Invoke the callback and don't load a new page
>+        callback.value.handleURI(url);

If url can be reset to null, should we check here, before using it? Or is this code not going to be called if url = null?
Attachment #483464 - Flags: review?(mark.finkle) → review+
(Assignee)

Comment 3

8 years ago
(In reply to comment #2)
> If url can be reset to null, should we check here, before using it? Or is this
> code not going to be called if url = null?

You're right, that's a bug. That file doesn't belong in this patch anyway though. Committing the other files, will fix nsCommandLineHandler.js and file the changes in another bug.

Sending        client/winbuild/regprot.nsi
Sending        components/public/nsIWebProtocolService.idl
Sending        components/src/Makefile.in
Sending        components/src/mac/nsDesktopEnvironmentMac.mm
Sending        components/src/nsPlatformGlue.js
Sending        components/src/windows/nsDesktopEnvironmentWin.cpp
Sending        components/src/windows/nsDesktopEnvironmentWin.h
Transmitting file data .......
Committed revision 75913.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.