use nsIWindowsRegKey in Windows shell service

RESOLVED FIXED in Firefox 12

Status

()

Firefox
Shell Integration
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Gavin, Assigned: Gavin)

Tracking

Trunk
Firefox 12
All
Windows 7
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

...instead of calling the registry APIs directly
Created attachment 589939 [details] [diff] [review]
patch
Assignee: nobody → gavin.sharp
Status: NEW → ASSIGNED
Attachment #589939 - Flags: review?(jmathies)

Updated

6 years ago
Blocks: 662324

Comment 2

6 years ago
Comment on attachment 589939 [details] [diff] [review]
patch

Review of attachment 589939 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/components/shell/src/nsWindowsShellService.cpp
@@ +785,5 @@
> +                      nsIWindowsRegKey::ACCESS_SET_VALUE);
> +  NS_ENSURE_SUCCESS(rv, rv);
> +
> +  char rgb[12];
> +  sprintf((char*)rgb, "%u %u %u\0", r, g, b);

Couldn't we print this into a PRUnichar buf and skip the use of NS_ConvertUTF8toUTF16 all together?
Attachment #589939 - Flags: review?(jmathies) → review+
Created attachment 589977 [details] [diff] [review]
patch

please double check my _snwprintfing!
Attachment #589977 - Flags: review?(jmathies)

Comment 4

6 years ago
Comment on attachment 589977 [details] [diff] [review]
patch

look ok to me!
Attachment #589977 - Flags: review?(jmathies) → review+
Attachment #589939 - Attachment is obsolete: true
https://hg.mozilla.org/integration/mozilla-inbound/rev/eb09304af438
Target Milestone: --- → Firefox 12

Comment 6

6 years ago
https://hg.mozilla.org/mozilla-central/rev/eb09304af438
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.