Closed Bug 339810 Opened 18 years ago Closed 18 years ago

nsWindowsHooks uses static nsCStrings

Categories

(SeaMonkey :: UI Design, defect)

x86
Windows 95
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: neil, Assigned: neil)

Details

Attachments

(1 file)

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.
Attached patch Proposed patchSplinter Review
* 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 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+
Fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
(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.
Component: XP Apps: GUI Features → UI Design
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: