Closed Bug 454710 Opened 16 years ago Closed 16 years ago

Need dummy variable in place of mPrefService in PreferencePaneBase.h (fragile base class problem)

Categories

(Camino Graveyard :: Preferences, defect)

All
macOS
defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED
Camino2.0

People

(Reporter: bugzilla-graveyard, Assigned: bugzilla-graveyard)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch fix v1.0 (obsolete) — Splinter Review
Bug 384800 comment 40 et seq describes a branch crash with the new trunk PreferencePaneBase.h file compiled into CBSamplePane. Stuart suggested this fix in bug 428858 comment 7, and I just tested it and confirmed that I can't reproduce Smokey's branch crash with a new CBSamplePane.
Attachment #338001 - Flags: review?(stuart.morgan+bugzilla)
Comment on attachment 338001 [details] [diff] [review]
fix v1.0

>+  void* mPrefService; // dummy ivar to keep from breaking third-party preference panes
>+                      // deployed on both branch and trunk

Call it "dummy" or something equally obviously not for use (changing the name will also make it obvious to anyone trying to compile against trunk with code that was trying to use mPrefService before that they need to change their code).

Change the comment to: "placeholder for the old mPrefService variable, to prevent third-party preference panes deployed on both 1.x and 2+ from breaking due to the fragile base class problem."

r=me for the approach though (obviously ;) )
Attachment #338001 - Flags: superreview?(mikepinkerton)
Attachment #338001 - Flags: review?(stuart.morgan+bugzilla)
Attachment #338001 - Flags: review+
Attached patch fix v1.01Splinter Review
Updated for review comments.
Attachment #338001 - Attachment is obsolete: true
Attachment #338013 - Flags: superreview?(mikepinkerton)
Attachment #338001 - Flags: superreview?(mikepinkerton)
Summary: Need dummy variable mPrefService in PreferencePaneBase.h → Need dummy variable in place of mPrefService in PreferencePaneBase.h (fragile base class problem)
Attachment #338013 - Flags: superreview?(mikepinkerton) → superreview+
Landed on cvs trunk.
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: