mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-22 02:09:28 +00:00
Bug 1296726, part 1 - Remove trailing whitespace from xpcom/reflect/xptinfo. r=froydnj
MozReview-Commit-ID: ewdP6XFfmr
This commit is contained in:
parent
427e9d567c
commit
fc6173089e
@ -330,7 +330,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(AnimationEvent),
|
||||
DEFINE_SHIM(Attr),
|
||||
DEFINE_SHIM(BeforeUnloadEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIBrowserBoxObject, ContainerBoxObject),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIBrowserBoxObject, ContainerBoxObject),
|
||||
DEFINE_SHIM(CanvasRenderingContext2D),
|
||||
DEFINE_SHIM(CDATASection),
|
||||
DEFINE_SHIM(CharacterData),
|
||||
@ -433,7 +433,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(Rect),
|
||||
DEFINE_SHIM(Screen),
|
||||
DEFINE_SHIM(ScrollAreaEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIScrollBoxObject, ScrollBoxObject),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsIDOMSerializer, XMLSerializer),
|
||||
DEFINE_SHIM(SimpleGestureEvent),
|
||||
DEFINE_SHIM(StyleSheet),
|
||||
@ -444,7 +444,7 @@ const ComponentsInterfaceShimEntry kComponentsInterfaceShimMap[] =
|
||||
DEFINE_SHIM(TimeEvent),
|
||||
DEFINE_SHIM(TimeRanges),
|
||||
DEFINE_SHIM(TransitionEvent),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
|
||||
DEFINE_SHIM_WITH_CUSTOM_INTERFACE(nsITreeBoxObject, TreeBoxObject),
|
||||
DEFINE_SHIM(TreeWalker),
|
||||
DEFINE_SHIM(UIEvent),
|
||||
DEFINE_SHIM(ValidityState),
|
||||
|
@ -14,7 +14,7 @@
|
||||
[ptr] native nsXPTParamInfoPtr(nsXPTParamInfo);
|
||||
native nsXPTType(nsXPTType);
|
||||
|
||||
// We bend the rules to do a [shared] nsIID (but this is never scriptable)
|
||||
// We bend the rules to do a [shared] nsIID (but this is never scriptable)
|
||||
[ptr] native nsIIDPtrShared(nsIID);
|
||||
|
||||
%{C++
|
||||
@ -42,14 +42,14 @@ interface nsIInterfaceInfo : nsISupports
|
||||
|
||||
/**
|
||||
* These include methods and constants for parent (and all ancestors).
|
||||
*
|
||||
*
|
||||
* These do *not* make copies ***explicit bending of XPCOM rules***.
|
||||
*/
|
||||
|
||||
void getMethodInfo(in uint16_t index,
|
||||
|
||||
void getMethodInfo(in uint16_t index,
|
||||
[shared, retval] out nsXPTMethodInfoPtr info);
|
||||
|
||||
void getMethodInfoForName(in string methodName, out uint16_t index,
|
||||
void getMethodInfoForName(in string methodName, out uint16_t index,
|
||||
[shared, retval] out nsXPTMethodInfoPtr info);
|
||||
|
||||
void getConstant(in uint16_t index,
|
||||
@ -62,10 +62,10 @@ interface nsIInterfaceInfo : nsISupports
|
||||
* method in this interface.
|
||||
*/
|
||||
|
||||
nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex,
|
||||
nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param);
|
||||
|
||||
nsIIDPtr getIIDForParam(in uint16_t methodIndex,
|
||||
nsIIDPtr getIIDForParam(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param);
|
||||
|
||||
|
||||
@ -73,15 +73,15 @@ interface nsIInterfaceInfo : nsISupports
|
||||
* These do *not* make copies ***explicit bending of XPCOM rules***.
|
||||
*/
|
||||
|
||||
nsXPTType getTypeForParam(in uint16_t methodIndex,
|
||||
nsXPTType getTypeForParam(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param,
|
||||
in uint16_t dimension);
|
||||
|
||||
uint8_t getSizeIsArgNumberForParam(in uint16_t methodIndex,
|
||||
uint8_t getSizeIsArgNumberForParam(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param,
|
||||
in uint16_t dimension);
|
||||
|
||||
uint8_t getInterfaceIsArgNumberForParam(in uint16_t methodIndex,
|
||||
uint8_t getInterfaceIsArgNumberForParam(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param);
|
||||
|
||||
boolean isIID(in nsIIDPtr IID);
|
||||
@ -93,10 +93,9 @@ interface nsIInterfaceInfo : nsISupports
|
||||
|
||||
boolean hasAncestor(in nsIIDPtr iid);
|
||||
|
||||
[notxpcom] nsresult getIIDForParamNoAlloc(in uint16_t methodIndex,
|
||||
[notxpcom] nsresult getIIDForParamNoAlloc(in uint16_t methodIndex,
|
||||
[const] in nsXPTParamInfoPtr param,
|
||||
out nsIID iid);
|
||||
|
||||
boolean isMainProcessScriptableOnly();
|
||||
};
|
||||
|
||||
|
@ -29,9 +29,8 @@ interface nsIInterfaceInfoManager : nsISupports
|
||||
#define NS_INTERFACEINFOMANAGER_SERVICE_CID \
|
||||
{ /* 13bef784-f8e0-4f96-85c1-09f9ef4f9a19 */ \
|
||||
0x13bef784, 0xf8e0, 0x4f96, \
|
||||
{0x85, 0xc1, 0x09, 0xf9, 0xef, 0x4f, 0x9a, 0x19} }
|
||||
{0x85, 0xc1, 0x09, 0xf9, 0xef, 0x4f, 0x9a, 0x19} }
|
||||
|
||||
#define NS_INTERFACEINFOMANAGER_SERVICE_CONTRACTID \
|
||||
"@mozilla.org/xpti/interfaceinfomanager-service;1"
|
||||
%}
|
||||
|
||||
|
@ -146,7 +146,7 @@ XPTInterfaceInfoManager::VerifyAndAddEntryIfNew(XPTInterfaceDirectoryEntry* ifac
|
||||
fprintf(stderr, "ignoring too large interface: %s\n", iface->name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
mWorkingSet.mTableReentrantMonitor.AssertCurrentThreadIn();
|
||||
xptiInterfaceEntry* entry = mWorkingSet.mIIDTable.Get(iface->iid);
|
||||
if (entry) {
|
||||
@ -154,8 +154,8 @@ XPTInterfaceInfoManager::VerifyAndAddEntryIfNew(XPTInterfaceDirectoryEntry* ifac
|
||||
LOG_AUTOREG((" ignoring repeated interface: %s\n", iface->name));
|
||||
return;
|
||||
}
|
||||
|
||||
// Build a new xptiInterfaceEntry object and hook it up.
|
||||
|
||||
// Build a new xptiInterfaceEntry object and hook it up.
|
||||
|
||||
entry = xptiInterfaceEntry::Create(iface->name,
|
||||
iface->iid,
|
||||
@ -179,17 +179,17 @@ XPTInterfaceInfoManager::VerifyAndAddEntryIfNew(XPTInterfaceDirectoryEntry* ifac
|
||||
}
|
||||
|
||||
// this is a private helper
|
||||
static nsresult
|
||||
static nsresult
|
||||
EntryToInfo(xptiInterfaceEntry* entry, nsIInterfaceInfo **_retval)
|
||||
{
|
||||
if (!entry) {
|
||||
*_retval = nullptr;
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
RefPtr<xptiInterfaceInfo> info = entry->InterfaceInfo();
|
||||
info.forget(_retval);
|
||||
return NS_OK;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
xptiInterfaceEntry*
|
||||
@ -231,7 +231,7 @@ XPTInterfaceInfoManager::GetIIDForName(const char *name, nsIID * *_retval)
|
||||
xptiInterfaceEntry* entry = mWorkingSet.mNameTable.Get(name);
|
||||
if (!entry) {
|
||||
*_retval = nullptr;
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return entry->GetIID(_retval);
|
||||
@ -247,7 +247,7 @@ XPTInterfaceInfoManager::GetNameForIID(const nsIID * iid, char **_retval)
|
||||
xptiInterfaceEntry* entry = mWorkingSet.mIIDTable.Get(*iid);
|
||||
if (!entry) {
|
||||
*_retval = nullptr;
|
||||
return NS_ERROR_FAILURE;
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
return entry->GetName(_retval);
|
||||
|
@ -17,8 +17,8 @@ class MOZ_NEEDS_NO_VTABLE_TYPE CheckNoVTable
|
||||
};
|
||||
CheckNoVTable<xptiTypelibGuts> gChecker;
|
||||
|
||||
// static
|
||||
xptiTypelibGuts*
|
||||
// static
|
||||
xptiTypelibGuts*
|
||||
xptiTypelibGuts::Create(XPTHeader* aHeader)
|
||||
{
|
||||
NS_ASSERTION(aHeader, "bad param");
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "nscore.h"
|
||||
#include "xpt_struct.h"
|
||||
|
||||
// Flyweight wrapper classes for xpt_struct.h structs.
|
||||
// Flyweight wrapper classes for xpt_struct.h structs.
|
||||
// Everything here is dependent upon - and sensitive to changes in -
|
||||
// xpcom/typelib/xpt/xpt_struct.h!
|
||||
|
||||
@ -67,8 +67,8 @@ public:
|
||||
bool IsArray() const
|
||||
{return TagPart() == T_ARRAY;}
|
||||
|
||||
// 'Dependent' means that params of this type are dependent upon other
|
||||
// params. e.g. an T_INTERFACE_IS is dependent upon some other param at
|
||||
// 'Dependent' means that params of this type are dependent upon other
|
||||
// params. e.g. an T_INTERFACE_IS is dependent upon some other param at
|
||||
// runtime to say what the interface type of this param really is.
|
||||
bool IsDependent() const
|
||||
{ switch (TagPart()) {
|
||||
|
@ -95,13 +95,13 @@ public:
|
||||
|
||||
XPTHeader* GetHeader() {return mHeader;}
|
||||
uint16_t GetEntryCount() const {return mHeader->num_interfaces;}
|
||||
|
||||
|
||||
void SetEntryAt(uint16_t i, xptiInterfaceEntry* ptr)
|
||||
{
|
||||
NS_ASSERTION(mHeader,"bad state!");
|
||||
NS_ASSERTION(i < GetEntryCount(),"bad param!");
|
||||
mEntryArray[i] = ptr;
|
||||
}
|
||||
}
|
||||
|
||||
xptiInterfaceEntry* GetEntryAt(uint16_t i);
|
||||
const char* GetEntryNameAt(uint16_t i);
|
||||
@ -121,7 +121,7 @@ private:
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
// This class exists to help xptiInterfaceInfo store a 4-state (2 bit) value
|
||||
// This class exists to help xptiInterfaceInfo store a 4-state (2 bit) value
|
||||
// and a set of bitflags in one 8bit value. See below.
|
||||
|
||||
class xptiInfoFlags
|
||||
@ -133,30 +133,30 @@ public:
|
||||
|
||||
static uint8_t GetStateMask()
|
||||
{return uint8_t(STATE_MASK);}
|
||||
|
||||
|
||||
void Clear()
|
||||
{mData = 0;}
|
||||
|
||||
uint8_t GetData() const
|
||||
{return mData;}
|
||||
|
||||
uint8_t GetState() const
|
||||
uint8_t GetState() const
|
||||
{return mData & GetStateMask();}
|
||||
|
||||
void SetState(uint8_t state)
|
||||
{mData &= ~GetStateMask(); mData |= state;}
|
||||
void SetState(uint8_t state)
|
||||
{mData &= ~GetStateMask(); mData |= state;}
|
||||
|
||||
void SetFlagBit(uint8_t flag, bool on)
|
||||
void SetFlagBit(uint8_t flag, bool on)
|
||||
{if(on)
|
||||
mData |= ~GetStateMask() & flag;
|
||||
else
|
||||
mData &= GetStateMask() | ~flag;}
|
||||
|
||||
bool GetFlagBit(uint8_t flag) const
|
||||
bool GetFlagBit(uint8_t flag) const
|
||||
{return (mData & flag) ? true : false;}
|
||||
|
||||
private:
|
||||
uint8_t mData;
|
||||
uint8_t mData;
|
||||
};
|
||||
|
||||
/****************************************************/
|
||||
@ -178,14 +178,14 @@ public:
|
||||
FULLY_RESOLVED = 2,
|
||||
RESOLVE_FAILED = 3
|
||||
};
|
||||
|
||||
|
||||
// Additional bit flags...
|
||||
enum {SCRIPTABLE = 4, BUILTINCLASS = 8, HASNOTXPCOM = 16,
|
||||
MAIN_PROCESS_SCRIPTABLE_ONLY = 32};
|
||||
|
||||
uint8_t GetResolveState() const {return mFlags.GetState();}
|
||||
|
||||
bool IsFullyResolved() const
|
||||
|
||||
bool IsFullyResolved() const
|
||||
{return GetResolveState() == (uint8_t) FULLY_RESOLVED;}
|
||||
|
||||
void SetScriptableFlag(bool on)
|
||||
@ -219,9 +219,9 @@ public:
|
||||
{return IsFullyResolved() ? true : Resolve();}
|
||||
|
||||
already_AddRefed<xptiInterfaceInfo> InterfaceInfo();
|
||||
bool InterfaceInfoEquals(const xptiInterfaceInfo* info) const
|
||||
bool InterfaceInfoEquals(const xptiInterfaceInfo* info) const
|
||||
{return info == mInfo;}
|
||||
|
||||
|
||||
void LockedInvalidateInterfaceInfo();
|
||||
void LockedInterfaceInfoDeathNotification() {mInfo = nullptr;}
|
||||
|
||||
@ -273,13 +273,13 @@ private:
|
||||
xptiTypelibGuts* aTypelib);
|
||||
~xptiInterfaceEntry();
|
||||
|
||||
void SetResolvedState(int state)
|
||||
void SetResolvedState(int state)
|
||||
{mFlags.SetState(uint8_t(state));}
|
||||
|
||||
bool Resolve();
|
||||
|
||||
// We only call these "*Locked" variants after locking. This is done to
|
||||
// allow reentrace as files are loaded and various interfaces resolved
|
||||
// We only call these "*Locked" variants after locking. This is done to
|
||||
// allow reentrace as files are loaded and various interfaces resolved
|
||||
// without having to worry about the locked state.
|
||||
|
||||
bool EnsureResolvedLocked()
|
||||
@ -288,7 +288,7 @@ private:
|
||||
|
||||
// private helpers
|
||||
|
||||
nsresult GetEntryForParam(uint16_t methodIndex,
|
||||
nsresult GetEntryForParam(uint16_t methodIndex,
|
||||
const nsXPTParamInfo * param,
|
||||
xptiInterfaceEntry** entry);
|
||||
|
||||
@ -374,7 +374,7 @@ private:
|
||||
NS_ASSERTION(mEntry && mEntry->IsFullyResolved(), "bad EnsureParent call");
|
||||
return mParent || !mEntry->Parent() || BuildParent();
|
||||
}
|
||||
|
||||
|
||||
bool EnsureResolved()
|
||||
{
|
||||
return mEntry && mEntry->EnsureResolved();
|
||||
|
Loading…
x
Reference in New Issue
Block a user