Gecko:Obsolete API

From MozillaWiki
Revision as of 17:13, 11 October 2006 by Dbaron (talk | contribs) (→‎Proposed Obsolete API: NS_GET_IID())
Jump to navigation Jump to search

APIs that are declared as obsolete, by virtue of being on this list have their days numbered in the codebase. They will be removed at some point in the future. Because of this, no new code is allowed to use any of the classes, functions, or types that appear on this list, except if they must conform to an older interface that demands the usage of an obsolete type. Reviewers and superreviewers should become familiar with this list for this reason.

If at all possible, please provide a) a suggested alternate class or function that provides similar functionality; and b) a link to a bug for removing the obsolete API from the codebase. The bug should contain rationale for obsoleting that API. To propose an API for obsolescence, please file a bug and add it to the proposed obsolete API section.

Obsolete API

Proposed Obsolete API

  • NS_GET_IID() and T::GetIID, except when NS_GET_IID is used on a template parameter.
    • Instead, use function templates (like CallQueryInterface) or nsCOMPtr_helpers (like do_QueryInterface) to tie the XPCOM and C++ type systems together rather than casting between the two type systems.