nsWindowsHooks uses static nsCStrings

RESOLVED FIXED

Status

SeaMonkey
UI Design
RESOLVED FIXED
12 years ago
10 years ago

People

(Reporter: neil@parkwaycc.co.uk, Assigned: neil@parkwaycc.co.uk)

Tracking

Trunk
x86
Windows 95

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

27.33 KB, patch
Chris Thomas (CTho) [formerly cst@andrew.cmu.edu cst@yecc.com]
: review+
jag (Peter Annema)
: superreview+
Details | Diff | Splinter Review
(Assignee)

Description

12 years ago
nsWindowsHooks declares static RegistryEntry structures which use nsCStrings.
However although the Windows CRT is quite good at running all the constructors and destructors the use of static nsCStrings is frowned upon.
In trunk debug builds this is exposed by the many thousands of TLS assertions.
(Assignee)

Comment 1

12 years ago
Created attachment 223919 [details] [diff] [review]
Proposed patch

* Added nsWindowsHooksUtil.cpp as a real CPP source
* Moved all of the registry classe definitions to a new nsWindowsHooksUtil.h
* Moved all the static variables to be members of the singleton nsWindowsHooks
* Stored the singleton in a global so that nsWindowsHooksSettings can access it

I know the global singleton is a hack but I'd prefer to address that separately.
Assignee: guifeatures → neil
Status: NEW → ASSIGNED
Attachment #223919 - Flags: superreview?(jag)
Attachment #223919 - Flags: review?(cst)

Comment 2

12 years ago
Comment on attachment 223919 [details] [diff] [review]
Proposed patch

Bug # for follow-up work?
Attachment #223919 - Flags: superreview?(jag) → superreview+
Comment on attachment 223919 [details] [diff] [review]
Proposed patch

No more asserts with the patch.  I didn't read it though.  r=me.
Attachment #223919 - Flags: review?(cst) → review+
(Assignee)

Comment 4

12 years ago
Fix checked in.
Status: ASSIGNED → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → FIXED
(Assignee)

Comment 5

12 years ago
(In reply to comment #2)
>Bug # for follow-up work?
Actually, I must have lxr'd for the wrong string.
When I lxr'd for registryMatches today there was only one consumer,
and it needs to work the way the code is writen now,
as it gets a temporary settings object and sets dummy values on it.

Updated

10 years ago
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.