Closed
Bug 337917
Opened 19 years ago
Closed 3 years ago
Make consumers stop using cids from other modules
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
WONTFIX
Future
People
(Reporter: timeless, Unassigned)
References
()
Details
Attachments
(1 file, 9 obsolete files)
11.77 KB,
patch
|
dbaron
:
review-
benjamin
:
feedback-
|
Details | Diff | Splinter Review |
This is a long term thing, but i'm going to blitz first and get the straglers later. some straglers are marked by unhappy comments to places. others i just gave up on and i'll have to fight heavily when reaping.
Attachment #221965 -
Flags: superreview?(dbaron)
Attachment #221965 -
Flags: review?
Attachment #221965 -
Flags: review? → review?(darin)
Attachment #221966 -
Flags: superreview?(darin)
Attachment #221966 -
Flags: review?(smontagu)
Attachment #221967 -
Flags: superreview?(dbaron)
Attachment #221967 -
Flags: review?(neil)
Attachment #221968 -
Flags: superreview?(dbaron)
Attachment #221968 -
Flags: review?(bzbarsky)
Attachment #221969 -
Flags: superreview?(dveditz)
Attachment #221969 -
Flags: review?(darin)
Attachment #221970 -
Flags: superreview?(darin)
Attachment #221970 -
Flags: review?
Attachment #221970 -
Flags: review? → review?(dveditz)
Attachment #221971 -
Flags: superreview?(neil)
Attachment #221971 -
Flags: review?(bienvenu)
Attachment #221972 -
Flags: superreview?(neil)
Attachment #221972 -
Flags: review?(brettw)
Attachment #221973 -
Flags: superreview?(darin)
Attachment #221973 -
Flags: review?(neil)
![]() |
||
Comment 10•19 years ago
|
||
So.. What about cases when someone really does want a specific impl? See for example the code I recently added to nsNullPrincipal to get a simple URI by CID...
![]() |
||
Updated•19 years ago
|
Attachment #221968 -
Flags: review?(bzbarsky) → review+
Reporter | ||
Comment 11•19 years ago
|
||
be nice to poor search and replacers and include a comment indicating that you want a specific version. or name the variable so it's very very very clear that you're asking for a specific version.
Updated•19 years ago
|
Attachment #221966 -
Flags: review?(smontagu) → review+
Updated•19 years ago
|
Attachment #221972 -
Flags: review?(brettw) → review+
![]() |
||
Comment 12•19 years ago
|
||
I did include such a comment.
Reporter | ||
Comment 13•19 years ago
|
||
for my reference, i somehow magically managed not to patch bz's file. i'll have to be careful for any future rounds of course :).
Updated•19 years ago
|
Attachment #221965 -
Flags: superreview?(dbaron)
Attachment #221965 -
Flags: superreview+
Attachment #221965 -
Flags: review?(darin)
Attachment #221965 -
Flags: review+
Updated•19 years ago
|
Attachment #221966 -
Flags: superreview?(darin) → superreview+
Updated•19 years ago
|
Attachment #221969 -
Flags: review?(darin) → review+
Updated•19 years ago
|
Attachment #221970 -
Flags: superreview?(darin) → superreview+
Updated•19 years ago
|
Attachment #221973 -
Flags: superreview?(darin) → superreview+
Updated•19 years ago
|
Attachment #221972 -
Flags: superreview?(neil) → superreview+
Updated•19 years ago
|
Attachment #221971 -
Flags: superreview?(neil) → superreview+
Comment 14•19 years ago
|
||
Comment on attachment 221969 [details] [diff] [review]
abusers of netwerk cids
sr=dveditz
Attachment #221969 -
Flags: superreview?(dveditz) → superreview+
Comment 15•19 years ago
|
||
Comment on attachment 221970 [details] [diff] [review]
abusers of pref cids
r=dveditz
Attachment #221970 -
Flags: review?(dveditz) → review+
Comment 16•19 years ago
|
||
FWIW, I looked carefully at the simple URI cases. I didn't feel that any of them (in timeless's patch) warranted the use of ClassID over ContractID.
Updated•19 years ago
|
Attachment #221973 -
Flags: review?(neil) → review+
Comment 17•19 years ago
|
||
Comment on attachment 221967 [details] [diff] [review]
abusers of layout cids - NS_HTMLEDITOR_CONTACTID needs to be fixed before commiting
>+ #define NS_HTMLEDITOR_CONTACTID \
>+ "@mozilla.org/editor/htmleditor;1"
s/CONTACT/CONTRACT/
Attachment #221967 -
Flags: review?(neil) → review+
Updated•19 years ago
|
Attachment #221971 -
Flags: review?(bienvenu) → review+
Reporter | ||
Comment 18•19 years ago
|
||
Comment on attachment 221967 [details] [diff] [review]
abusers of layout cids - NS_HTMLEDITOR_CONTACTID needs to be fixed before commiting
>Index: mozilla/editor/libeditor/build/nsEditorRegistration.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/editor/libeditor/build/nsEditorRegistration.cpp,v
>retrieving revision 1.39
>diff -p1 -r1.39 mozilla/editor/libeditor/build/nsEditorRegistration.cpp
>*** mozilla/editor/libeditor/build/nsEditorRegistration.cpp
>--- mozilla/editor/libeditor/build/nsEditorRegistration.cpp
>*************** static const nsModuleComponentInfo compo
>*** 216,218 ****
> { "Text Editor", NS_TEXTEDITOR_CID,
>! "@mozilla.org/editor/texteditor;1", nsPlaintextEditorConstructor, },
>
>--- 216,218 ----
> { "Text Editor", NS_TEXTEDITOR_CID,
>! NS_TEXTEDITOR_CONTRACTID, nsPlaintextEditorConstructor, },
>
>*************** static const nsModuleComponentInfo compo
>*** 221,226 ****
> { "HTML Editor", NS_HTMLEDITOR_CID,
>! "@mozilla.org/editor/htmleditor;1", nsHTMLEditorLogConstructor, },
> #else
> { "HTML Editor", NS_HTMLEDITOR_CID,
>! "@mozilla.org/editor/htmleditor;1", nsHTMLEditorConstructor, },
> #endif
>--- 221,226 ----
> { "HTML Editor", NS_HTMLEDITOR_CID,
>! NS_HTMLEDITOR_CONTRACTID, nsHTMLEditorLogConstructor, },
> #else
> { "HTML Editor", NS_HTMLEDITOR_CID,
>! NS_HTMLEDITOR_CONTRACTID, nsHTMLEditorConstructor, },
> #endif
>Index: mozilla/editor/public/nsEditorCID.h
>===================================================================
>RCS file: /cvsroot/mozilla/editor/public/nsEditorCID.h,v
>retrieving revision 1.6
>diff -p1 -r1.6 mozilla/editor/public/nsEditorCID.h
>*** mozilla/editor/public/nsEditorCID.h
>--- mozilla/editor/public/nsEditorCID.h
>***************
>*** 2,7 ****
>
>! #define NS_EDITOR_CID \
>! {/* {D3DE3431-8A75-11d2-918C-0080C8E44DB5}*/ \
>! 0xd3de3431, 0x8a75, 0x11d2, \
>! { 0x91, 0x8c, 0x0, 0x80, 0xc8, 0xe4, 0x4d, 0xb5 } }
>
>--- 2,5 ----
>
>! #define NS_TEXTEDITOR_CONTRACTID \
>! "@mozilla.org/editor/texteditor;1"
>
>***************
>*** 12,13 ****
>--- 10,14 ----
>
>+ #define NS_HTMLEDITOR_CONTACTID \
>+ "@mozilla.org/editor/htmleditor;1"
>+
> #define NS_HTMLEDITOR_CID \
>Index: mozilla/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp,v
>retrieving revision 1.5
>diff -p1 -r1.5 mozilla/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp
>*** mozilla/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp
>--- mozilla/embedding/minimo/chromelite/nsSimpleChromeRegistry.cpp
>***************
>*** 40,42 ****
>
>!
> static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
>--- 40,42 ----
>
>! // XXX NS_CSS_LOADER_CID does not belong to us.
> static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
>Index: mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp,v
>retrieving revision 1.115
>diff -p1 -r1.115 mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
>*** mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
>--- mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
>*************** static NS_DEFINE_IID(kRangeCID, NS_RANGE
>*** 131,132 ****
>--- 131,133 ----
> static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
>+ // XXX NS_FRAMETRAVERSAL_CID does not belong to us.
> static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
>Index: mozilla/rdf/chrome/src/nsChromeRegistry.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/rdf/chrome/src/nsChromeRegistry.cpp,v
>retrieving revision 1.328
>diff -p1 -r1.328 mozilla/rdf/chrome/src/nsChromeRegistry.cpp
>*** mozilla/rdf/chrome/src/nsChromeRegistry.cpp
>--- mozilla/rdf/chrome/src/nsChromeRegistry.cpp
>*************** static NS_DEFINE_CID(kRDFXMLDataSourceCI
>*** 108,109 ****
>--- 108,110 ----
> static NS_DEFINE_CID(kRDFContainerUtilsCID, NS_RDFCONTAINERUTILS_CID);
>+ // XXX NS_CSS_LOADER_CID does not belong to us.
> static NS_DEFINE_CID(kCSSLoaderCID, NS_CSS_LOADER_CID);
>Index: mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp,v
>retrieving revision 1.19
>diff -p1 -r1.19 mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp
>*** mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp
>--- mozilla/toolkit/components/typeaheadfind/src/nsTypeAheadFind.cpp
>*************** NS_IMPL_RELEASE(nsTypeAheadFind)
>*** 108,109 ****
>--- 108,110 ----
> static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
>+ // XXX NS_FRAMETRAVERSAL_CID does not belong to us.
> static NS_DEFINE_CID(kFrameTraversalCID, NS_FRAMETRAVERSAL_CID);
Attachment #221967 -
Attachment description: abusers of layout cids → abusers of layout cids - NS_HTMLEDITOR_CONTACTID needs to be fixed before commiting
Reporter | ||
Comment 19•19 years ago
|
||
Comment on attachment 221965 [details] [diff] [review]
abusers of xpcom cids
mozilla/mailnews/import/src/nsImportMail.cpp 1.64
mozilla/mailnews/import/src/nsImportAddressBooks.cpp 1.54
mozilla/mailnews/compose/src/nsMsgSendLater.cpp 1.105
mozilla/xpinstall/src/nsInstallFileOpItem.cpp 1.70
mozilla/xpinstall/src/nsSoftwareUpdate.cpp 1.111
mozilla/xpinstall/src/nsInstallExecute.cpp 1.32
Attachment #221965 -
Attachment is obsolete: true
Reporter | ||
Comment 20•19 years ago
|
||
Comment on attachment 221966 [details] [diff] [review]
abusers of intl cids
mozilla/gfx/src/mac/nsUnicodeRenderingToolkit.cpp 1.49
mozilla/mail/components/migration/src/nsDogbertProfileMigrator.cpp 1.7
mozilla/mail/components/migration/src/nsNetscapeProfileMigratorBase.cpp 1.5
mozilla/mailnews/addrbook/src/nsAbView.cpp 1.61
mozilla/mailnews/addrbook/src/nsDirectoryDataSource.cpp 1.74
mozilla/intl/locale/public/nsDateTimeFormatCID.h 1.10
mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 1.116
mozilla/profile/pref-migrator/src/nsPrefMigration.cpp 1.204
mozilla/mailnews/imap/src/nsImapProtocol.cpp 1.627
mozilla/mailnews/base/util/nsMsgDBFolder.cpp 1.274
mozilla/mailnews/base/util/nsMsgI18N.cpp 1.94
mozilla/uriloader/base/nsDocLoader.cpp 3.291
mozilla/netwerk/base/src/nsDirectoryIndexStream.cpp 1.40
mozilla/netwerk/streamconv/converters/nsIndexedToHTML.cpp 1.75
mozilla/widget/src/os2/nsFilePicker.cpp 1.50
mozilla/toolkit/components/downloads/src/nsDownloadManager.cpp 1.65
mozilla/mailnews/base/src/nsMsgDBView.cpp 1.236
mozilla/mailnews/compose/src/nsMsgCompose.cpp 1.488
mozilla/security/manager/pki/src/nsNSSDialogs.cpp 1.61
mozilla/modules/oji/src/nsJVMManager.cpp 1.80
mozilla/toolkit/components/history/src/nsGlobalHistory.cpp 1.74
mozilla/xpfe/components/history/src/nsGlobalHistory.cpp 1.220
mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp 1.76
mozilla/xpinstall/src/nsInstall.cpp 1.242
mozilla/widget/src/windows/nsDataObj.cpp 1.78
mozilla/widget/src/windows/nsFilePicker.cpp 1.91
mozilla/xpfe/components/intl/nsCharsetMenu.cpp 1.44
mozilla/widget/src/xpwidgets/nsBaseFilePicker.cpp 1.30
mozilla/xpfe/components/bookmarks/src/nsBookmarksService.cpp 1.341
mozilla/widget/src/beos/nsFilePicker.cpp 1.29
mozilla/widget/src/mac/nsMacControl.cpp 1.66
mozilla/layout/generic/nsSimplePageSequence.cpp 3.135
mozilla/layout/generic/nsTextTransformer.cpp 1.113
mozilla/parser/htmlparser/src/nsParserMsgUtils.cpp 3.7
mozilla/parser/htmlparser/src/nsScanner.cpp 3.148
mozilla/gfx/src/windows/nsFontMetricsWin.cpp 3.245
mozilla/layout/forms/nsFormControlHelper.cpp 1.117
mozilla/layout/forms/nsIsIndexFrame.cpp 1.78
mozilla/mailnews/mime/emitters/src/nsMimeHtmlEmitter.cpp 1.85
mozilla/widget/src/gtk/nsGtkIMEHelper.cpp 1.60
mozilla/xpfe/components/filepicker/src/nsFileView.cpp 1.28
mozilla/embedding/tests/mfcembed/components/nsPrintDialogUtil.cpp 1.18
mozilla/widget/src/photon/nsFilePicker.cpp 1.13
mozilla/security/manager/ssl/src/nsCRLInfo.cpp 1.8
mozilla/security/manager/ssl/src/nsCRLManager.cpp 1.13
mozilla/security/manager/ssl/src/nsNSSCertHelper.cpp 1.23
mozilla/security/manager/ssl/src/nsNSSCertValidity.cpp 1.7
mozilla/extensions/spellcheck/src/mozEnglishWordUtils.cpp 1.10
mozilla/extensions/spellcheck/src/mozPersonalDictionary.cpp 1.11
mozilla/browser/components/bookmarks/src/nsBookmarksService.cpp 1.77
mozilla/browser/components/places/src/nsNavHistory.cpp 1.101
mozilla/browser/components/migration/src/nsBrowserProfileMigratorUtils.cpp 1.12
mozilla/browser/components/migration/src/nsIEProfileMigrator.cpp 1.38
mozilla/browser/components/migration/src/nsMacIEProfileMigrator.cpp 1.10
mozilla/browser/components/migration/src/nsOperaProfileMigrator.cpp 1.50
mozilla/browser/components/migration/src/nsSafariProfileMigrator.cpp 1.25
mozilla/content/xslt/src/xslt/txXPathResultComparator.cpp 1.16
mozilla/content/base/src/nsDocument.cpp 3.651
mozilla/content/base/src/nsScriptLoader.cpp 1.93
mozilla/content/base/src/nsXMLHttpRequest.cpp 1.155
mozilla/docshell/base/nsDocShell.cpp 1.796
mozilla/content/xul/templates/src/nsXULContentUtils.cpp 1.77
mozilla/embedding/components/printingui/src/win/nsPrintDialogUtil.cpp 1.28
mozilla/dom/src/base/nsJSEnvironment.cpp 1.281
mozilla/embedding/components/windowwatcher/src/nsPromptService.cpp 1.32
mozilla/extensions/spellcheck/myspell/src/csutil.cpp 1.7
mozilla/extensions/spellcheck/myspell/src/mozMySpell.cpp 1.14
mozilla/gfx/src/ps/nsPostScriptObj.cpp 1.129
mozilla/gfx/src/freetype/nsFreeType.cpp 1.30
mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp 1.285
mozilla/extensions/sql/base/src/mozSqlResult.cpp 1.20
mozilla/gfx/src/os2/nsFontMetricsOS2.cpp 1.129
mozilla/gfx/src/os2/nsOS2Uni.cpp 1.5
mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp 1.363
mozilla/gfx/src/mac/nsMacUnicodeFontInfo.cpp 1.28
mozilla/intl/build/nsI18nModule.cpp 1.15
Attachment #221966 -
Attachment is obsolete: true
Reporter | ||
Comment 21•19 years ago
|
||
Comment on attachment 221970 [details] [diff] [review]
abusers of pref cids
mozilla/gfx/src/windows/nsFontMetricsWin.cpp 3.246
mozilla/widget/src/mac/nsDeviceContextMac.cpp 1.143
mozilla/gfx/src/photon/nsDrawingSurfacePh.cpp 1.51
mozilla/gfx/src/photon/nsDeviceContextSpecPh.cpp 1.35
mozilla/gfx/src/photon/nsDeviceContextPh.cpp 1.68
mozilla/gfx/src/ps/nsPostScriptObj.cpp 1.130
mozilla/gfx/src/mac/nsUnicodeMappingUtil.cpp 1.40
mozilla/gfx/src/mac/nsDeviceContextMac.cpp 1.145
mozilla/gfx/src/os2/nsFontMetricsOS2.cpp 1.130
mozilla/gfx/src/gtk/nsFontMetricsGTK.cpp 1.286
mozilla/gfx/src/gtk/nsDeviceContextGTK.cpp 1.137
mozilla/gfx/src/beos/nsDeviceContextBeOS.cpp 1.35
mozilla/gfx/src/photon/nsFontMetricsPh.cpp 1.72
mozilla/gfx/src/thebes/nsThebesDeviceContext.cpp 1.32
mozilla/profile/pref-migrator/src/nsPrefMigration.cpp 1.205
mozilla/gfx/src/xlib/nsDeviceContextXlib.cpp 1.72
mozilla/widget/src/xpwidgets/nsBaseWidget.cpp 1.145
mozilla/xpfe/browser/src/nsBrowserInstance.cpp 1.282
mozilla/xpfe/components/related/src/nsRelatedLinksHandler.cpp 1.77
Attachment #221970 -
Attachment is obsolete: true
Reporter | ||
Comment 22•19 years ago
|
||
Comment on attachment 221971 [details] [diff] [review]
abusers of mork cids
mozilla/toolkit/components/history/src/nsGlobalHistory.cpp 1.75
mozilla/xpfe/components/history/src/nsGlobalHistory.cpp 1.221
mozilla/camino/src/history/nsSimpleGlobalHistory.cpp 1.25
mozilla/db/mork/build/nsMorkCID.h 1.7
mozilla/db/mork/build/nsMorkFactory.cpp 1.22
mozilla/mailnews/db/msgdb/src/nsMsgDatabase.cpp 1.364
mozilla/mailnews/base/src/nsMsgFolderCache.cpp 1.48
mozilla/mailnews/addrbook/src/nsAddrDatabase.cpp 1.145
mozilla/toolkit/components/satchel/src/nsFormHistory.cpp 1.32
Attachment #221971 -
Attachment is obsolete: true
Reporter | ||
Comment 23•19 years ago
|
||
Comment on attachment 221972 [details] [diff] [review]
abusers of storage cids
mozilla/browser/components/places/src/nsAnnotationService.cpp 1.14
mozilla/storage/test/storage1.cpp 1.8
Attachment #221972 -
Attachment is obsolete: true
Reporter | ||
Comment 24•19 years ago
|
||
Comment on attachment 221973 [details] [diff] [review]
abusers of appshell cids
mozilla/xpfe/bootstrap/appleevents/nsWindowUtils.cpp 1.23
mozilla/rdf/chrome/src/nsChromeRegistry.cpp 1.329
mozilla/dom/src/base/nsGlobalWindow.cpp 1.850
mozilla/dom/src/jsurl/nsJSProtocolHandler.cpp 1.126
mozilla/widget/src/photon/nsWindow.cpp 1.107
Attachment #221973 -
Attachment is obsolete: true
Reporter | ||
Comment 25•19 years ago
|
||
note to self:
next round should rid layout of gfx+widget+plugin cids
i also failed to catch all the l10n items in layout (c.f.
kCStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID in nsImageMap.cpp)
Status: NEW → ASSIGNED
Comment on attachment 221968 [details] [diff] [review]
abusers of dom cids
sr=dbaron
Attachment #221968 -
Flags: superreview?(dbaron) → superreview+
Comment on attachment 221967 [details] [diff] [review]
abusers of layout cids - NS_HTMLEDITOR_CONTACTID needs to be fixed before commiting
sr=dbaron
Attachment #221967 -
Flags: superreview?(dbaron) → superreview+
Updated•16 years ago
|
Target Milestone: --- → Future
Reporter | ||
Comment 29•15 years ago
|
||
this is a current folded version of the previous effort
i've split off a set for mail which i'll post somewhere later
Attachment #221967 -
Attachment is obsolete: true
Attachment #221968 -
Attachment is obsolete: true
Attachment #221969 -
Attachment is obsolete: true
Attachment #497464 -
Flags: review?(dbaron)
Comment on attachment 497464 [details] [diff] [review]
folded
I think this bug report is trying to enforce a bogus notion of modularity.
Whether we're using a CID or a ContractID seems like it should depend on whether we think something should be overridable by extensions. I think it's reasonable to adjust those definitions based on consideration of all the uses of a particular available-by-CID object, but I don't think it makes sense to request review for a mass change like this based on the module boundaries du jour. It's possible bsmedberg has other opinions, though, and it may be worth asking him before proceeding.
Attachment #497464 -
Flags: review?(dbaron) → review-
Attachment #497464 -
Flags: feedback?(benjamin)
Comment 31•14 years ago
|
||
Comment on attachment 497464 [details] [diff] [review]
folded
Yeah, I don't think this kind of mechanical change is useful now. We need to just stop using contracts altogether for a lot of things that are only modular within libxul, not meant for outside consumption.
Attachment #497464 -
Flags: feedback?(benjamin) → feedback-
Comment 32•3 years ago
|
||
The bug assignee is inactive on Bugzilla, so the assignee is being reset.
Assignee: timeless → nobody
Status: ASSIGNED → NEW
I'm going to mark this WONTFIX based on the last few comments.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•