Closed Bug 236155 Opened 20 years ago Closed 19 years ago

Chatzilla should use contract ID, not class ID

Categories

(Other Applications :: ChatZilla, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nsayer, Assigned: bugzilla-mozilla-20000923)

References

Details

(Whiteboard: [cz-patch][cz-0.9.68])

Attachments

(2 files)

User-Agent:       
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113

extensions/irc/js/lib/connection-xpcom.js has this:

var sockServiceClass =
        Components.classesByID["{c07e81e0-ef12-11d2-92b6-00105a1b0d64}"];

It should probably say

var sockServiceClass =
        Components.classes["@mozilla.org/network/socket-transport-service;1"];

Reproducible: Always
Steps to Reproduce:
Assignee: darin → rginda
Component: Cookies → ChatZilla
QA Contact: cookieqa → samuel
Status: UNCONFIRMED → NEW
Ever confirmed: true
Product: Core → Other Applications
Assignee: rginda → silver
Status: NEW → ASSIGNED
Attached patch Use contract IDSplinter Review
Attachment #171062 - Flags: review?(rginda)
Comment on attachment 171062 [details] [diff] [review]
Use contract ID

could be that at the time this was written, the socket transport service didn't
have a class id.  you might want to check an early mozilla to be sure. 
otherwise, r=rginda
Attachment #171062 - Flags: review?(rginda) → review+
Seems it doesn't exist prior to
  nsNetCID.h: 1.24 <darin@netscape.com> 2003-01-17 18:14

Mozilla 1.0 branched on 2002-04-09. :)

*goes to do another patch*
Comment on attachment 171062 [details] [diff] [review]
Use contract ID

Minusing so no-one gets confused. This patch wont work in Mozilla 1.0.
Attachment #171062 - Flags: review+ → review-
I have yet to test this at all, but I will try in both trunk Mozilla and 1.0
before checking it in.

The comment is just a reminder that the CID should never be updated, since it
is for Mozilla during the 2002 - 2003 period only.
Attachment #171945 - Flags: review?(rginda)
Comment on attachment 171945 [details] [diff] [review]
Take two - this time with both contract ID and CID

this might throw a strict warning.  if so, an "in" test would be a better idea.
I could not get it to produce a warning on 1.0 or 1.7.1.
Whiteboard: [cz-patch][0.9.68]
Whiteboard: [cz-patch][0.9.68] → [cz-patch][cz-0.9.68]
Blocks: 299458
*poke*

rginda, any chance of that review? ;)
Comment on attachment 171945 [details] [diff] [review]
Take two - this time with both contract ID and CID

This would save a vew bytes of source test :)

var sockServiceClass = (sockClassByName || sockClassByID);

r=rginda either way
Attachment #171945 - Flags: review?(rginda) → review+
Attachment #171945 - Flags: approval1.8b3?
Attachment #171945 - Flags: approval1.8b3? → approval1.8b3+
Checked in -> FIXED.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: