Bug 1964489 - Avoid duplication in NS_DECLARE_STATIC_IID_ACCESSOR / NS_DEFINE_STATIC_IID_ACCESSOR r=nika,necko-reviewers,media-playback-reviewers,places-reviewers,win-reviewers,dom-storage-reviewers,xpcom-reviewers,gstoll,janv,emilio,padenot,valentin,asuth

In modern C++, static constexpr member variables are automatically
inline (aka weak) so the template trick is not needed. This also avoid
duplication and reduces the amount of parsed code. No impact on
generated binary (actually: smaller debuginfo, close to identical
binary).

Differential Revision: https://phabricator.services.mozilla.com/D247825
This commit is contained in:
serge-sans-paille
2025-05-08 07:38:39 +00:00
committed by sguelton@mozilla.com
parent 3a69350af8
commit bf3516e81e
191 changed files with 577 additions and 1493 deletions

View File

@@ -90,7 +90,7 @@ class LocalAccessible : public nsISupports, public Accessible {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(LocalAccessible)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLE_IMPL_IID)
NS_INLINE_DECL_STATIC_IID(NS_ACCESSIBLE_IMPL_IID)
//////////////////////////////////////////////////////////////////////////////
// Public methods
@@ -1034,8 +1034,6 @@ class LocalAccessible : public nsISupports, public Accessible {
LocalAccessible* GetPopoverTargetDetailsRelation() const;
};
NS_DEFINE_STATIC_IID_ACCESSOR(LocalAccessible, NS_ACCESSIBLE_IMPL_IID)
////////////////////////////////////////////////////////////////////////////////
// LocalAccessible downcasting method

View File

@@ -18,12 +18,12 @@ namespace a11y {
class TextRange;
#define NS_ACCESSIBLETEXTRANGE_IMPL_IID \
{ /* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \
0xb17652d9, 0x4f54, 0x4c56, { \
0xbb, 0x62, 0x6d, 0x5b, 0xf1, 0xef, 0x91, 0x0c \
} \
}
#define NS_ACCESSIBLETEXTRANGE_IMPL_IID \
{/* 133c8bf4-4913-4355-bd50-426bd1d6e1ad */ \
0xb17652d9, \
0x4f54, \
0x4c56, \
{0xbb, 0x62, 0x6d, 0x5b, 0xf1, 0xef, 0x91, 0x0c}}
class xpcAccessibleTextRange final : public nsIAccessibleTextRange {
public:
@@ -43,7 +43,7 @@ class xpcAccessibleTextRange final : public nsIAccessibleTextRange {
int32_t* aResult) final;
NS_IMETHOD Crop(nsIAccessible* aContainer, bool* aSuccess) final;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ACCESSIBLETEXTRANGE_IMPL_IID)
NS_INLINE_DECL_STATIC_IID(NS_ACCESSIBLETEXTRANGE_IMPL_IID)
private:
xpcAccessibleTextRange() {}
@@ -69,9 +69,6 @@ class xpcAccessibleTextRange final : public nsIAccessibleTextRange {
int32_t mEndOffset;
};
NS_DEFINE_STATIC_IID_ACCESSOR(xpcAccessibleTextRange,
NS_ACCESSIBLETEXTRANGE_IMPL_IID)
} // namespace a11y
} // namespace mozilla

View File

@@ -24,16 +24,12 @@ class Link;
} // namespace dom
// 0057c9d3-b98e-4933-bdc5-0275d06705e1
#define IHISTORY_IID \
{ \
0x0057c9d3, 0xb98e, 0x4933, { \
0xbd, 0xc5, 0x02, 0x75, 0xd0, 0x67, 0x05, 0xe1 \
} \
}
#define IHISTORY_IID \
{0x0057c9d3, 0xb98e, 0x4933, {0xbd, 0xc5, 0x02, 0x75, 0xd0, 0x67, 0x05, 0xe1}}
class IHistory : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(IHISTORY_IID)
NS_INLINE_DECL_STATIC_IID(IHISTORY_IID)
using ContentParentSet = nsTHashSet<RefPtr<dom::ContentParent>>;
@@ -168,8 +164,6 @@ class IHistory : public nsISupports {
NS_IMETHOD SetURITitle(nsIURI* aURI, const nsAString& aTitle) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(IHistory, IHISTORY_IID)
} // namespace mozilla
#endif // mozilla_IHistory_h_

View File

@@ -11,16 +11,12 @@
#include "Units.h"
// Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
#define NS_ISCROLLOBSERVER_IID \
{ \
0xaa5026eb, 0x2f88, 0x4026, { \
0xa4, 0x6b, 0xf4, 0x59, 0x6b, 0x4e, 0xdf, 0x00 \
} \
}
#define NS_ISCROLLOBSERVER_IID \
{0xaa5026eb, 0x2f88, 0x4026, {0xa4, 0x6b, 0xf4, 0x59, 0x6b, 0x4e, 0xdf, 0x00}}
class nsIScrollObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCROLLOBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCROLLOBSERVER_IID)
/**
* Called when the scroll position of some element has changed.
@@ -40,6 +36,4 @@ class nsIScrollObserver : public nsISupports {
MOZ_CAN_RUN_SCRIPT virtual void AsyncPanZoomStopped() {};
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScrollObserver, NS_ISCROLLOBSERVER_IID)
#endif /* nsIScrollObserver_h___ */

View File

@@ -375,7 +375,7 @@ class SessionHistoryEntry : public nsISHEntry, public nsSupportsWeakReference {
NS_DECL_ISUPPORTS
NS_DECL_NSISHENTRY
NS_DECLARE_STATIC_IID_ACCESSOR(NS_SESSIONHISTORYENTRY_IID)
NS_INLINE_DECL_STATIC_IID(NS_SESSIONHISTORYENTRY_IID)
bool IsInSessionHistory() {
SessionHistoryEntry* entry = this;
@@ -461,8 +461,6 @@ class SessionHistoryEntry : public nsISHEntry, public nsSupportsWeakReference {
static nsTHashMap<nsUint64HashKey, LoadingEntry>* sLoadIdToEntry;
};
NS_DEFINE_STATIC_IID_ACCESSOR(SessionHistoryEntry, NS_SESSIONHISTORYENTRY_IID)
} // namespace dom
namespace ipc {

View File

@@ -18,12 +18,8 @@ template <typename>
struct Nullable;
class WindowProxyHolder;
#define NS_CONTENTFRAMEMESSAGEMANAGER_IID \
{ \
0x97e192a6, 0xab7a, 0x4c8f, { \
0xb7, 0xdd, 0xf7, 0xec, 0x36, 0x38, 0x71, 0xb5 \
} \
}
#define NS_CONTENTFRAMEMESSAGEMANAGER_IID \
{0x97e192a6, 0xab7a, 0x4c8f, {0xb7, 0xdd, 0xf7, 0xec, 0x36, 0x38, 0x71, 0xb5}}
/**
* Base class for implementing the WebIDL ContentFrameMessageManager class.
@@ -34,7 +30,7 @@ class ContentFrameMessageManager : public DOMEventTargetHelper,
using DOMEventTargetHelper::AddRef;
using DOMEventTargetHelper::Release;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_CONTENTFRAMEMESSAGEMANAGER_IID)
NS_INLINE_DECL_STATIC_IID(NS_CONTENTFRAMEMESSAGEMANAGER_IID)
virtual Nullable<WindowProxyHolder> GetContent(ErrorResult& aError) = 0;
virtual already_AddRefed<nsIDocShell> GetDocShell(ErrorResult& aError) = 0;
@@ -54,9 +50,6 @@ class ContentFrameMessageManager : public DOMEventTargetHelper,
MessageManagerGlobal(aMessageManager) {}
};
NS_DEFINE_STATIC_IID_ACCESSOR(ContentFrameMessageManager,
NS_CONTENTFRAMEMESSAGEMANAGER_IID)
} // namespace mozilla::dom
#endif // mozilla_dom_ContentFrameMessageManager_h

View File

@@ -39,16 +39,12 @@ namespace dom {
class GlobalObject;
#define MOZILLA_EXCEPTION_IID \
{ \
0x55eda557, 0xeba0, 0x4fe3, { \
0xae, 0x2e, 0xf3, 0x94, 0x49, 0x23, 0x62, 0xd6 \
} \
}
#define MOZILLA_EXCEPTION_IID \
{0x55eda557, 0xeba0, 0x4fe3, {0xae, 0x2e, 0xf3, 0x94, 0x49, 0x23, 0x62, 0xd6}}
class Exception : public nsIException, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_EXCEPTION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_EXCEPTION_IID)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Exception)
@@ -135,8 +131,6 @@ class Exception : public nsIException, public nsWrapperCache {
JS::Heap<JS::Value> mThrownJSVal;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Exception, MOZILLA_EXCEPTION_IID)
class DOMException : public Exception {
public:
DOMException(nsresult aRv, const nsACString& aMessage,

View File

@@ -73,12 +73,8 @@ class DOMIntersectionObserverEntry final : public nsISupports,
double mIntersectionRatio;
};
#define NS_DOM_INTERSECTION_OBSERVER_IID \
{ \
0x8570a575, 0xe303, 0x4d18, { \
0xb6, 0xb1, 0x4d, 0x2b, 0x49, 0xd8, 0xef, 0x94 \
} \
}
#define NS_DOM_INTERSECTION_OBSERVER_IID \
{0x8570a575, 0xe303, 0x4d18, {0xb6, 0xb1, 0x4d, 0x2b, 0x49, 0xd8, 0xef, 0x94}}
// An input suitable to compute intersections with multiple targets.
struct IntersectionInput {
@@ -119,7 +115,7 @@ class DOMIntersectionObserver final : public nsISupports,
dom::IntersectionCallback& aCb);
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMIntersectionObserver)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_INTERSECTION_OBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOM_INTERSECTION_OBSERVER_IID)
static already_AddRefed<DOMIntersectionObserver> Constructor(
const GlobalObject&, dom::IntersectionCallback&, ErrorResult&);
@@ -210,9 +206,6 @@ class DOMIntersectionObserver final : public nsISupports,
bool mConnected = false;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMIntersectionObserver,
NS_DOM_INTERSECTION_OBSERVER_IID)
} // namespace mozilla::dom
#endif

View File

@@ -577,7 +577,7 @@ class Document : public nsINode,
*/
static void Shutdown();
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENT_IID)
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD_(void) DeleteCycleCollectable() override;
@@ -3710,9 +3710,9 @@ class Document : public nsINode,
// effect once per document, and so is called during document destruction.
void ReportDocumentUseCounters();
// Report the names of the HTMLDocument properties thad had been shadowed using id/name
// and were then accessed ("DOM clobbering").
// This data is collected by nsHTMLDocument::NamedGetter and limited to 10 unique entries.
// Report the names of the HTMLDocument properties thad had been shadowed
// using id/name and were then accessed ("DOM clobbering"). This data is
// collected by nsHTMLDocument::NamedGetter and limited to 10 unique entries.
void ReportShadowedHTMLDocumentProperties();
// Reports largest contentful paint via telemetry. We want the most up to
@@ -5569,8 +5569,8 @@ class Document : public nsINode,
// See SetNotifyFormOrPasswordRemoved and ShouldNotifyFormOrPasswordRemoved.
bool mShouldNotifyFormOrPasswordRemoved;
// Used by the shadowed_html_document_property_access telemetry probe to collected shadowed
// HTMLDocument properties. (Limited to 10 entries)
// Used by the shadowed_html_document_property_access telemetry probe to
// collected shadowed HTMLDocument properties. (Limited to 10 entries)
nsTArray<nsString> mShadowedHTMLDocumentProperties;
// Bitfield to be collected in the pageload event, recording relevant features
@@ -5628,8 +5628,6 @@ class Document : public nsINode,
ErrorResult& aError);
};
NS_DEFINE_STATIC_IID_ACCESSOR(Document, NS_IDOCUMENT_IID)
/**
* mozAutoSubtreeModified batches DOM mutations so that a DOMSubtreeModified
* event is dispatched, if necessary, when the outermost mozAutoSubtreeModified

View File

@@ -4741,8 +4741,8 @@ void Element::ClearDataset() {
template <class T>
void Element::GetCustomInterface(nsGetterAddRefs<T> aResult) {
nsCOMPtr<nsISupports> iface = CustomElementRegistry::CallGetCustomInterface(
this, NS_GET_TEMPLATE_IID(T));
nsCOMPtr<nsISupports> iface =
CustomElementRegistry::CallGetCustomInterface(this, NS_GET_IID(T));
if (iface) {
if (NS_SUCCEEDED(CallQueryInterface(iface, static_cast<T**>(aResult)))) {
return;

View File

@@ -309,7 +309,7 @@ class Element : public FragmentOrElement {
#endif // MOZILLA_INTERNAL_API
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_ELEMENT_IID)
NS_DECL_ADDSIZEOFEXCLUDINGTHIS
@@ -2350,8 +2350,6 @@ class Element : public FragmentOrElement {
AttrArray mAttrs;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Element, NS_ELEMENT_IID)
inline bool Element::HasNonEmptyAttr(int32_t aNameSpaceID,
const nsAtom* aName) const {
MOZ_ASSERT(aNameSpaceID > kNameSpaceID_Unknown, "Must have namespace");

View File

@@ -27,16 +27,12 @@ class Document;
class Element;
struct BindContext;
#define MOZILLA_DOM_LINK_IMPLEMENTATION_IID \
{ \
0xb25edee6, 0xdd35, 0x4f8b, { \
0xab, 0x90, 0x66, 0xd0, 0xbd, 0x3c, 0x22, 0xd5 \
} \
}
#define MOZILLA_DOM_LINK_IMPLEMENTATION_IID \
{0xb25edee6, 0xdd35, 0x4f8b, {0xab, 0x90, 0x66, 0xd0, 0xbd, 0x3c, 0x22, 0xd5}}
class Link : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
enum class State : uint8_t {
Unvisited = 0,
@@ -141,8 +137,6 @@ class Link : public nsISupports {
const bool mHistory : 1;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Link, MOZILLA_DOM_LINK_IMPLEMENTATION_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -402,12 +402,8 @@ class nsAnimationReceiver : public nsMutationReceiver {
AnimationMutation aMutationType);
};
#define NS_DOM_MUTATION_OBSERVER_IID \
{ \
0x0c3b91f8, 0xcc3b, 0x4b08, { \
0x9e, 0xab, 0x07, 0x47, 0xa9, 0xe4, 0x65, 0xb4 \
} \
}
#define NS_DOM_MUTATION_OBSERVER_IID \
{0x0c3b91f8, 0xcc3b, 0x4b08, {0x9e, 0xab, 0x07, 0x47, 0xa9, 0xe4, 0x65, 0xb4}}
class nsDOMMutationObserver final : public nsISupports, public nsWrapperCache {
public:
@@ -422,7 +418,7 @@ class nsDOMMutationObserver final : public nsISupports, public nsWrapperCache {
mId(++sCount) {}
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(nsDOMMutationObserver)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_MUTATION_OBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOM_MUTATION_OBSERVER_IID)
static already_AddRefed<nsDOMMutationObserver> Constructor(
const mozilla::dom::GlobalObject&, mozilla::dom::MutationCallback&,
@@ -571,9 +567,6 @@ class nsDOMMutationObserver final : public nsISupports, public nsWrapperCache {
sCurrentlyHandlingObservers;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsDOMMutationObserver,
NS_DOM_MUTATION_OBSERVER_IID)
class nsAutoMutationBatch {
public:
nsAutoMutationBatch()

View File

@@ -102,12 +102,8 @@ typedef struct _GtkWidget GtkWidget;
#endif
// IID for nsFrameLoader, because some places want to QI to it.
#define NS_FRAMELOADER_IID \
{ \
0x297fd0ea, 0x1b4a, 0x4c9a, { \
0xa4, 0x04, 0xe5, 0x8b, 0xe8, 0x95, 0x10, 0x50 \
} \
}
#define NS_FRAMELOADER_IID \
{0x297fd0ea, 0x1b4a, 0x4c9a, {0xa4, 0x04, 0xe5, 0x8b, 0xe8, 0x95, 0x10, 0x50}}
class nsFrameLoader final : public nsStubMutationObserver,
public mozilla::dom::ipc::MessageManagerCallback,
@@ -137,7 +133,7 @@ class nsFrameLoader final : public nsStubMutationObserver,
const mozilla::dom::NavigationIsolationOptions& aRemotenessOptions,
bool aIsRemote, bool aNetworkCreated, bool aPreserveContext);
NS_DECLARE_STATIC_IID_ACCESSOR(NS_FRAMELOADER_IID)
NS_INLINE_DECL_STATIC_IID(NS_FRAMELOADER_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(nsFrameLoader)
@@ -568,8 +564,6 @@ class nsFrameLoader final : public nsStubMutationObserver,
bool mTabProcessCrashFired : 1;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsFrameLoader, NS_FRAMELOADER_IID)
inline nsISupports* ToSupports(nsFrameLoader* aFrameLoader) {
return aFrameLoader;
}

View File

@@ -25,12 +25,8 @@ struct NavigationIsolationOptions;
} // namespace mozilla
// IID for the FrameLoaderOwner interface
#define NS_FRAMELOADEROWNER_IID \
{ \
0x1b4fd25c, 0x2e57, 0x11e9, { \
0x9e, 0x5a, 0x5b, 0x86, 0xe9, 0x89, 0xa5, 0xc0 \
} \
}
#define NS_FRAMELOADEROWNER_IID \
{0x1b4fd25c, 0x2e57, 0x11e9, {0x9e, 0x5a, 0x5b, 0x86, 0xe9, 0x89, 0xa5, 0xc0}}
// Mixin that handles ownership of nsFrameLoader for Frame elements
// (XULFrameElement, HTMLI/FrameElement, etc...). Manages information when doing
@@ -41,7 +37,7 @@ struct NavigationIsolationOptions;
// nsFrameLoaderOwner to actually implement ISupports for us.
class nsFrameLoaderOwner : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_FRAMELOADEROWNER_IID)
NS_INLINE_DECL_STATIC_IID(NS_FRAMELOADEROWNER_IID)
nsFrameLoaderOwner() = default;
already_AddRefed<nsFrameLoader> GetFrameLoader();
@@ -138,6 +134,4 @@ class nsFrameLoaderOwner : public nsISupports {
mozilla::LinkedList<nsFrameLoader> mFrameLoaderList;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsFrameLoaderOwner, NS_FRAMELOADEROWNER_IID)
#endif // nsFrameLoaderOwner_h_

View File

@@ -1812,7 +1812,7 @@ void nsGlobalWindowOuter::SetInitialPrincipal(
class WindowStateHolder final : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(WINDOWSTATEHOLDER_IID)
NS_INLINE_DECL_STATIC_IID(WINDOWSTATEHOLDER_IID)
NS_DECL_ISUPPORTS
explicit WindowStateHolder(nsGlobalWindowInner* aWindow);
@@ -1833,8 +1833,6 @@ class WindowStateHolder final : public nsISupports {
JS::PersistentRooted<JSObject*> mInnerWindowReflector;
};
NS_DEFINE_STATIC_IID_ACCESSOR(WindowStateHolder, WINDOWSTATEHOLDER_IID)
WindowStateHolder::WindowStateHolder(nsGlobalWindowInner* aWindow)
: mInnerWindow(aWindow),
mInnerWindowReflector(RootingCx(), aWindow->GetWrapper()) {

View File

@@ -12,24 +12,18 @@ namespace mozilla::dom {
class Animation;
} // namespace mozilla::dom
#define NS_IANIMATION_OBSERVER_IID \
{ \
0xed025fc7, 0xdeda, 0x48b9, { \
0x9c, 0x35, 0xf2, 0xb6, 0x1e, 0xeb, 0xd0, 0x8d \
} \
}
#define NS_IANIMATION_OBSERVER_IID \
{0xed025fc7, 0xdeda, 0x48b9, {0x9c, 0x35, 0xf2, 0xb6, 0x1e, 0xeb, 0xd0, 0x8d}}
class nsIAnimationObserver : public nsIMutationObserver {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IANIMATION_OBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IANIMATION_OBSERVER_IID)
virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) = 0;
virtual void AnimationChanged(mozilla::dom::Animation* aAnimation) = 0;
virtual void AnimationRemoved(mozilla::dom::Animation* aAnimation) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIAnimationObserver, NS_IANIMATION_OBSERVER_IID)
#define NS_DECL_NSIANIMATIONOBSERVER_ANIMATIONADDED \
virtual void AnimationAdded(mozilla::dom::Animation* aAnimation) override;

View File

@@ -73,7 +73,7 @@ class nsIContent : public nsINode {
}
#endif // MOZILLA_INTERNAL_API
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_ICONTENT_IID)
NS_DECL_ISUPPORTS_INHERITED
NS_IMETHOD_(void) DeleteCycleCollectable(void) final;
@@ -772,6 +772,4 @@ class nsIContent : public nsINode {
NON_VIRTUAL_ADDREF_RELEASE(nsIContent)
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContent, NS_ICONTENT_IID)
#endif /* nsIContent_h___ */

View File

@@ -18,17 +18,13 @@ class Element;
} // namespace dom
} // namespace mozilla
#define NS_IDOCUMENT_OBSERVER_IID \
{ \
0x71041fa3, 0x6dd7, 0x4cde, { \
0xbb, 0x76, 0xae, 0xcc, 0x69, 0xe1, 0x75, 0x78 \
} \
}
#define NS_IDOCUMENT_OBSERVER_IID \
{0x71041fa3, 0x6dd7, 0x4cde, {0xbb, 0x76, 0xae, 0xcc, 0x69, 0xe1, 0x75, 0x78}}
// Document observer interface
class nsIDocumentObserver : public nsIMutationObserver {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_OBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENT_OBSERVER_IID)
/**
* Notify that a content model update is beginning. This call can be
@@ -73,8 +69,6 @@ class nsIDocumentObserver : public nsIMutationObserver {
mozilla::dom::ElementState) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentObserver, NS_IDOCUMENT_OBSERVER_IID)
#define NS_DECL_NSIDOCUMENTOBSERVER_BEGINUPDATE \
virtual void BeginUpdate(mozilla::dom::Document*) override;

View File

@@ -88,7 +88,7 @@ class nsIGlobalObject : public nsISupports {
public:
using RTPCallerType = mozilla::RTPCallerType;
using RFPTarget = mozilla::RFPTarget;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IGLOBALOBJECT_IID)
NS_INLINE_DECL_STATIC_IID(NS_IGLOBALOBJECT_IID)
/**
* This check is added to deal with Promise microtask queues. On the main
@@ -414,6 +414,4 @@ class nsIGlobalObject : public nsISupports {
RefPtr<mozilla::dom::Function> mByteLengthQueuingStrategySizeFunction;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIGlobalObject, NS_IGLOBALOBJECT_IID)
#endif // nsIGlobalObject_h__

View File

@@ -110,7 +110,7 @@ class nsIMutationObserver
friend struct mozilla::GetDoublyLinkedListElement<nsIMutationObserver>;
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMUTATION_OBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IMUTATION_OBSERVER_IID)
/**
* Notification that the node value of a data node (text, cdata, pi, comment)
@@ -339,8 +339,6 @@ class nsIMutationObserver
uint32_t mEnabledCallbacks = kAll;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIMutationObserver, NS_IMUTATION_OBSERVER_IID)
#define NS_DECL_NSIMUTATIONOBSERVER_CHARACTERDATAWILLCHANGE \
virtual void CharacterDataWillChange( \
nsIContent* aContent, const CharacterDataChangeInfo& aInfo) override;

View File

@@ -382,7 +382,7 @@ class nsINode : public mozilla::dom::EventTarget {
template <class T>
using Sequence = mozilla::dom::Sequence<T>;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODE_IID)
NS_INLINE_DECL_STATIC_IID(NS_INODE_IID)
// The |aNodeSize| outparam on this function is where the actual node size
// value is put. It gets added to the appropriate value within |aSizes| by
@@ -2624,8 +2624,6 @@ inline nsINode* NODE_FROM(C& aContent, D& aDocument) {
return static_cast<nsINode*>(aDocument);
}
NS_DEFINE_STATIC_IID_ACCESSOR(nsINode, NS_INODE_IID)
inline nsISupports* ToSupports(nsINode* aPointer) { return aPointer; }
// Some checks are faster to do on nsIContent or Element than on

View File

@@ -12,12 +12,8 @@
#include "nsIContent.h"
// IID for the nsINodeList interface
#define NS_INODELIST_IID \
{ \
0xadb5e54c, 0x6e96, 0x4102, { \
0x8d, 0x40, 0xe0, 0x12, 0x3d, 0xcf, 0x48, 0x7a \
} \
}
#define NS_INODELIST_IID \
{0xadb5e54c, 0x6e96, 0x4102, {0x8d, 0x40, 0xe0, 0x12, 0x3d, 0xcf, 0x48, 0x7a}}
class nsIContent;
class nsINode;
@@ -27,7 +23,7 @@ class nsINode;
*/
class nsINodeList : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INODELIST_IID)
NS_INLINE_DECL_STATIC_IID(NS_INODELIST_IID)
/**
* Get the index of the given node in the list. Will return -1 if the node
@@ -49,6 +45,4 @@ class nsINodeList : public nsISupports, public nsWrapperCache {
}
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsINodeList, NS_INODELIST_IID)
#endif /* nsINodeList_h___ */

View File

@@ -18,12 +18,8 @@
class nsIScriptGlobalObject;
// Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
#define NS_ISCRIPTCONTEXT_IID \
{ \
0x54cbe9cf, 0x7282, 0x421a, { \
0x91, 0x6f, 0xd0, 0x70, 0x73, 0xde, 0xb8, 0xc0 \
} \
}
#define NS_ISCRIPTCONTEXT_IID \
{0x54cbe9cf, 0x7282, 0x421a, {0x91, 0x6f, 0xd0, 0x70, 0x73, 0xde, 0xb8, 0xc0}}
class nsIOffThreadScriptReceiver;
@@ -33,7 +29,7 @@ class nsIOffThreadScriptReceiver;
*/
class nsIScriptContext : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTCONTEXT_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTCONTEXT_IID)
/**
* Return the global object.
@@ -65,18 +61,12 @@ class nsIScriptContext : public nsISupports {
virtual JSObject* GetWindowProxy() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptContext, NS_ISCRIPTCONTEXT_IID)
#define NS_IOFFTHREADSCRIPTRECEIVER_IID \
{ \
0x3a980010, 0x878d, 0x46a9, { \
0x93, 0xad, 0xbc, 0xfd, 0xd3, 0x8e, 0xa0, 0xc2 \
} \
}
#define NS_IOFFTHREADSCRIPTRECEIVER_IID \
{0x3a980010, 0x878d, 0x46a9, {0x93, 0xad, 0xbc, 0xfd, 0xd3, 0x8e, 0xa0, 0xc2}}
class nsIOffThreadScriptReceiver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IOFFTHREADSCRIPTRECEIVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IOFFTHREADSCRIPTRECEIVER_IID)
/**
* Notify this object that a previous Compile call specifying this as
@@ -87,7 +77,4 @@ class nsIOffThreadScriptReceiver : public nsISupports {
nsresult aStatus) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIOffThreadScriptReceiver,
NS_IOFFTHREADSCRIPTRECEIVER_IID)
#endif // nsIScriptContext_h__

View File

@@ -30,12 +30,8 @@ MOZ_CAN_RUN_SCRIPT_BOUNDARY bool NS_HandleScriptError(
const mozilla::dom::ErrorEventInit& aErrorEvent, nsEventStatus* aStatus);
// Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
#define NS_ISCRIPTGLOBALOBJECT_IID \
{ \
0x876f83bd, 0x6314, 0x460a, { \
0xa0, 0x45, 0x1c, 0x8f, 0x46, 0x2f, 0xb8, 0xe1 \
} \
}
#define NS_ISCRIPTGLOBALOBJECT_IID \
{0x876f83bd, 0x6314, 0x460a, {0xa0, 0x45, 0x1c, 0x8f, 0x46, 0x2f, 0xb8, 0xe1}}
/**
* The global object which keeps a script context for each supported script
@@ -46,7 +42,7 @@ MOZ_CAN_RUN_SCRIPT_BOUNDARY bool NS_HandleScriptError(
class nsIScriptGlobalObject : public nsIGlobalObject {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTGLOBALOBJECT_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTGLOBALOBJECT_IID)
/**
* Ensure that the script global object is initialized for working with the
@@ -79,6 +75,4 @@ class nsIScriptGlobalObject : public nsIGlobalObject {
virtual ~nsIScriptGlobalObject() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptGlobalObject, NS_ISCRIPTGLOBALOBJECT_IID)
#endif

View File

@@ -11,19 +11,15 @@
class nsIPrincipal;
#define NS_ISCRIPTOBJECTPRINCIPAL_IID \
{ \
0x3eedba38, 0x8d22, 0x41e1, { \
0x81, 0x7a, 0x0e, 0x43, 0xe1, 0x65, 0xb6, 0x64 \
} \
}
#define NS_ISCRIPTOBJECTPRINCIPAL_IID \
{0x3eedba38, 0x8d22, 0x41e1, {0x81, 0x7a, 0x0e, 0x43, 0xe1, 0x65, 0xb6, 0x64}}
/**
* JS Object Principal information.
*/
class nsIScriptObjectPrincipal : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTOBJECTPRINCIPAL_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTOBJECTPRINCIPAL_IID)
virtual nsIPrincipal* GetPrincipal() = 0;
@@ -34,7 +30,4 @@ class nsIScriptObjectPrincipal : public nsISupports {
virtual nsIPrincipal* PartitionedPrincipal() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptObjectPrincipal,
NS_ISCRIPTOBJECTPRINCIPAL_IID)
#endif // nsIScriptObjectPrincipal_h__

View File

@@ -10,12 +10,8 @@
#include "mozilla/MemoryReporting.h"
#include "nsISupports.h"
#define NS_ISIZEOFEVENTTARGET_IID \
{ \
0xa1e08cb9, 0x5455, 0x4593, { \
0xb4, 0x1f, 0x38, 0x7a, 0x85, 0x44, 0xd0, 0xb5 \
} \
}
#define NS_ISIZEOFEVENTTARGET_IID \
{0xa1e08cb9, 0x5455, 0x4593, {0xb4, 0x1f, 0x38, 0x7a, 0x85, 0x44, 0xd0, 0xb5}}
/**
* This class is much the same as nsISizeOf, but is specifically for measuring
@@ -27,7 +23,7 @@
*/
class nsISizeOfEventTarget : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISIZEOFEVENTTARGET_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISIZEOFEVENTTARGET_IID)
/**
* Measures the size of the things pointed to by the object, plus the object
@@ -37,6 +33,4 @@ class nsISizeOfEventTarget : public nsISupports {
mozilla::MallocSizeOf aMallocSizeOf) const = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsISizeOfEventTarget, NS_ISIZEOFEVENTTARGET_IID)
#endif /* nsISizeOfEventTarget_h___ */

View File

@@ -198,22 +198,16 @@ class AsyncErrorReporter final : public mozilla::Runnable {
// supports this interface, JS can reach directly in for the argv, and avoid
// nsISupports conversion. If this interface is not supported, the object will
// be queried for nsIArray, and everything converted via xpcom objects.
#define NS_IJSARGARRAY_IID \
{ \
0xb6acdac8, 0xf5c6, 0x432c, { \
0xa8, 0x6e, 0x33, 0xee, 0xb1, 0xb0, 0xcd, 0xdc \
} \
}
#define NS_IJSARGARRAY_IID \
{0xb6acdac8, 0xf5c6, 0x432c, {0xa8, 0x6e, 0x33, 0xee, 0xb1, 0xb0, 0xcd, 0xdc}}
class nsIJSArgArray : public nsIArray {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IJSARGARRAY_IID)
NS_INLINE_DECL_STATIC_IID(NS_IJSARGARRAY_IID)
// Bug 312003 describes why this must be "void **", but after calling argv
// may be cast to JS::Value* and the args found at:
// ((JS::Value*)argv)[0], ..., ((JS::Value*)argv)[argc - 1]
virtual nsresult GetArgs(uint32_t* argc, void** argv) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIJSArgArray, NS_IJSARGARRAY_IID)
#endif /* nsJSEnvironment_h */

View File

@@ -103,7 +103,7 @@ class nsPIDOMWindowInner : public mozIDOMWindow {
~nsPIDOMWindowInner();
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOWINNER_IID)
NS_INLINE_DECL_STATIC_IID(NS_PIDOMWINDOWINNER_IID)
nsIGlobalObject* AsGlobal();
const nsIGlobalObject* AsGlobal() const;
@@ -743,8 +743,6 @@ class nsPIDOMWindowInner : public mozIDOMWindow {
RefPtr<mozilla::dom::CloseWatcherManager> mCloseWatcherManager;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsPIDOMWindowInner, NS_PIDOMWINDOWINNER_IID)
class nsPIDOMWindowOuter : public mozIDOMWindowProxy {
protected:
using Document = mozilla::dom::Document;
@@ -756,7 +754,7 @@ class nsPIDOMWindowOuter : public mozIDOMWindowProxy {
void NotifyResumingDelayedMedia();
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOWOUTER_IID)
NS_INLINE_DECL_STATIC_IID(NS_PIDOMWINDOWOUTER_IID)
NS_IMPL_FROMEVENTTARGET_HELPER_WITH_GETTER(nsPIDOMWindowOuter,
GetAsOuterWindow())
@@ -1144,8 +1142,6 @@ class nsPIDOMWindowOuter : public mozIDOMWindowProxy {
uint32_t mMarkedCCGeneration;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsPIDOMWindowOuter, NS_PIDOMWINDOWOUTER_IID)
#include "nsPIDOMWindowInlines.h"
#endif // nsPIDOMWindow_h__

View File

@@ -16,16 +16,12 @@ class nsIController;
class nsINode;
class nsIRemoteTab;
#define NS_IWINDOWROOT_IID \
{ \
0xb8724c49, 0xc398, 0x4f9b, { \
0x82, 0x59, 0x87, 0x27, 0xa6, 0x47, 0xdd, 0x0f \
} \
}
#define NS_IWINDOWROOT_IID \
{0xb8724c49, 0xc398, 0x4f9b, {0x82, 0x59, 0x87, 0x27, 0xa6, 0x47, 0xdd, 0x0f}}
class nsPIWindowRoot : public mozilla::dom::EventTarget {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IWINDOWROOT_IID)
NS_INLINE_DECL_STATIC_IID(NS_IWINDOWROOT_IID)
bool IsRootWindow() const final { return true; }
@@ -91,6 +87,4 @@ inline const nsPIWindowRoot* EventTarget::AsWindowRoot() const {
} // namespace mozilla::dom
NS_DEFINE_STATIC_IID_ACCESSOR(nsPIWindowRoot, NS_IWINDOWROOT_IID)
#endif // nsPIWindowRoot_h__

View File

@@ -23,12 +23,8 @@ struct MutationClosureData;
} // namespace mozilla
// IID for nsStyledElement interface
#define NS_STYLED_ELEMENT_IID \
{ \
0xacbd9ea6, 0x15aa, 0x4f37, { \
0x8c, 0xe0, 0x35, 0x1e, 0xd7, 0x21, 0xca, 0xe9 \
} \
}
#define NS_STYLED_ELEMENT_IID \
{0xacbd9ea6, 0x15aa, 0x4f37, {0x8c, 0xe0, 0x35, 0x1e, 0xd7, 0x21, 0xca, 0xe9}}
using nsStyledElementBase = mozilla::dom::Element;
@@ -54,7 +50,7 @@ class nsStyledElement : public nsStyledElementBase {
nsICSSDeclaration* Style();
NS_DECLARE_STATIC_IID_ACCESSOR(NS_STYLED_ELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_STYLED_ELEMENT_IID)
NS_IMPL_FROMNODE_HELPER(nsStyledElement, IsStyledElement());
bool IsStyledElement() const final { return true; }
@@ -95,5 +91,4 @@ class nsStyledElement : public nsStyledElementBase {
const nsAttrValue* aValue, bool aNotify) override;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsStyledElement, NS_STYLED_ELEMENT_IID)
#endif // __NS_STYLEDELEMENT_H_

View File

@@ -84,7 +84,7 @@ static_assert(sizeof(void*) == 4, "Only support 32-bit and 64-bit");
class JS_HAZ_ROOTED nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_WRAPPERCACHE_IID)
NS_INLINE_DECL_STATIC_IID(NS_WRAPPERCACHE_IID)
nsWrapperCache() = default;
~nsWrapperCache() {
@@ -412,8 +412,6 @@ class JS_HAZ_ROOTED nsWrapperCache {
enum { WRAPPER_CACHE_FLAGS_BITS_USED = 1 };
NS_DEFINE_STATIC_IID_ACCESSOR(nsWrapperCache, NS_WRAPPERCACHE_IID)
#define NS_WRAPPERCACHE_INTERFACE_TABLE_ENTRY \
if (aIID.Equals(NS_GET_IID(nsWrapperCache))) { \
*aInstancePtr = static_cast<nsWrapperCache*>(this); \

View File

@@ -82,7 +82,7 @@ nsresult UnwrapArgImpl(JSContext* cx, JS::Handle<JSObject*> src,
template <class Interface>
inline nsresult UnwrapArg(JSContext* cx, JS::Handle<JSObject*> src,
Interface** ppArg) {
return UnwrapArgImpl(cx, src, NS_GET_TEMPLATE_IID(Interface),
return UnwrapArgImpl(cx, src, NS_GET_IID(Interface),
reinterpret_cast<void**>(ppArg));
}

View File

@@ -310,7 +310,7 @@ class CallbackObject : public nsISupports,
public CallbackObjectBase,
public JSHolderBase {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(DOM_CALLBACKOBJECT_IID)
NS_INLINE_DECL_STATIC_IID(DOM_CALLBACKOBJECT_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SKIPPABLE_SCRIPT_HOLDER_CLASS(CallbackObject)
@@ -566,7 +566,7 @@ class CallbackObjectHolder : CallbackObjectHolderBase {
}
nsCOMPtr<nsISupports> supp = CallbackObjectHolderBase::ToXPCOMCallback(
GetWebIDLCallback(), NS_GET_TEMPLATE_IID(XPCOMCallbackT));
GetWebIDLCallback(), NS_GET_IID(XPCOMCallbackT));
if (supp) {
// ToXPCOMCallback already did the right QI for us.
return supp.forget().downcast<XPCOMCallbackT>();
@@ -600,8 +600,6 @@ class CallbackObjectHolder : CallbackObjectHolderBase {
uintptr_t mPtrBits;
};
NS_DEFINE_STATIC_IID_ACCESSOR(CallbackObject, DOM_CALLBACKOBJECT_IID)
template <class T, class U>
inline void ImplCycleCollectionTraverse(
nsCycleCollectionTraversalCallback& aCallback,

View File

@@ -25,7 +25,7 @@
#include "mozilla/dom/BindingUtils.h" // for MaybeWrapValue, MaybeWrapObjectOrNullValue, XPCOMObjectToJsval, GetOrCreateDOMReflector
#include "mozilla/dom/CallbackObject.h" // for CallbackObject
#include "mozilla/dom/Record.h"
#include "nsID.h" // for NS_GET_TEMPLATE_IID, nsIID
#include "nsID.h" // for NS_GET_IID, nsIID
#include "nsISupports.h" // for nsISupports
#include "nsStringFwd.h" // for nsAString
#include "nsTArrayForwardDeclare.h"
@@ -247,8 +247,7 @@ ToJSValue(JSContext* aCx, T& aArgument, JS::MutableHandle<JS::Value> aValue) {
xpcObjectHelper helper(ToSupports(&aArgument));
JS::Rooted<JSObject*> scope(aCx, JS::CurrentGlobalOrNull(aCx));
const nsIID& iid =
NS_GET_TEMPLATE_IID(binding_detail::ScriptableInterfaceType<T>);
const nsIID& iid = NS_GET_IID(binding_detail::ScriptableInterfaceType<T>);
return XPCOMObjectToJsval(aCx, scope, helper, &iid, true, aValue);
}

View File

@@ -43,27 +43,22 @@ namespace dom {
class nsRenamedInterface : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID)
NS_INLINE_DECL_STATIC_IID(NS_RENAMED_INTERFACE_IID)
NS_DECL_ISUPPORTS
// We need a GetParentObject to make binding codegen happy
virtual nsISupports* GetParentObject();
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsRenamedInterface, NS_RENAMED_INTERFACE_IID)
// IID for the TestExternalInterface
#define NS_TEST_EXTERNAL_INTERFACE_IID \
{0xd5ba0c99, 0x9b1d, 0x4e71, {0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d}}
class TestExternalInterface : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID)
NS_INLINE_DECL_STATIC_IID(NS_TEST_EXTERNAL_INTERFACE_IID)
NS_DECL_ISUPPORTS
};
NS_DEFINE_STATIC_IID_ACCESSOR(TestExternalInterface,
NS_TEST_EXTERNAL_INTERFACE_IID)
class TestNonWrapperCacheInterface : public nsISupports {
public:
NS_DECL_ISUPPORTS

View File

@@ -25,12 +25,8 @@ class CacheReadStream;
class PCacheStreamControlParent;
// IID for the dom::cache::ReadStream interface
#define NS_DOM_CACHE_READSTREAM_IID \
{ \
0x8e5da7c9, 0x0940, 0x4f1d, { \
0x97, 0x25, 0x5c, 0x59, 0x38, 0xdd, 0xb9, 0x9f \
} \
}
#define NS_DOM_CACHE_READSTREAM_IID \
{0x8e5da7c9, 0x0940, 0x4f1d, {0x97, 0x25, 0x5c, 0x59, 0x38, 0xdd, 0xb9, 0x9f}}
// Custom stream class for Request and Response bodies being read from
// a Cache. The main purpose of this class is to report back to the
@@ -92,13 +88,11 @@ class ReadStream final : public nsIInputStream {
public:
explicit ReadStream(SafeRefPtr<ReadStream::Inner> aInner);
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_CACHE_READSTREAM_IID);
NS_INLINE_DECL_STATIC_IID(NS_DOM_CACHE_READSTREAM_IID);
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
};
NS_DEFINE_STATIC_IID_ACCESSOR(ReadStream, NS_DOM_CACHE_READSTREAM_IID);
} // namespace dom::cache
} // namespace mozilla

View File

@@ -24,12 +24,8 @@
#include "mozilla/WeakPtr.h"
#include "mozilla/layers/LayersSurfaces.h"
#define NS_ICANVASRENDERINGCONTEXTINTERNAL_IID \
{ \
0xb84f2fed, 0x9d4b, 0x430b, { \
0xbd, 0xfb, 0x85, 0x57, 0x8a, 0xc2, 0xb4, 0x4b \
} \
}
#define NS_ICANVASRENDERINGCONTEXTINTERNAL_IID \
{0xb84f2fed, 0x9d4b, 0x430b, {0xbd, 0xfb, 0x85, 0x57, 0x8a, 0xc2, 0xb4, 0x4b}}
class nsICookieJarSettings;
class nsIDocShell;
@@ -70,7 +66,7 @@ class nsICanvasRenderingContextInternal : public nsISupports,
using CanvasRenderer = mozilla::layers::CanvasRenderer;
using WebRenderCanvasData = mozilla::layers::WebRenderCanvasData;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICANVASRENDERINGCONTEXTINTERNAL_IID)
NS_INLINE_DECL_STATIC_IID(NS_ICANVASRENDERINGCONTEXTINTERNAL_IID)
nsICanvasRenderingContextInternal();
@@ -240,7 +236,4 @@ class nsICanvasRenderingContextInternal : public nsISupports,
RefPtr<nsRefreshDriver> mRefreshDriver;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICanvasRenderingContextInternal,
NS_ICANVASRENDERINGCONTEXTINTERNAL_IID)
#endif /* nsICanvasRenderingContextInternal_h___ */

View File

@@ -13,12 +13,8 @@
#include "nsTArrayForwardDeclare.h"
// Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
#define NS_NSICONSOLEREPORTCOLLECTOR_IID \
{ \
0xdd98a481, 0xd2c4, 0x4203, { \
0x8d, 0xfa, 0x85, 0xbf, 0xd7, 0xdc, 0xd7, 0x05 \
} \
}
#define NS_NSICONSOLEREPORTCOLLECTOR_IID \
{0xdd98a481, 0xd2c4, 0x4203, {0x8d, 0xfa, 0x85, 0xbf, 0xd7, 0xdc, 0xd7, 0x05}}
namespace mozilla::net {
class ConsoleReportCollected;
@@ -28,7 +24,7 @@ class ConsoleReportCollected;
// window at a later time.
class NS_NO_VTABLE nsIConsoleReportCollector : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_NSICONSOLEREPORTCOLLECTOR_IID)
NS_INLINE_DECL_STATIC_IID(NS_NSICONSOLEREPORTCOLLECTOR_IID)
// Add a pending report to be later displayed on the console. This may be
// called from any thread.
@@ -126,7 +122,4 @@ class NS_NO_VTABLE nsIConsoleReportCollector : public nsISupports {
virtual void ClearConsoleReports() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIConsoleReportCollector,
NS_NSICONSOLEREPORTCOLLECTOR_IID)
#endif // nsIConsoleReportCollector_h

View File

@@ -38,12 +38,8 @@ class Event;
enum class CallerType : uint32_t;
} // namespace dom
#define NS_DOMEVENTTARGETHELPER_IID \
{ \
0xa28385c6, 0x9451, 0x4d7e, { \
0xa3, 0xdd, 0xf4, 0xb6, 0x87, 0x2f, 0xa4, 0x76 \
} \
}
#define NS_DOMEVENTTARGETHELPER_IID \
{0xa28385c6, 0x9451, 0x4d7e, {0xa3, 0xdd, 0xf4, 0xb6, 0x87, 0x2f, 0xa4, 0x76}}
class DOMEventTargetHelper : public dom::EventTarget,
public GlobalTeardownObserver {
@@ -73,7 +69,7 @@ class DOMEventTargetHelper : public dom::EventTarget,
nsresult PostHandleEvent(EventChainPostVisitor& aVisitor) override;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOMEVENTTARGETHELPER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOMEVENTTARGETHELPER_IID)
nsIGlobalObject* GetOwnerGlobal() const override {
return GlobalTeardownObserver::GetOwnerGlobal();
@@ -147,8 +143,6 @@ class DOMEventTargetHelper : public dom::EventTarget,
bool mIsKeptAlive = false;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMEventTargetHelper, NS_DOMEVENTTARGETHELPER_IID)
} // namespace mozilla
// WebIDL event handlers

View File

@@ -47,19 +47,15 @@ template <typename T>
class Optional;
class WindowContext;
#define NS_DATATRANSFER_IID \
{ \
0x6c5f90d1, 0xa886, 0x42c8, { \
0x85, 0x06, 0x10, 0xbe, 0x5c, 0x0d, 0xc6, 0x77 \
} \
}
#define NS_DATATRANSFER_IID \
{0x6c5f90d1, 0xa886, 0x42c8, {0x85, 0x06, 0x10, 0xbe, 0x5c, 0x0d, 0xc6, 0x77}}
/**
* See <https://html.spec.whatwg.org/multipage/dnd.html#datatransfer>.
*/
class DataTransfer final : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DATATRANSFER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DATATRANSFER_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@@ -558,8 +554,6 @@ class DataTransfer final : public nsISupports, public nsWrapperCache {
bool mShowFailAnimation = true;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DataTransfer, NS_DATATRANSFER_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -70,7 +70,7 @@ struct EventInit;
class Event : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_EVENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_EVENT_IID)
Event(EventTarget* aOwner, nsPresContext* aPresContext, WidgetEvent* aEvent);
explicit Event(nsPIDOMWindowInner* aWindow);
@@ -492,8 +492,6 @@ class MOZ_STACK_CLASS WantsPopupControlCheck {
bool mOriginalWantsPopupControlCheck;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Event, NS_EVENT_IID)
} // namespace mozilla::dom
already_AddRefed<mozilla::dom::Event> NS_NewDOMEvent(

View File

@@ -41,16 +41,12 @@ enum class CallerType : uint32_t;
enum class EventCallbackDebuggerNotificationType : uint8_t;
// IID for the dom::EventTarget interface
#define NS_EVENTTARGET_IID \
{ \
0xde651c36, 0x0053, 0x4c67, { \
0xb1, 0x3d, 0x67, 0xb9, 0x40, 0xfc, 0x82, 0xe4 \
} \
}
#define NS_EVENTTARGET_IID \
{0xde651c36, 0x0053, 0x4c67, {0xb1, 0x3d, 0x67, 0xb9, 0x40, 0xfc, 0x82, 0xe4}}
class EventTarget : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_EVENTTARGET_IID)
NS_INLINE_DECL_STATIC_IID(NS_EVENTTARGET_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
@@ -364,8 +360,6 @@ class EventTarget : public nsISupports, public nsWrapperCache {
const Nullable<bool>& aWantsUntrusted);
};
NS_DEFINE_STATIC_IID_ACCESSOR(EventTarget, NS_EVENTTARGET_IID)
#define NS_IMPL_FROMEVENTTARGET_GENERIC(_class, _check, _const) \
template <typename T> \
static auto FromEventTarget(_const T& aEventTarget) \

View File

@@ -144,16 +144,12 @@ class TypedEventHandler {
* is expected to call Disconnect()!
*/
#define NS_JSEVENTHANDLER_IID \
{ \
0x4f486881, 0x1956, 0x4079, { \
0x8c, 0xa0, 0xf3, 0xbd, 0x60, 0x5c, 0xc2, 0x79 \
} \
}
#define NS_JSEVENTHANDLER_IID \
{0x4f486881, 0x1956, 0x4079, {0x8c, 0xa0, 0xf3, 0xbd, 0x60, 0x5c, 0xc2, 0x79}}
class JSEventHandler : public nsIDOMEventListener {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_JSEVENTHANDLER_IID)
NS_INLINE_DECL_STATIC_IID(NS_JSEVENTHANDLER_IID)
JSEventHandler(dom::EventTarget* aTarget, nsAtom* aType,
const TypedEventHandler& aTypedHandler);
@@ -216,8 +212,6 @@ class JSEventHandler : public nsIDOMEventListener {
TypedEventHandler mTypedHandler;
};
NS_DEFINE_STATIC_IID_ACCESSOR(JSEventHandler, NS_JSEVENTHANDLER_IID)
} // namespace mozilla
/**

View File

@@ -30,18 +30,14 @@ class Promise;
class ReadableStream;
#define NS_DOM_BLOB_IID \
{ \
0x648c2a83, 0xbdb1, 0x4a7d, { \
0xb5, 0x0a, 0xca, 0xcd, 0x92, 0x87, 0x45, 0xc2 \
} \
}
#define NS_DOM_BLOB_IID \
{0x648c2a83, 0xbdb1, 0x4a7d, {0xb5, 0x0a, 0xca, 0xcd, 0x92, 0x87, 0x45, 0xc2}}
class Blob : public nsSupportsWeakReference, public nsWrapperCache {
public:
NS_DECL_CYCLE_COLLECTING_ISUPPORTS_FINAL
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(Blob)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_BLOB_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOM_BLOB_IID)
using BlobPart = OwningArrayBufferViewOrArrayBufferOrBlobOrUTF8String;
@@ -146,8 +142,6 @@ class Blob : public nsSupportsWeakReference, public nsWrapperCache {
nsCOMPtr<nsIGlobalObject> mGlobal;
};
NS_DEFINE_STATIC_IID_ACCESSOR(Blob, NS_DOM_BLOB_IID)
// Override BindingJSObjectMallocBytes for blobs to tell the JS GC how much
// memory is held live by the binding object.
size_t BindingJSObjectMallocBytes(Blob* aBlob);

View File

@@ -10,12 +10,8 @@
#include "nsISupports.h"
#include "nsString.h"
#define BLOBIMPL_IID \
{ \
0xbccb3275, 0x6778, 0x4ac5, { \
0xaf, 0x03, 0x90, 0xed, 0x37, 0xad, 0xdf, 0x5d \
} \
}
#define BLOBIMPL_IID \
{0xbccb3275, 0x6778, 0x4ac5, {0xaf, 0x03, 0x90, 0xed, 0x37, 0xad, 0xdf, 0x5d}}
class nsIInputStream;
@@ -32,7 +28,7 @@ class Optional;
// because this class must be ref-counted and it has to work with IPC.
class BlobImpl : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(BLOBIMPL_IID)
NS_INLINE_DECL_STATIC_IID(BLOBIMPL_IID)
NS_DECL_THREADSAFE_ISUPPORTS
BlobImpl() = default;
@@ -106,8 +102,6 @@ class BlobImpl : public nsISupports {
virtual ~BlobImpl() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(BlobImpl, BLOBIMPL_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -36,12 +36,8 @@ extern const uint64_t kUnknownSize;
class FileReaderDecreaseBusyCounter;
// 26a79031-c94b-47e9-850a-f04fe17bc026
#define FILEREADER_ID \
{ \
0x26a79031, 0xc94b, 0x47e9, { \
0x85, 0x0a, 0xf0, 0x4f, 0xe1, 0x7b, 0xc0, 0x26 \
} \
}
#define FILEREADER_ID \
{0x26a79031, 0xc94b, 0x47e9, {0x85, 0x0a, 0xf0, 0x4f, 0xe1, 0x7b, 0xc0, 0x26}}
class FileReader final : public DOMEventTargetHelper,
public nsIInterfaceRequestor,
@@ -61,7 +57,7 @@ class FileReader final : public DOMEventTargetHelper,
NS_DECL_NSIINTERFACEREQUESTOR
NS_DECL_NSINAMED
NS_DECLARE_STATIC_IID_ACCESSOR(FILEREADER_ID)
NS_INLINE_DECL_STATIC_IID(FILEREADER_ID)
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(FileReader,
DOMEventTargetHelper)
@@ -200,8 +196,6 @@ class FileReader final : public DOMEventTargetHelper,
RefPtr<AsyncWaitRunnable> mAsyncWaitRunnable;
};
NS_DEFINE_STATIC_IID_ACCESSOR(FileReader, FILEREADER_ID)
} // namespace mozilla::dom
#endif // mozilla_dom_FileReader_h

View File

@@ -20,14 +20,12 @@
class NS_NO_VTABLE nsIBlobURLMutator : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IBLOBURLMUTATOR_IID)
NS_INLINE_DECL_STATIC_IID(NS_IBLOBURLMUTATOR_IID)
NS_IMETHOD SetRevoked(bool aRevoked) = 0;
};
inline NS_DEFINE_CID(kHOSTOBJECTURICID, NS_HOSTOBJECTURI_CID);
NS_DEFINE_STATIC_IID_ACCESSOR(nsIBlobURLMutator, NS_IBLOBURLMUTATOR_IID)
namespace mozilla::dom {
/**

View File

@@ -353,7 +353,7 @@ class MockGlobalObject : public nsIGlobalObject, public nsWrapperCache {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(MockGlobalObject)
NS_DECLARE_STATIC_IID_ACCESSOR(MOCKGLOBALOBJECT_IID)
NS_INLINE_DECL_STATIC_IID(MOCKGLOBALOBJECT_IID)
explicit MockGlobalObject(nsCOMPtr<nsIGlobalObject>&& aGlobal)
: mGlobal(std::move(aGlobal)) {}
@@ -399,6 +399,4 @@ class MockGlobalObject : public nsIGlobalObject, public nsWrapperCache {
nsCOMPtr<nsIGlobalObject> mGlobal;
};
NS_DEFINE_STATIC_IID_ACCESSOR(MockGlobalObject, MOCKGLOBALOBJECT_IID)
#endif // DOM_FS_TEST_GTEST_FILESYSTEMMOCKS_H_

View File

@@ -11,16 +11,12 @@
namespace mozilla::dom {
#define NS_HTMLUNKNOWNELEMENT_IID \
{ \
0xc09e665b, 0x3876, 0x40dd, { \
0x85, 0x28, 0x44, 0xc2, 0x3f, 0xd4, 0x58, 0xf2 \
} \
}
#define NS_HTMLUNKNOWNELEMENT_IID \
{0xc09e665b, 0x3876, 0x40dd, {0x85, 0x28, 0x44, 0xc2, 0x3f, 0xd4, 0x58, 0xf2}}
class HTMLUnknownElement final : public nsGenericHTMLElement {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_HTMLUNKNOWNELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_HTMLUNKNOWNELEMENT_IID)
NS_DECL_ISUPPORTS_INHERITED
@@ -36,8 +32,6 @@ class HTMLUnknownElement final : public nsGenericHTMLElement {
JS::Handle<JSObject*> aGivenProto) override;
};
NS_DEFINE_STATIC_IID_ACCESSOR(HTMLUnknownElement, NS_HTMLUNKNOWNELEMENT_IID)
} // namespace mozilla::dom
#endif /* mozilla_dom_HTMLUnknownElement_h */

View File

@@ -13,11 +13,7 @@
#include "mozilla/dom/BindingDeclarations.h"
#define MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID \
{ \
0xbba7f3e8, 0xf3b5, 0x42e5, { \
0x82, 0x08, 0xa6, 0x8b, 0xe0, 0xbc, 0x22, 0x19 \
} \
}
{0xbba7f3e8, 0xf3b5, 0x42e5, {0x82, 0x08, 0xa6, 0x8b, 0xe0, 0xbc, 0x22, 0x19}}
namespace mozilla::dom {
@@ -31,14 +27,11 @@ class RadioNodeList final : public nsSimpleContentList {
void SetValue(const nsAString& value, CallerType aCallerType);
NS_DECL_ISUPPORTS_INHERITED
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID)
private:
~RadioNodeList() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(RadioNodeList,
MOZILLA_DOM_RADIONODELIST_IMPLEMENTATION_IID)
} // namespace mozilla::dom
#endif // mozilla_dom_RadioNodeList_h

View File

@@ -25,12 +25,8 @@ class XULFrameElement;
} // namespace dom
} // namespace mozilla
#define NS_GENERICHTMLFRAMEELEMENT_IID \
{ \
0x8190db72, 0xdab0, 0x4d72, { \
0x94, 0x26, 0x87, 0x5f, 0x5a, 0x8a, 0x2a, 0xe5 \
} \
}
#define NS_GENERICHTMLFRAMEELEMENT_IID \
{0x8190db72, 0xdab0, 0x4d72, {0x94, 0x26, 0x87, 0x5f, 0x5a, 0x8a, 0x2a, 0xe5}}
/**
* A helper class for frame elements
@@ -47,7 +43,7 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
NS_DECL_ISUPPORTS_INHERITED
NS_DECLARE_STATIC_IID_ACCESSOR(NS_GENERICHTMLFRAMEELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_GENERICHTMLFRAMEELEMENT_IID)
// nsIContent
bool IsHTMLFocusable(mozilla::IsFocusableFlags, bool* aIsFocusable,
@@ -148,7 +144,4 @@ class nsGenericHTMLFrameElement : public nsGenericHTMLElement,
mozilla::dom::BrowsingContext* GetContentWindowInternal();
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsGenericHTMLFrameElement,
NS_GENERICHTMLFRAMEELEMENT_IID)
#endif // nsGenericHTMLFrameElement_h

View File

@@ -15,12 +15,8 @@ namespace mozilla::dom {
class ValidityState;
} // namespace mozilla::dom
#define NS_ICONSTRAINTVALIDATION_IID \
{ \
0x983829da, 0x1aaf, 0x449c, { \
0xa3, 0x06, 0x85, 0xd4, 0xf0, 0x31, 0x1c, 0xf6 \
} \
}
#define NS_ICONSTRAINTVALIDATION_IID \
{0x983829da, 0x1aaf, 0x449c, {0xa3, 0x06, 0x85, 0xd4, 0xf0, 0x31, 0x1c, 0xf6}}
/**
* This interface is for form elements implementing the validity constraint API.
@@ -31,7 +27,7 @@ class ValidityState;
*/
class nsIConstraintValidation : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONSTRAINTVALIDATION_IID);
NS_INLINE_DECL_STATIC_IID(NS_ICONSTRAINTVALIDATION_IID);
friend class mozilla::dom::ValidityState;
@@ -105,7 +101,4 @@ class nsIConstraintValidation : public nsISupports {
bool mBarredFromConstraintValidation;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIConstraintValidation,
NS_ICONSTRAINTVALIDATION_IID)
#endif // nsIConstraintValidation_h___

View File

@@ -77,12 +77,8 @@ static_assert(uint8_t(FormControlType::LastButtonElement) <
static_assert(uint32_t(FormControlType::LastInputElement) < (1 << 8),
"Too many form control types");
#define NS_IFORMCONTROL_IID \
{ \
0x4b89980c, 0x4dcd, 0x428f, { \
0xb7, 0xad, 0x43, 0x5b, 0x93, 0x29, 0x79, 0xec \
} \
}
#define NS_IFORMCONTROL_IID \
{0x4b89980c, 0x4dcd, 0x428f, {0xb7, 0xad, 0x43, 0x5b, 0x93, 0x29, 0x79, 0xec}}
/**
* Interface which all form controls (e.g. buttons, checkboxes, text,
@@ -93,7 +89,7 @@ class nsIFormControl : public nsISupports {
public:
nsIFormControl(FormControlType aType) : mType(aType) {}
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IFORMCONTROL_IID)
NS_INLINE_DECL_STATIC_IID(NS_IFORMCONTROL_IID)
static nsIFormControl* FromEventTarget(mozilla::dom::EventTarget* aTarget);
static nsIFormControl* FromEventTargetOrNull(
@@ -298,6 +294,4 @@ bool nsIFormControl::AllowDraggableChildren() const {
type == FormControlType::Output;
}
NS_DEFINE_STATIC_IID_ACCESSOR(nsIFormControl, NS_IFORMCONTROL_IID)
#endif /* nsIFormControl_h___ */

View File

@@ -20,19 +20,15 @@ class Element;
} // namespace mozilla::dom
// IID for the nsIHTMLCollection interface
#define NS_IHTMLCOLLECTION_IID \
{ \
0x4e169191, 0x5196, 0x4e17, { \
0xa4, 0x79, 0xd5, 0x35, 0x0b, 0x5b, 0x0a, 0xcd \
} \
}
#define NS_IHTMLCOLLECTION_IID \
{0x4e169191, 0x5196, 0x4e17, {0xa4, 0x79, 0xd5, 0x35, 0x0b, 0x5b, 0x0a, 0xcd}}
/**
* An internal interface
*/
class nsIHTMLCollection : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IHTMLCOLLECTION_IID)
NS_INLINE_DECL_STATIC_IID(NS_IHTMLCOLLECTION_IID)
/**
* Get the root node for this HTML collection.
@@ -82,6 +78,4 @@ class nsIHTMLCollection : public nsISupports {
virtual void PreserveWrapperInternal(nsISupports* aScriptObjectHolder) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIHTMLCollection, NS_IHTMLCOLLECTION_IID)
#endif /* nsIHTMLCollection_h___ */

View File

@@ -14,12 +14,8 @@ class HTMLInputElement;
} // namespace mozilla::dom
// IID for the nsIRadioControl interface
#define NS_IRADIOVISITOR_IID \
{ \
0xc6bed232, 0x1181, 0x4ab2, { \
0xa1, 0xda, 0x55, 0xc2, 0x13, 0x6d, 0xea, 0x3d \
} \
}
#define NS_IRADIOVISITOR_IID \
{0xc6bed232, 0x1181, 0x4ab2, {0xa1, 0xda, 0x55, 0xc2, 0x13, 0x6d, 0xea, 0x3d}}
/**
* This interface is used for the text control frame to store its value away
@@ -27,7 +23,7 @@ class HTMLInputElement;
*/
class nsIRadioVisitor : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IRADIOVISITOR_IID)
NS_INLINE_DECL_STATIC_IID(NS_IRADIOVISITOR_IID)
/**
* Visit a node in the tree. This is meant to be called on all radios in a
@@ -43,6 +39,4 @@ class nsIRadioVisitor : public nsISupports {
virtual bool Visit(mozilla::dom::HTMLInputElement* aRadio) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIRadioVisitor, NS_IRADIOVISITOR_IID)
#endif // nsIRadioVisitor_h___

View File

@@ -13,12 +13,8 @@
#include "mozilla/dom/Nullable.h"
#include "nsStringFwd.h"
#define IDBVERSIONCHANGEEVENT_IID \
{ \
0x3b65d4c3, 0x73ad, 0x492e, { \
0xb1, 0x2d, 0x15, 0xf9, 0xda, 0xc2, 0x08, 0x4b \
} \
}
#define IDBVERSIONCHANGEEVENT_IID \
{0x3b65d4c3, 0x73ad, 0x492e, {0xb1, 0x2d, 0x15, 0xf9, 0xda, 0xc2, 0x08, 0x4b}}
namespace mozilla {
@@ -73,7 +69,7 @@ class IDBVersionChangeEvent final : public Event {
Nullable<uint64_t> GetNewVersion() const { return mNewVersion; }
NS_DECLARE_STATIC_IID_ACCESSOR(IDBVERSIONCHANGEEVENT_IID)
NS_INLINE_DECL_STATIC_IID(IDBVERSIONCHANGEEVENT_IID)
NS_DECL_ISUPPORTS_INHERITED
@@ -91,8 +87,6 @@ class IDBVersionChangeEvent final : public Event {
const Nullable<uint64_t>& aNewVersion);
};
NS_DEFINE_STATIC_IID_ACCESSOR(IDBVersionChangeEvent, IDBVERSIONCHANGEEVENT_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -20,12 +20,8 @@
#include "ReportInternalError.h"
#include "SafeRefPtr.h"
#define PRIVATE_IDBREQUEST_IID \
{ \
0xe68901e5, 0x1d50, 0x4ee9, { \
0xaf, 0x49, 0x90, 0x99, 0x4a, 0xff, 0xc8, 0x39 \
} \
}
#define PRIVATE_IDBREQUEST_IID \
{0xe68901e5, 0x1d50, 0x4ee9, {0xaf, 0x49, 0x90, 0x99, 0x4a, 0xff, 0xc8, 0x39}}
class nsIGlobalObject;
@@ -50,11 +46,9 @@ namespace detail {
// This class holds the IID for use with NS_GET_IID.
class PrivateIDBRequest {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(PRIVATE_IDBREQUEST_IID)
NS_INLINE_DECL_STATIC_IID(PRIVATE_IDBREQUEST_IID)
};
NS_DEFINE_STATIC_IID_ACCESSOR(PrivateIDBRequest, PRIVATE_IDBREQUEST_IID)
} // namespace detail
class IDBRequest : public DOMEventTargetHelper {

View File

@@ -184,7 +184,7 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
return mUniqueId;
}
NS_DECLARE_STATIC_IID_ACCESSOR(DOM_BROWSERCHILD_IID)
NS_INLINE_DECL_STATIC_IID(DOM_BROWSERCHILD_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIWEBBROWSERCHROME
NS_DECL_NSIINTERFACEREQUESTOR
@@ -929,8 +929,6 @@ class BrowserChild final : public nsMessageManagerScriptExecutor,
DISALLOW_EVIL_CONSTRUCTORS(BrowserChild);
};
NS_DEFINE_STATIC_IID_ACCESSOR(BrowserChild, DOM_BROWSERCHILD_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -78,12 +78,8 @@ namespace ipc {
class StructuredCloneData;
} // namespace ipc
#define DOM_BROWSERPARENT_IID \
{ \
0x58b47b52, 0x77dc, 0x44cf, { \
0x8b, 0xe5, 0x8e, 0x78, 0x24, 0xd9, 0xae, 0xc5 \
} \
}
#define DOM_BROWSERPARENT_IID \
{0x58b47b52, 0x77dc, 0x44cf, {0x8b, 0xe5, 0x8e, 0x78, 0x24, 0xd9, 0xae, 0xc5}}
/**
* BrowserParent implements the parent actor part of the PBrowser protocol. See
@@ -106,7 +102,7 @@ class BrowserParent final : public PBrowserParent,
// Helper class for ContentParent::RecvCreateWindow.
struct AutoUseNewTab;
NS_DECLARE_STATIC_IID_ACCESSOR(DOM_BROWSERPARENT_IID)
NS_INLINE_DECL_STATIC_IID(DOM_BROWSERPARENT_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_NSIAUTHPROMPTPROVIDER
// nsIDOMEventListener interfaces
@@ -1018,8 +1014,6 @@ class BrowserParent final : public PBrowserParent,
bool mShowingTooltip : 1;
};
NS_DEFINE_STATIC_IID_ACCESSOR(BrowserParent, DOM_BROWSERPARENT_IID)
struct MOZ_STACK_CLASS BrowserParent::AutoUseNewTab final {
public:
explicit AutoUseNewTab(BrowserParent* aNewTab) : mNewTab(aNewTab) {

View File

@@ -141,7 +141,7 @@ class ContentParent final : public PContentParent,
using LaunchPromise =
mozilla::MozPromise<UniqueContentParentKeepAlive, nsresult, true>;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_CONTENTPARENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_CONTENTPARENT_IID)
static LogModule* GetLog();
@@ -1624,8 +1624,6 @@ class ContentParent final : public PContentParent,
nsCOMPtr<nsIThread> mClipboardContentAnalysisThread;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ContentParent, NS_CONTENTPARENT_IID)
// Threadsafe handle object allowing off-main-thread code to get some
// information and maintain a weak reference to a ContentParent.
class ThreadsafeContentParentHandle final {

View File

@@ -36,12 +36,8 @@ class ImageContainer;
class OverlayImage;
} // namespace layers
#define NS_DOMMEDIASTREAM_IID \
{ \
0x8cb65468, 0x66c0, 0x444e, { \
0x89, 0x9f, 0x89, 0x1d, 0x9e, 0xd2, 0xbe, 0x7c \
} \
}
#define NS_DOMMEDIASTREAM_IID \
{0x8cb65468, 0x66c0, 0x444e, {0x89, 0x9f, 0x89, 0x1d, 0x9e, 0xd2, 0xbe, 0x7c}}
/**
* DOMMediaStream is the implementation of the js-exposed MediaStream interface.
@@ -104,7 +100,7 @@ class DOMMediaStream : public DOMEventTargetHelper,
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(DOMMediaStream, DOMEventTargetHelper)
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOMMEDIASTREAM_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOMMEDIASTREAM_IID)
virtual JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
@@ -249,8 +245,6 @@ class DOMMediaStream : public DOMEventTargetHelper,
bool mAudible = false;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMMediaStream, NS_DOMMEDIASTREAM_IID)
} // namespace mozilla
#endif /* NSDOMMEDIASTREAM_H_ */

View File

@@ -17,11 +17,7 @@
namespace mozilla::dom {
#define MOZILLA_DOM_MEDIADEVICEINFO_IMPLEMENTATION_IID \
{ \
0x25091870, 0x84d6, 0x4acf, { \
0xaf, 0x97, 0x6e, 0xd5, 0x5b, 0xe0, 0x47, 0xb2 \
} \
}
{0x25091870, 0x84d6, 0x4acf, {0xaf, 0x97, 0x6e, 0xd5, 0x5b, 0xe0, 0x47, 0xb2}}
class MediaDeviceInfo final : public nsISupports, public nsWrapperCache {
public:
@@ -30,7 +26,7 @@ class MediaDeviceInfo final : public nsISupports, public nsWrapperCache {
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(MediaDeviceInfo)
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIADEVICEINFO_IMPLEMENTATION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOM_MEDIADEVICEINFO_IMPLEMENTATION_IID)
JSObject* WrapObject(JSContext* cx,
JS::Handle<JSObject*> aGivenProto) override;
@@ -51,9 +47,6 @@ class MediaDeviceInfo final : public nsISupports, public nsWrapperCache {
virtual ~MediaDeviceInfo() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(MediaDeviceInfo,
MOZILLA_DOM_MEDIADEVICEINFO_IMPLEMENTATION_IID)
} // namespace mozilla::dom
#endif // mozilla_dom_MediaDeviceInfo_h

View File

@@ -22,11 +22,7 @@ namespace mozilla {
namespace dom {
#define MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID \
{ \
0x95fa29aa, 0x0cc2, 0x4698, { \
0x9d, 0xa9, 0xf2, 0xeb, 0x03, 0x91, 0x0b, 0xd1 \
} \
}
{0x95fa29aa, 0x0cc2, 0x4698, {0x9d, 0xa9, 0xf2, 0xeb, 0x03, 0x91, 0x0b, 0xd1}}
class MediaStreamError;
} // namespace dom
@@ -88,8 +84,7 @@ class MediaStreamError final : public nsISupports,
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(MediaStreamError)
NS_DECLARE_STATIC_IID_ACCESSOR(
MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID)
JSObject* WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto) override;
@@ -105,8 +100,6 @@ class MediaStreamError final : public nsISupports,
RefPtr<nsPIDOMWindowInner> mParent;
};
NS_DEFINE_STATIC_IID_ACCESSOR(MediaStreamError,
MOZILLA_DOM_MEDIASTREAMERROR_IMPLEMENTATION_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -47,12 +47,8 @@ class SourceBufferList;
template <typename T>
class Optional;
#define MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID \
{ \
0x3839d699, 0x22c5, 0x439f, { \
0x94, 0xca, 0x0e, 0x0b, 0x26, 0xf9, 0xca, 0xbf \
} \
}
#define MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID \
{0x3839d699, 0x22c5, 0x439f, {0x94, 0xca, 0x0e, 0x0b, 0x26, 0xf9, 0xca, 0xbf}}
class MediaSource final : public DOMEventTargetHelper,
public DecoderDoctorLifeLogger<MediaSource> {
@@ -94,7 +90,7 @@ class MediaSource final : public DOMEventTargetHelper,
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(MediaSource, DOMEventTargetHelper)
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID)
nsPIDOMWindowInner* GetParentObject() const;
@@ -173,9 +169,6 @@ class MediaSource final : public DOMEventTargetHelper,
nsTArray<MozPromiseHolder<ActiveCompletionPromise>> mCompletionPromises;
};
NS_DEFINE_STATIC_IID_ACCESSOR(MediaSource,
MOZILLA_DOM_MEDIASOURCE_IMPLEMENTATION_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -8,22 +8,16 @@
#include "nsISupports.h"
#define NS_IDOCUMENTACTIVITY_IID \
{ \
0x9b9f584e, 0xefa8, 0x11e3, { \
0xbb, 0x74, 0x5e, 0xdd, 0x1d, 0x5d, 0x46, 0xb0 \
} \
}
#define NS_IDOCUMENTACTIVITY_IID \
{0x9b9f584e, 0xefa8, 0x11e3, {0xbb, 0x74, 0x5e, 0xdd, 0x1d, 0x5d, 0x46, 0xb0}}
class nsIDocumentActivity : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENTACTIVITY_IID)
NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENTACTIVITY_IID)
virtual void NotifyOwnerDocumentActivityChanged() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentActivity, NS_IDOCUMENTACTIVITY_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCUMENTACTIVITY \
virtual void NotifyOwnerDocumentActivityChanged() override;

View File

@@ -11,11 +11,7 @@
#include "nsISupports.h"
#define MOZILLA_DOM_QUOTA_REMOTEQUOTAOBJECTPARENTTRACKER_IID \
{ \
0x42f96136, 0x5b2b, 0x4487, { \
0xa4, 0x4e, 0x45, 0x0a, 0x00, 0x8f, 0xc5, 0xd4 \
} \
}
{0x42f96136, 0x5b2b, 0x4487, {0xa4, 0x4e, 0x45, 0x0a, 0x00, 0x8f, 0xc5, 0xd4}}
namespace mozilla::dom::quota {
@@ -23,8 +19,8 @@ class RemoteQuotaObjectParent;
class RemoteQuotaObjectParentTracker : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(
NS_DOM_QUOTA_REMOTEQUOTAOBJECTPARENTTRACKER_IID)
NS_INLINE_DECL_STATIC_IID(
MOZILLA_DOM_QUOTA_REMOTEQUOTAOBJECTPARENTTRACKER_IID)
virtual void RegisterRemoteQuotaObjectParent(
NotNull<RemoteQuotaObjectParent*> aActor) = 0;
@@ -36,10 +32,6 @@ class RemoteQuotaObjectParentTracker : public nsISupports {
virtual ~RemoteQuotaObjectParentTracker() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(
RemoteQuotaObjectParentTracker,
MOZILLA_DOM_QUOTA_REMOTEQUOTAOBJECTPARENTTRACKER_IID)
} // namespace mozilla::dom::quota
#endif // DOM_QUOTA_REMOTEQUOTAOBJECTPARENTTRACKER_H_

View File

@@ -21,12 +21,12 @@
namespace mozilla::dom {
#define SHADOWREALMGLOBALSCOPE_IID \
{ /* 1b0a59dd-c1cb-429a-bb90-cea17994dba2 */ \
0x1b0a59dd, 0xc1cb, 0x429a, { \
0xbb, 0x90, 0xce, 0xa1, 0x79, 0x94, 0xdb, 0xa2 \
} \
}
#define SHADOWREALMGLOBALSCOPE_IID \
{/* 1b0a59dd-c1cb-429a-bb90-cea17994dba2 */ \
0x1b0a59dd, \
0xc1cb, \
0x429a, \
{0xbb, 0x90, 0xce, 0xa1, 0x79, 0x94, 0xdb, 0xa2}}
// Required for providing the wrapper, as this is the global used inside a Gecko
// backed ShadowRealm, but also required to power module resolution.
@@ -36,7 +36,7 @@ class ShadowRealmGlobalScope final : public nsIGlobalObject,
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(ShadowRealmGlobalScope)
NS_DECLARE_STATIC_IID_ACCESSOR(SHADOWREALMGLOBALSCOPE_IID)
NS_INLINE_DECL_STATIC_IID(SHADOWREALMGLOBALSCOPE_IID)
explicit ShadowRealmGlobalScope(nsIGlobalObject* aCreatingGlobal)
: mCreatingGlobal(aCreatingGlobal) {};
@@ -80,9 +80,6 @@ class ShadowRealmGlobalScope final : public nsIGlobalObject,
nsCOMPtr<nsIGlobalObject> mCreatingGlobal;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ShadowRealmGlobalScope,
SHADOWREALMGLOBALSCOPE_IID)
JSObject* NewShadowRealmGlobal(JSContext* aCx, JS::RealmOptions& aOptions,
JSPrincipals* aPrincipals,
JS::Handle<JSObject*> aGlobalObj);

View File

@@ -35,19 +35,15 @@ enum class ReferrerPolicy : uint8_t;
} // namespace mozilla::dom
// Must be kept in sync with xpcom/rust/xpcom/src/interfaces/nonidl.rs
#define NS_ISCRIPTELEMENT_IID \
{ \
0xe60fca9b, 0x1b96, 0x4e4e, { \
0xa9, 0xb4, 0xdc, 0x98, 0x4f, 0x88, 0x3f, 0x9c \
} \
}
#define NS_ISCRIPTELEMENT_IID \
{0xe60fca9b, 0x1b96, 0x4e4e, {0xa9, 0xb4, 0xdc, 0x98, 0x4f, 0x88, 0x3f, 0x9c}}
/**
* Internal interface implemented by script elements
*/
class nsIScriptElement : public nsIScriptLoaderObserver {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTELEMENT_IID)
explicit nsIScriptElement(mozilla::dom::FromParser aFromParser)
: mLineNumber(1),
@@ -370,6 +366,4 @@ class nsIScriptElement : public nsIScriptLoaderObserver {
nsWeakPtr mCreatorParser;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptElement, NS_ISCRIPTELEMENT_IID)
#endif // nsIScriptElement_h___

View File

@@ -12,16 +12,12 @@
class nsIScriptElement;
class nsIURI;
#define NS_ISCRIPTLOADEROBSERVER_IID \
{ \
0x7b787204, 0x76fb, 0x4764, { \
0x96, 0xf1, 0xfb, 0x7a, 0x66, 0x6d, 0xb4, 0xf4 \
} \
}
#define NS_ISCRIPTLOADEROBSERVER_IID \
{0x7b787204, 0x76fb, 0x4764, {0x96, 0xf1, 0xfb, 0x7a, 0x66, 0x6d, 0xb4, 0xf4}}
class NS_NO_VTABLE nsIScriptLoaderObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISCRIPTLOADEROBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_ISCRIPTLOADEROBSERVER_IID)
/**
* The script is available for evaluation. For inline scripts, this
@@ -57,9 +53,6 @@ class NS_NO_VTABLE nsIScriptLoaderObserver : public nsISupports {
nsresult aResult, nsIScriptElement* aElement, bool aIsInline) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIScriptLoaderObserver,
NS_ISCRIPTLOADEROBSERVER_IID)
#define NS_DECL_NSISCRIPTLOADEROBSERVER \
NS_IMETHOD ScriptAvailable(nsresult aResult, nsIScriptElement* aElement, \
bool aIsInlineClassicScript, nsIURI* aURI, \

View File

@@ -23,16 +23,12 @@ class ProcessingInstruction;
} // namespace dom
} // namespace mozilla
#define NS_ICONTENTSERIALIZER_IID \
{ \
0xb1ee32f2, 0xb8c4, 0x49b9, { \
0x93, 0xdf, 0xb6, 0xfa, 0xb5, 0xd5, 0x46, 0x88 \
} \
}
#define NS_ICONTENTSERIALIZER_IID \
{0xb1ee32f2, 0xb8c4, 0x49b9, {0x93, 0xdf, 0xb6, 0xfa, 0xb5, 0xd5, 0x46, 0x88}}
class nsIContentSerializer : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICONTENTSERIALIZER_IID)
NS_INLINE_DECL_STATIC_IID(NS_ICONTENTSERIALIZER_IID)
/**
* @param aOutput The `Append*` methods will append to this string. The
@@ -89,8 +85,6 @@ class nsIContentSerializer : public nsISupports {
NS_IMETHOD ForgetElementForPreformat(mozilla::dom::Element* aElement) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIContentSerializer, NS_ICONTENTSERIALIZER_IID)
#define NS_CONTENTSERIALIZER_CONTRACTID_PREFIX \
"@mozilla.org/layout/contentserializer;1?mimetype="

View File

@@ -24,16 +24,12 @@ class ServiceWorkerChild;
class ServiceWorkerCloneData;
struct StructuredSerializeOptions;
#define NS_DOM_SERVICEWORKER_IID \
{ \
0xd42e0611, 0x3647, 0x4319, { \
0xae, 0x05, 0x19, 0x89, 0x59, 0xba, 0x99, 0x5e \
} \
}
#define NS_DOM_SERVICEWORKER_IID \
{0xd42e0611, 0x3647, 0x4319, {0xae, 0x05, 0x19, 0x89, 0x59, 0xba, 0x99, 0x5e}}
class ServiceWorker final : public DOMEventTargetHelper {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_SERVICEWORKER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOM_SERVICEWORKER_IID)
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorker, DOMEventTargetHelper)
@@ -87,8 +83,6 @@ class ServiceWorker final : public DOMEventTargetHelper {
ServiceWorkerState mLastNotifiedState;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ServiceWorker, NS_DOM_SERVICEWORKER_IID)
} // namespace mozilla::dom
#endif // mozilla_dom_serviceworker_h__

View File

@@ -33,7 +33,7 @@ class ServiceWorkerRegistrationChild;
class ServiceWorkerRegistration final : public DOMEventTargetHelper {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DOM_SERVICEWORKERREGISTRATION_IID)
NS_INLINE_DECL_STATIC_IID(NS_DOM_SERVICEWORKERREGISTRATION_IID)
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ServiceWorkerRegistration,
DOMEventTargetHelper)
@@ -152,9 +152,6 @@ class ServiceWorkerRegistration final : public DOMEventTargetHelper {
uint64_t mDispatchedUpdateFoundId;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ServiceWorkerRegistration,
NS_DOM_SERVICEWORKERREGISTRATION_IID)
} // namespace mozilla::dom
#endif /* mozilla_dom_ServiceWorkerRegistration_h */

View File

@@ -87,7 +87,7 @@ class DOMSVGLengthList final : public nsISupports, public nsWrapperCache {
}
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGLENGTHLIST_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOMSVGLENGTHLIST_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGLengthList)
@@ -195,8 +195,6 @@ class DOMSVGLengthList final : public nsISupports, public nsWrapperCache {
RefPtr<DOMSVGAnimatedLengthList> mAList;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMSVGLengthList, MOZILLA_DOMSVGLENGTHLIST_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -93,7 +93,7 @@ class DOMSVGPointList final : public nsISupports, public nsWrapperCache {
friend class DOMSVGPoint;
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGPOINTLIST_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOMSVGPOINTLIST_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(DOMSVGPointList)
@@ -253,8 +253,6 @@ class DOMSVGPointList final : public nsISupports, public nsWrapperCache {
bool mIsInTearoffTable = true;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DOMSVGPointList, MOZILLA_DOMSVGPOINTLIST_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -29,12 +29,8 @@
#include "gfxMatrix.h"
// {70db954d-e452-4be3-83aa-f54a51cf7890}
#define MOZILLA_SVGELEMENT_IID \
{ \
0x70db954d, 0xe452, 0x4be3, { \
0x82, 0xaa, 0xf5, 0x4a, 0x51, 0xcf, 0x78, 0x90 \
} \
}
#define MOZILLA_SVGELEMENT_IID \
{0x70db954d, 0xe452, 0x4be3, {0x82, 0xaa, 0xf5, 0x4a, 0x51, 0xcf, 0x78, 0x90}}
nsresult NS_NewSVGElement(mozilla::dom::Element** aResult,
already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
@@ -89,7 +85,7 @@ class SVGElement : public SVGElementBase // nsIContent
// From Element
nsresult CopyInnerTo(mozilla::dom::Element* aDest);
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_SVGELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_SVGELEMENT_IID)
// nsISupports
NS_INLINE_DECL_REFCOUNTING_INHERITED(SVGElement, SVGElementBase)
@@ -531,8 +527,6 @@ class SVGElement : public SVGElementBase // nsIContent
UniquePtr<nsAttrValue> mClassAnimAttr;
};
NS_DEFINE_STATIC_IID_ACCESSOR(SVGElement, MOZILLA_SVGELEMENT_IID)
/**
* A macro to implement the NS_NewSVGXXXElement() functions.
*/

View File

@@ -72,7 +72,7 @@ class SVGSVGElement final : public SVGSVGElementBase {
NS_IMPL_FROMNODE_WITH_TAG(SVGSVGElement, kNameSpaceID_SVG, svg)
// interfaces:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_SVGSVGELEMENT_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_SVGSVGELEMENT_IID)
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SVGSVGElement, SVGSVGElementBase)
@@ -224,8 +224,6 @@ class SVGSVGElement final : public SVGSVGElementBase {
UniquePtr<SVGView> mSVGView;
};
NS_DEFINE_STATIC_IID_ACCESSOR(SVGSVGElement, MOZILLA_SVGSVGELEMENT_IID)
} // namespace dom
class MOZ_RAII AutoSVGTimeSetRestore {

View File

@@ -23,12 +23,8 @@ class DOMSVGStringList;
class SVGSwitchElement;
} // namespace dom
#define MOZILLA_DOMSVGTESTS_IID \
{ \
0x92370da8, 0xda28, 0x4895, { \
0x9b, 0x1b, 0xe0, 0x06, 0x0d, 0xb7, 0x3f, 0xc3 \
} \
}
#define MOZILLA_DOMSVGTESTS_IID \
{0x92370da8, 0xda28, 0x4895, {0x9b, 0x1b, 0xe0, 0x06, 0x0d, 0xb7, 0x3f, 0xc3}}
namespace dom {
@@ -36,7 +32,7 @@ class SVGElement;
class SVGTests : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_DOMSVGTESTS_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_DOMSVGTESTS_IID)
SVGTests();
@@ -106,8 +102,6 @@ class SVGTests : public nsISupports {
mutable Maybe<bool> mPassesConditionalProcessingTests = Some(true);
};
NS_DEFINE_STATIC_IID_ACCESSOR(SVGTests, MOZILLA_DOMSVGTESTS_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -15,12 +15,8 @@
#include "nsIGlobalObject.h"
#include "nsWrapperCache.h"
#define WORKLET_IID \
{ \
0x1b3f62e7, 0xe357, 0x44be, { \
0xbf, 0xe0, 0xdf, 0x85, 0xe6, 0x56, 0x85, 0xac \
} \
}
#define WORKLET_IID \
{0x1b3f62e7, 0xe357, 0x44be, {0xbf, 0xe0, 0xdf, 0x85, 0xe6, 0x56, 0x85, 0xac}}
namespace JS {
class RealmOptions;
@@ -45,7 +41,7 @@ class Console;
class WorkletGlobalScope : public nsIGlobalObject, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(WORKLET_IID)
NS_INLINE_DECL_STATIC_IID(WORKLET_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(WorkletGlobalScope)
@@ -101,8 +97,6 @@ class WorkletGlobalScope : public nsIGlobalObject, public nsWrapperCache {
RefPtr<loader::WorkletModuleLoader> mModuleLoader;
};
NS_DEFINE_STATIC_IID_ACCESSOR(WorkletGlobalScope, WORKLET_IID)
} // namespace dom
} // namespace mozilla

View File

@@ -15,12 +15,8 @@ namespace mozilla::dom {
class Document;
} // namespace mozilla::dom
#define NS_IXMLCONTENT_SINK_IID \
{ \
0x63fedea0, 0x9b0f, 0x4d64, { \
0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35 \
} \
}
#define NS_IXMLCONTENT_SINK_IID \
{0x63fedea0, 0x9b0f, 0x4d64, {0x9b, 0xa5, 0x37, 0xc6, 0x99, 0x73, 0x29, 0x35}}
/**
* This interface represents a content sink for generic XML files.
@@ -47,13 +43,11 @@ class Document;
class nsIXMLContentSink : public nsIContentSink {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXMLCONTENT_SINK_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXMLCONTENT_SINK_IID)
virtual bool IsPrettyPrintXML() const { return false; }
virtual bool IsPrettyPrintHasSpecialRoot() const { return false; }
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXMLContentSink, NS_IXMLCONTENT_SINK_IID)
nsresult NS_NewXMLContentSink(nsIXMLContentSink** aInstancePtrResult,
mozilla::dom::Document* aDoc, nsIURI* aURL,
nsISupports* aContainer, nsIChannel* aChannel);

View File

@@ -22,16 +22,12 @@ class Document;
}
} // namespace mozilla
#define NS_ITRANSFORMOBSERVER_IID \
{ \
0x04b2d17c, 0xe98d, 0x45f5, { \
0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7 \
} \
}
#define NS_ITRANSFORMOBSERVER_IID \
{0x04b2d17c, 0xe98d, 0x45f5, {0x9a, 0x67, 0xb7, 0x01, 0x19, 0x59, 0x7d, 0xe7}}
class nsITransformObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITRANSFORMOBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_ITRANSFORMOBSERVER_IID)
virtual nsresult OnDocumentCreated(
mozilla::dom::Document* aSourceDocument,
@@ -42,18 +38,12 @@ class nsITransformObserver : public nsISupports {
mozilla::dom::Document* aResultDocument) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITransformObserver, NS_ITRANSFORMOBSERVER_IID)
#define NS_IDOCUMENTTRANSFORMER_IID \
{ \
0xf45e1ff8, 0x50f3, 0x4496, { \
0xb3, 0xa2, 0x0e, 0x03, 0xe8, 0x4a, 0x57, 0x11 \
} \
}
#define NS_IDOCUMENTTRANSFORMER_IID \
{0xf45e1ff8, 0x50f3, 0x4496, {0xb3, 0xa2, 0x0e, 0x03, 0xe8, 0x4a, 0x57, 0x11}}
class nsIDocumentTransformer : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENTTRANSFORMER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENTTRANSFORMER_IID)
NS_IMETHOD SetTransformObserver(nsITransformObserver* aObserver) = 0;
NS_IMETHOD LoadStyleSheet(nsIURI* aUri,
@@ -68,7 +58,4 @@ class nsIDocumentTransformer : public nsISupports {
nsINode* aContextNode) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentTransformer,
NS_IDOCUMENTTRANSFORMER_IID)
#endif // nsIDocumentTransformer_h__

View File

@@ -13,7 +13,7 @@
#include "mozilla/dom/Text.h"
#include "nsCycleCollectionParticipant.h" // various macros
#include "nsID.h" // NS_DECLARE_STATIC_IID_ACCESSOR
#include "nsID.h" // NS_INLINE_DECL_STATIC_IID
#include "nsISupportsImpl.h" // NS_DECL_ISUPPORTS_INHERITED
#include "nsString.h" // nsString members
#include "nscore.h" // NS_IMETHOD, nsAString

View File

@@ -66,7 +66,7 @@ class nsITheme : public nsISupports {
using ComputedStyle = mozilla::ComputedStyle;
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITHEME_IID)
NS_INLINE_DECL_STATIC_IID(NS_ITHEME_IID)
/**
* Draw the actual theme background.
@@ -240,8 +240,6 @@ class nsITheme : public nsISupports {
virtual bool ThemeSupportsScrollbarButtons() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITheme, NS_ITHEME_IID)
// Singleton accessor functions, these should never return null.
//
// Do not use directly, use nsPresContext::Theme instead.

View File

@@ -21,12 +21,12 @@
#include "IProgressObserver.h"
#define NS_IMGREQUESTPROXY_CID \
{ /* 20557898-1dd2-11b2-8f65-9c462ee2bc95 */ \
0x20557898, 0x1dd2, 0x11b2, { \
0x8f, 0x65, 0x9c, 0x46, 0x2e, 0xe2, 0xbc, 0x95 \
} \
}
#define NS_IMGREQUESTPROXY_CID \
{/* 20557898-1dd2-11b2-8f65-9c462ee2bc95 */ \
0x20557898, \
0x1dd2, \
0x11b2, \
{0x8f, 0x65, 0x9c, 0x46, 0x2e, 0xe2, 0xbc, 0x95}}
class imgCacheValidator;
class imgINotificationObserver;
@@ -54,7 +54,7 @@ class imgRequestProxy : public mozilla::PreloaderBase,
typedef mozilla::image::Image Image;
typedef mozilla::image::ProgressTracker ProgressTracker;
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IMGREQUESTPROXY_CID)
NS_INLINE_DECL_STATIC_IID(NS_IMGREQUESTPROXY_CID)
MOZ_DECLARE_REFCOUNTED_TYPENAME(imgRequestProxy)
NS_DECL_ISUPPORTS
NS_DECL_IMGIREQUEST
@@ -252,8 +252,6 @@ inline nsISupports* ToSupports(imgRequestProxy* p) {
return NS_ISUPPORTS_CAST(imgIRequest*, p);
}
NS_DEFINE_STATIC_IID_ACCESSOR(imgRequestProxy, NS_IMGREQUESTPROXY_CID)
// Used for static image proxies for which no requests are available, so
// certain behaviours must be overridden to compensate.
class imgRequestProxyStatic : public imgRequestProxy {

View File

@@ -111,7 +111,7 @@ namespace {
class StringBundleProxy : public nsIStringBundle {
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECLARE_STATIC_IID_ACCESSOR(STRINGBUNDLEPROXY_IID)
NS_INLINE_DECL_STATIC_IID(STRINGBUNDLEPROXY_IID)
explicit StringBundleProxy(already_AddRefed<nsIStringBundle> aTarget)
: mMutex("StringBundleProxy::mMutex"), mTarget(aTarget) {}
@@ -177,8 +177,6 @@ class StringBundleProxy : public nsIStringBundle {
}
};
NS_DEFINE_STATIC_IID_ACCESSOR(StringBundleProxy, STRINGBUNDLEPROXY_IID)
NS_IMPL_ISUPPORTS(StringBundleProxy, nsIStringBundle, StringBundleProxy)
#define SHAREDSTRINGBUNDLE_IID \
@@ -203,7 +201,7 @@ class SharedStringBundle final : public nsStringBundleBase {
void SetMapFile(mozilla::ipc::ReadOnlySharedMemoryHandle&& aHandle);
NS_DECL_ISUPPORTS_INHERITED
NS_DECLARE_STATIC_IID_ACCESSOR(SHAREDSTRINGBUNDLE_IID)
NS_INLINE_DECL_STATIC_IID(SHAREDSTRINGBUNDLE_IID)
nsresult LoadProperties() override;
@@ -266,8 +264,6 @@ class SharedStringBundle final : public nsStringBundleBase {
Maybe<mozilla::ipc::ReadOnlySharedMemoryHandle> mMapHandle;
};
NS_DEFINE_STATIC_IID_ACCESSOR(SharedStringBundle, SHAREDSTRINGBUNDLE_IID)
class StringMapEnumerator final : public nsSimpleEnumerator {
public:
NS_DECL_NSISIMPLEENUMERATOR

View File

@@ -88,7 +88,7 @@ class DataPipeReceiver;
class DataPipeSender final : public nsIAsyncOutputStream,
public data_pipe_detail::DataPipeBase {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DATAPIPESENDER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DATAPIPESENDER_IID)
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIOUTPUTSTREAM
NS_DECL_NSIASYNCOUTPUTSTREAM
@@ -114,8 +114,6 @@ class DataPipeSender final : public nsIAsyncOutputStream,
~DataPipeSender() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DataPipeSender, NS_DATAPIPESENDER_IID)
#define NS_DATAPIPERECEIVER_IID \
{0x0a185f83, 0x499e, 0x450c, {0x95, 0x82, 0x27, 0x67, 0xad, 0x6d, 0x64, 0xb5}}
@@ -124,7 +122,7 @@ class DataPipeReceiver final : public nsIAsyncInputStream,
public nsIIPCSerializableInputStream,
public data_pipe_detail::DataPipeBase {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_DATAPIPERECEIVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_DATAPIPERECEIVER_IID)
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIINPUTSTREAM
NS_DECL_NSIASYNCINPUTSTREAM
@@ -150,8 +148,6 @@ class DataPipeReceiver final : public nsIAsyncInputStream,
~DataPipeReceiver() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(DataPipeReceiver, NS_DATAPIPERECEIVER_IID)
constexpr uint32_t kDefaultDataPipeCapacity = 64 * 1024;
/**

View File

@@ -22,16 +22,12 @@ class InputStreamParams;
} // namespace mozilla
#define NS_IIPCSERIALIZABLEINPUTSTREAM_IID \
{ \
0xb0211b14, 0xea6d, 0x40d4, { \
0x87, 0xb5, 0x7b, 0xe3, 0xdf, 0xac, 0x09, 0xd1 \
} \
}
#define NS_IIPCSERIALIZABLEINPUTSTREAM_IID \
{0xb0211b14, 0xea6d, 0x40d4, {0x87, 0xb5, 0x7b, 0xe3, 0xdf, 0xac, 0x09, 0xd1}}
class NS_NO_VTABLE nsIIPCSerializableInputStream : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IIPCSERIALIZABLEINPUTSTREAM_IID)
NS_INLINE_DECL_STATIC_IID(NS_IIPCSERIALIZABLEINPUTSTREAM_IID)
// Determine the serialized complexity of this input stream, initializing
// `*aSizeUsed`, `*aPipes` and `*aTransferables` to the number of inline
@@ -72,9 +68,6 @@ class NS_NO_VTABLE nsIIPCSerializableInputStream : public nsISupports {
virtual bool Deserialize(const mozilla::ipc::InputStreamParams& aParams) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIIPCSerializableInputStream,
NS_IIPCSERIALIZABLEINPUTSTREAM_IID)
#define NS_DECL_NSIIPCSERIALIZABLEINPUTSTREAM \
virtual void SerializedComplexity(uint32_t aMaxSize, uint32_t* aSizeUsed, \
uint32_t* aPipes, \

View File

@@ -29,35 +29,24 @@ class nsIVariant;
/***************************************************************************/
#define NS_IXPCONNECTJSOBJECTHOLDER_IID_STR \
"73e6ff4a-ab99-4d99-ac00-ba39ccb8e4d7"
#define NS_IXPCONNECTJSOBJECTHOLDER_IID \
{ \
0x73e6ff4a, 0xab99, 0x4d99, { \
0xac, 0x00, 0xba, 0x39, 0xcc, 0xb8, 0xe4, 0xd7 \
} \
}
#define NS_IXPCONNECTJSOBJECTHOLDER_IID \
{0x73e6ff4a, 0xab99, 0x4d99, {0xac, 0x00, 0xba, 0x39, 0xcc, 0xb8, 0xe4, 0xd7}}
class NS_NO_VTABLE nsIXPConnectJSObjectHolder : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTJSOBJECTHOLDER_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXPCONNECTJSOBJECTHOLDER_IID)
virtual JSObject* GetJSObject() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectJSObjectHolder,
NS_IXPCONNECTJSOBJECTHOLDER_IID)
#define NS_IXPCONNECTWRAPPEDNATIVE_IID_STR \
"e787be29-db5d-4a45-a3d6-1de1d6b85c30"
#define NS_IXPCONNECTWRAPPEDNATIVE_IID \
{ \
0xe787be29, 0xdb5d, 0x4a45, { \
0xa3, 0xd6, 0x1d, 0xe1, 0xd6, 0xb8, 0x5c, 0x30 \
} \
}
#define NS_IXPCONNECTWRAPPEDNATIVE_IID \
{0xe787be29, 0xdb5d, 0x4a45, {0xa3, 0xd6, 0x1d, 0xe1, 0xd6, 0xb8, 0x5c, 0x30}}
class nsIXPConnectWrappedNative : public nsIXPConnectJSObjectHolder {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDNATIVE_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXPCONNECTWRAPPEDNATIVE_IID)
nsresult DebugDump(int16_t depth);
@@ -70,20 +59,13 @@ class nsIXPConnectWrappedNative : public nsIXPConnectJSObjectHolder {
XPCWrappedNative* AsXPCWrappedNative();
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedNative,
NS_IXPCONNECTWRAPPEDNATIVE_IID)
#define NS_IXPCONNECTWRAPPEDJS_IID_STR "3a01b0d6-074b-49ed-bac3-08c76366cae4"
#define NS_IXPCONNECTWRAPPEDJS_IID \
{ \
0x3a01b0d6, 0x074b, 0x49ed, { \
0xba, 0xc3, 0x08, 0xc7, 0x63, 0x66, 0xca, 0xe4 \
} \
}
#define NS_IXPCONNECTWRAPPEDJS_IID \
{0x3a01b0d6, 0x074b, 0x49ed, {0xba, 0xc3, 0x08, 0xc7, 0x63, 0x66, 0xca, 0xe4}}
class nsIXPConnectWrappedJS : public nsIXPConnectJSObjectHolder {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDJS_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXPCONNECTWRAPPEDJS_IID)
nsresult GetInterfaceIID(nsIID** aInterfaceIID);
@@ -102,16 +84,10 @@ class nsIXPConnectWrappedJS : public nsIXPConnectJSObjectHolder {
nsXPCWrappedJS* AsXPCWrappedJS();
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJS, NS_IXPCONNECTWRAPPEDJS_IID)
#define NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID_STR \
"c02a0ce6-275f-4ea1-9c23-08494898b070"
#define NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID \
{ \
0xc02a0ce6, 0x275f, 0x4ea1, { \
0x9c, 0x23, 0x08, 0x49, 0x48, 0x98, 0xb0, 0x70 \
} \
}
#define NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID \
{0xc02a0ce6, 0x275f, 0x4ea1, {0x9c, 0x23, 0x08, 0x49, 0x48, 0x98, 0xb0, 0x70}}
// Special interface to unmark the internal JSObject.
// QIing to nsIXPConnectWrappedJSUnmarkGray does *not* addref, it only unmarks,
@@ -119,25 +95,18 @@ NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJS, NS_IXPCONNECTWRAPPEDJS_IID)
class NS_NO_VTABLE nsIXPConnectWrappedJSUnmarkGray
: public nsIXPConnectWrappedJS {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID)
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJSUnmarkGray,
NS_IXPCONNECTWRAPPEDJSUNMARKGRAY_IID)
/***************************************************************************/
#define NS_IXPCONNECT_IID_STR "768507b5-b981-40c7-8276-f6a1da502a24"
#define NS_IXPCONNECT_IID \
{ \
0x768507b5, 0xb981, 0x40c7, { \
0x82, 0x76, 0xf6, 0xa1, 0xda, 0x50, 0x2a, 0x24 \
} \
}
#define NS_IXPCONNECT_IID \
{0x768507b5, 0xb981, 0x40c7, {0x82, 0x76, 0xf6, 0xa1, 0xda, 0x50, 0x2a, 0x24}}
class nsIXPConnect : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECT_IID)
NS_INLINE_DECL_STATIC_IID(NS_IXPCONNECT_IID)
// This gets a non-addref'd pointer.
static nsIXPConnect* XPConnect();
@@ -286,6 +255,4 @@ class nsIXPConnect : public nsISupports {
JS::MutableHandle<JS::Value> rval);
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnect, NS_IXPCONNECT_IID)
#endif // defined nsIXPConnect_h

View File

@@ -2097,7 +2097,7 @@ class XPCVariant : public nsIVariant {
// We #define and iid so that out module local code can use QI to detect
// if a given nsIVariant is in fact an XPCVariant.
NS_DECLARE_STATIC_IID_ACCESSOR(XPCVARIANT_IID)
NS_INLINE_DECL_STATIC_IID(XPCVARIANT_IID)
static already_AddRefed<XPCVariant> newVariant(JSContext* cx,
const JS::Value& aJSVal);
@@ -2148,8 +2148,6 @@ class XPCVariant : public nsIVariant {
bool mReturnRawObject;
};
NS_DEFINE_STATIC_IID_ACCESSOR(XPCVariant, XPCVARIANT_IID)
/***************************************************************************/
// Utilities

View File

@@ -169,7 +169,7 @@ class PresShell final : public nsStubDocumentObserver,
// nsISupports
NS_DECL_ISUPPORTS
NS_DECLARE_STATIC_IID_ACCESSOR(NS_PRESSHELL_IID)
NS_INLINE_DECL_STATIC_IID(NS_PRESSHELL_IID)
static bool AccessibleCaretEnabled(nsIDocShell* aDocShell);
@@ -3320,8 +3320,6 @@ class PresShell final : public nsStubDocumentObserver,
static bool sProcessInteractable;
};
NS_DEFINE_STATIC_IID_ACCESSOR(PresShell, NS_PRESSHELL_IID)
} // namespace mozilla
#endif // mozilla_PresShell_h

View File

@@ -18,12 +18,8 @@ class nsPresContext;
class nsViewManager;
// {c6f255cf-cadd-4382-b57f-cd2a9874169b}
#define NS_IDOCUMENT_VIEWER_PRINT_IID \
{ \
0xc6f255cf, 0xcadd, 0x4382, { \
0xb5, 0x7f, 0xcd, 0x2a, 0x98, 0x74, 0x16, 0x9b \
} \
}
#define NS_IDOCUMENT_VIEWER_PRINT_IID \
{0xc6f255cf, 0xcadd, 0x4382, {0xb5, 0x7f, 0xcd, 0x2a, 0x98, 0x74, 0x16, 0x9b}}
/**
* A DocumentViewerPrint is an INTERNAL Interface used for interaction
@@ -31,7 +27,7 @@ class nsViewManager;
*/
class nsIDocumentViewerPrint : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_VIEWER_PRINT_IID)
NS_INLINE_DECL_STATIC_IID(NS_IDOCUMENT_VIEWER_PRINT_IID)
virtual bool GetIsPrinting() const = 0;
@@ -56,9 +52,6 @@ class nsIDocumentViewerPrint : public nsISupports {
mozilla::PresShell* aPresShell) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsIDocumentViewerPrint,
NS_IDOCUMENT_VIEWER_PRINT_IID)
/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_NSIDOCUMENTVIEWERPRINT \
bool GetIsPrinting() const override; \

View File

@@ -40,16 +40,12 @@ class DocGroup;
} // namespace mozilla
// dbeabbfa-6cb3-4f5c-aec2-dd558d9d681f
#define NS_ICSSDECLARATION_IID \
{ \
0xdbeabbfa, 0x6cb3, 0x4f5c, { \
0xae, 0xc2, 0xdd, 0x55, 0x8d, 0x9d, 0x68, 0x1f \
} \
}
#define NS_ICSSDECLARATION_IID \
{0xdbeabbfa, 0x6cb3, 0x4f5c, {0xae, 0xc2, 0xdd, 0x55, 0x8d, 0x9d, 0x68, 0x1f}}
class nsICSSDeclaration : public nsISupports, public nsWrapperCache {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSDECLARATION_IID)
NS_INLINE_DECL_STATIC_IID(NS_ICSSDECLARATION_IID)
virtual nsINode* GetAssociatedNode() const = 0;
virtual nsISupports* GetParentObject() const = 0;
@@ -110,8 +106,6 @@ class nsICSSDeclaration : public nsISupports, public nsWrapperCache {
bool IsReadOnly();
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSDeclaration, NS_ICSSDECLARATION_IID)
#define NS_DECL_NSIDOMCSSSTYLEDECLARATION_HELPER \
void GetCssText(nsACString& aCssText) override; \
void SetCssText(const nsACString& aCssText, nsIPrincipal* aSubjectPrincipal, \

View File

@@ -11,12 +11,8 @@
#include "nsISupports.h"
#define NS_ICSSLOADEROBSERVER_IID \
{ \
0xf51fbf2c, 0xfe4b, 0x4a15, { \
0xaf, 0x7e, 0x5e, 0x20, 0x64, 0x5f, 0xaf, 0x58 \
} \
}
#define NS_ICSSLOADEROBSERVER_IID \
{0xf51fbf2c, 0xfe4b, 0x4a15, {0xaf, 0x7e, 0x5e, 0x20, 0x64, 0x5f, 0xaf, 0x58}}
namespace mozilla {
class StyleSheet;
@@ -24,7 +20,7 @@ class StyleSheet;
class nsICSSLoaderObserver : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ICSSLOADEROBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(NS_ICSSLOADEROBSERVER_IID)
/**
* StyleSheetLoaded is called after aSheet is marked complete and before any
@@ -43,6 +39,4 @@ class nsICSSLoaderObserver : public nsISupports {
nsresult aStatus) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsICSSLoaderObserver, NS_ICSSLOADEROBSERVER_IID)
#endif // nsICSSLoaderObserver_h___

View File

@@ -49,7 +49,7 @@ namespace mozilla {
class ISVGFilterObserverList : public nsISupports {
public:
NS_DECLARE_STATIC_IID_ACCESSOR(MOZILLA_ICANVASFILTEROBSERVER_IID)
NS_INLINE_DECL_STATIC_IID(MOZILLA_ICANVASFILTEROBSERVER_IID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_CLASS(ISVGFilterObserverList)
@@ -60,9 +60,6 @@ class ISVGFilterObserverList : public nsISupports {
virtual ~ISVGFilterObserverList() = default;
};
NS_DEFINE_STATIC_IID_ACCESSOR(ISVGFilterObserverList,
MOZILLA_ICANVASFILTEROBSERVER_IID)
/**
* This interface allows us to be notified when a piece of SVG content is
* re-rendered.

View File

@@ -32,12 +32,12 @@ class XULTreeElement;
} // namespace dom
} // namespace mozilla
#define NS_TREECOLUMN_IMPL_CID \
{ /* 02cd1963-4b5d-4a6c-9223-814d3ade93a3 */ \
0x02cd1963, 0x4b5d, 0x4a6c, { \
0x92, 0x23, 0x81, 0x4d, 0x3a, 0xde, 0x93, 0xa3 \
} \
}
#define NS_TREECOLUMN_IMPL_CID \
{/* 02cd1963-4b5d-4a6c-9223-814d3ade93a3 */ \
0x02cd1963, \
0x4b5d, \
0x4a6c, \
{0x92, 0x23, 0x81, 0x4d, 0x3a, 0xde, 0x93, 0xa3}}
// This class is our column info. We use it to iterate our columns and to
// obtain information about each column.
@@ -45,7 +45,7 @@ class nsTreeColumn final : public nsISupports, public nsWrapperCache {
public:
nsTreeColumn(nsTreeColumns* aColumns, mozilla::dom::Element* aElement);
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TREECOLUMN_IMPL_CID)
NS_INLINE_DECL_STATIC_IID(NS_TREECOLUMN_IMPL_CID)
NS_DECL_CYCLE_COLLECTING_ISUPPORTS
NS_DECL_CYCLE_COLLECTION_WRAPPERCACHE_CLASS(nsTreeColumn)
@@ -148,8 +148,6 @@ class nsTreeColumn final : public nsISupports, public nsWrapperCache {
nsTreeColumn* mPrevious;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsTreeColumn, NS_TREECOLUMN_IMPL_CID)
class nsTreeColumns final : public nsISupports, public nsWrapperCache {
private:
~nsTreeColumns();

View File

@@ -14,26 +14,26 @@
#include "nsINestedURI.h"
#include "nsIURIMutator.h"
#define NS_THIS_JARURI_IMPL_CID \
{ /* 9a55f629-730b-4d08-b75b-fa7d9570a691 */ \
0x9a55f629, 0x730b, 0x4d08, { \
0xb7, 0x5b, 0xfa, 0x7d, 0x95, 0x70, 0xa6, 0x91 \
} \
}
#define NS_THIS_JARURI_IMPL_CID \
{/* 9a55f629-730b-4d08-b75b-fa7d9570a691 */ \
0x9a55f629, \
0x730b, \
0x4d08, \
{0xb7, 0x5b, 0xfa, 0x7d, 0x95, 0x70, 0xa6, 0x91}}
#define NS_JARURI_CID \
{ /* 245abae2-b947-4ded-a46d-9829d3cca462 */ \
0x245abae2, 0xb947, 0x4ded, { \
0xa4, 0x6d, 0x98, 0x29, 0xd3, 0xcc, 0xa4, 0x62 \
} \
}
#define NS_JARURI_CID \
{/* 245abae2-b947-4ded-a46d-9829d3cca462 */ \
0x245abae2, \
0xb947, \
0x4ded, \
{0xa4, 0x6d, 0x98, 0x29, 0xd3, 0xcc, 0xa4, 0x62}}
#define NS_JARURIMUTATOR_CID \
{ /* 19d9161b-a2a9-4518-b2c9-fcb8296d6dcd */ \
0x19d9161b, 0xa2a9, 0x4518, { \
0xb2, 0xc9, 0xfc, 0xb8, 0x29, 0x6d, 0x6d, 0xcd \
} \
}
#define NS_JARURIMUTATOR_CID \
{/* 19d9161b-a2a9-4518-b2c9-fcb8296d6dcd */ \
0x19d9161b, \
0xa2a9, \
0x4518, \
{0xb2, 0xc9, 0xfc, 0xb8, 0x29, 0x6d, 0x6d, 0xcd}}
class nsJARURI final : public nsIJARURI,
public nsISerializable,
@@ -46,7 +46,7 @@ class nsJARURI final : public nsIJARURI,
NS_DECL_NSISERIALIZABLE
NS_DECL_NSINESTEDURI
NS_DECLARE_STATIC_IID_ACCESSOR(NS_THIS_JARURI_IMPL_CID)
NS_INLINE_DECL_STATIC_IID(NS_THIS_JARURI_IMPL_CID)
// nsJARURI
nsresult FormatSpec(const nsACString& entryPath, nsACString& result,
@@ -151,6 +151,4 @@ class nsJARURI final : public nsIJARURI,
friend BaseURIMutator<nsJARURI>;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsJARURI, NS_THIS_JARURI_IMPL_CID)
#endif // nsJARURI_h__

View File

@@ -53,17 +53,16 @@ namespace net {
#ifdef MOZ_USE_WIFI_TICKLER
// 8f769ed6-207c-4af9-9f7e-9e832da3754e
# define NS_TICKLER_IID \
{ \
0x8f769ed6, 0x207c, 0x4af9, { \
0x9f, 0x7e, 0x9e, 0x83, 0x2d, 0xa3, 0x75, 0x4e \
} \
}
# define NS_TICKLER_IID \
{0x8f769ed6, \
0x207c, \
0x4af9, \
{0x9f, 0x7e, 0x9e, 0x83, 0x2d, 0xa3, 0x75, 0x4e}}
class Tickler final : public nsSupportsWeakReference {
public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TICKLER_IID)
NS_INLINE_DECL_STATIC_IID(NS_TICKLER_IID)
// These methods are main thread only
Tickler();
@@ -106,8 +105,6 @@ class Tickler final : public nsSupportsWeakReference {
void StopTickler();
};
NS_DEFINE_STATIC_IID_ACCESSOR(Tickler, NS_TICKLER_IID)
#else // not defined MOZ_USE_WIFI_TICKLER
class Tickler final : public nsISupports {
@@ -119,7 +116,7 @@ class Tickler final : public nsISupports {
Tickler() = default;
nsresult Init() { return NS_ERROR_NOT_IMPLEMENTED; }
void Cancel() {}
void SetIPV4Address(uint32_t){};
void SetIPV4Address(uint32_t) {};
void SetIPV4Port(uint16_t) {}
void Tickle() {}
};

View File

@@ -205,7 +205,7 @@ class nsBaseChannel
// Helper function for querying the channel's notification callbacks.
template <class T>
void GetCallback(nsCOMPtr<T>& result) {
GetInterface(NS_GET_TEMPLATE_IID(T), getter_AddRefs(result));
GetInterface(NS_GET_IID(T), getter_AddRefs(result));
}
// If a subclass does not want to feed transport-layer progress events to the

View File

@@ -22,12 +22,8 @@ class nsIInputStream;
class nsILoadGroup;
class nsIStreamListener;
#define NS_INPUT_STREAM_PUMP_IID \
{ \
0x42f1cc9b, 0xdf5f, 0x4c9b, { \
0xbd, 0x71, 0x8d, 0x4a, 0xe2, 0x27, 0xc1, 0x8a \
} \
}
#define NS_INPUT_STREAM_PUMP_IID \
{0x42f1cc9b, 0xdf5f, 0x4c9b, {0xbd, 0x71, 0x8d, 0x4a, 0xe2, 0x27, 0xc1, 0x8a}}
class nsInputStreamPump final : public nsIInputStreamPump,
public nsIInputStreamCallback,
@@ -42,7 +38,7 @@ class nsInputStreamPump final : public nsIInputStreamPump,
NS_DECL_NSIINPUTSTREAMPUMP
NS_DECL_NSIINPUTSTREAMCALLBACK
NS_DECL_NSITHREADRETARGETABLEREQUEST
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INPUT_STREAM_PUMP_IID)
NS_INLINE_DECL_STATIC_IID(NS_INPUT_STREAM_PUMP_IID)
nsInputStreamPump();
@@ -124,6 +120,4 @@ class nsInputStreamPump final : public nsIInputStreamPump,
mozilla::RecursiveMutex mMutex{"nsInputStreamPump"};
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsInputStreamPump, NS_INPUT_STREAM_PUMP_IID)
#endif // !nsInputStreamChannel_h__

View File

@@ -683,8 +683,7 @@ inline void NS_QueryNotificationCallbacks(T* channel, const nsIID& iid,
template <class C, class T>
inline void NS_QueryNotificationCallbacks(C* channel, nsCOMPtr<T>& result) {
NS_QueryNotificationCallbacks(channel, NS_GET_TEMPLATE_IID(T),
getter_AddRefs(result));
NS_QueryNotificationCallbacks(channel, NS_GET_IID(T), getter_AddRefs(result));
}
/**
@@ -761,7 +760,7 @@ template <class T>
inline void NS_QueryNotificationCallbacks(nsIInterfaceRequestor* callbacks,
nsILoadGroup* loadGroup,
nsCOMPtr<T>& result) {
NS_QueryNotificationCallbacks(callbacks, loadGroup, NS_GET_TEMPLATE_IID(T),
NS_QueryNotificationCallbacks(callbacks, loadGroup, NS_GET_IID(T),
getter_AddRefs(result));
}

Some files were not shown because too many files have changed in this diff Show More