mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1046841 - Fix more style violations in previously touched .h files in xpcom/. r=froydnj
This commit is contained in:
parent
9007abe84e
commit
87bd70f161
@ -154,7 +154,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
const char* library = mLibraryStrings.Intern(details.library);
|
const char* library = mLibraryStrings.Intern(details.library);
|
||||||
entry.Replace(aPc, details.function, library, details.loffset, details.filename, details.lineno);
|
entry.Replace(aPc, details.function, library, details.loffset,
|
||||||
|
details.filename, details.lineno);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
mNumCacheHits++;
|
mNumCacheHits++;
|
||||||
|
@ -121,22 +121,13 @@ protected:
|
|||||||
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
size_t SizeOfExcludingThis(mozilla::MallocSizeOf aMallocSizeOf) const;
|
||||||
void UnmarkSkippableJSHolders();
|
void UnmarkSkippableJSHolders();
|
||||||
|
|
||||||
virtual void TraverseAdditionalNativeRoots(nsCycleCollectionNoteRootCallback& aCb)
|
virtual void
|
||||||
{
|
TraverseAdditionalNativeRoots(nsCycleCollectionNoteRootCallback& aCb) {}
|
||||||
}
|
virtual void TraceAdditionalNativeGrayRoots(JSTracer* aTracer) {}
|
||||||
virtual void TraceAdditionalNativeGrayRoots(JSTracer* aTracer)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void CustomGCCallback(JSGCStatus aStatus)
|
virtual void CustomGCCallback(JSGCStatus aStatus) {}
|
||||||
{
|
virtual void CustomOutOfMemoryCallback() {}
|
||||||
}
|
virtual void CustomLargeAllocationFailureCallback() {}
|
||||||
virtual void CustomOutOfMemoryCallback()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual void CustomLargeAllocationFailureCallback()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
virtual bool CustomContextCallback(JSContext* aCx, unsigned aOperation)
|
virtual bool CustomContextCallback(JSContext* aCx, unsigned aOperation)
|
||||||
{
|
{
|
||||||
return true; // Don't block context creation.
|
return true; // Don't block context creation.
|
||||||
@ -191,8 +182,8 @@ private:
|
|||||||
static void TraceBlackJS(JSTracer* aTracer, void* aData);
|
static void TraceBlackJS(JSTracer* aTracer, void* aData);
|
||||||
static void TraceGrayJS(JSTracer* aTracer, void* aData);
|
static void TraceGrayJS(JSTracer* aTracer, void* aData);
|
||||||
static void GCCallback(JSRuntime* aRuntime, JSGCStatus aStatus, void* aData);
|
static void GCCallback(JSRuntime* aRuntime, JSGCStatus aStatus, void* aData);
|
||||||
static void OutOfMemoryCallback(JSContext *aContext, void *aData);
|
static void OutOfMemoryCallback(JSContext* aContext, void* aData);
|
||||||
static void LargeAllocationFailureCallback(void *aData);
|
static void LargeAllocationFailureCallback(void* aData);
|
||||||
static bool ContextCallback(JSContext* aCx, unsigned aOperation,
|
static bool ContextCallback(JSContext* aCx, unsigned aOperation,
|
||||||
void* aData);
|
void* aData);
|
||||||
|
|
||||||
@ -240,7 +231,7 @@ public:
|
|||||||
MOZ_END_NESTED_ENUM_CLASS(OOMState)
|
MOZ_END_NESTED_ENUM_CLASS(OOMState)
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AnnotateAndSetOutOfMemory(OOMState *aStatePtr, OOMState aNewState);
|
void AnnotateAndSetOutOfMemory(OOMState* aStatePtr, OOMState aNewState);
|
||||||
void OnGC(JSGCStatus aStatus);
|
void OnGC(JSGCStatus aStatus);
|
||||||
void OnOutOfMemory();
|
void OnOutOfMemory();
|
||||||
void OnLargeAllocationFailure();
|
void OnLargeAllocationFailure();
|
||||||
|
@ -54,15 +54,9 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
T* get() const
|
T* get() const { return mRawPtr; }
|
||||||
{
|
|
||||||
return mRawPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
operator T*() const
|
operator T*() const { return get(); }
|
||||||
{
|
|
||||||
return get();
|
|
||||||
}
|
|
||||||
|
|
||||||
T* operator->() const
|
T* operator->() const
|
||||||
{
|
{
|
||||||
@ -70,10 +64,7 @@ public:
|
|||||||
return get();
|
return get();
|
||||||
}
|
}
|
||||||
|
|
||||||
T& operator*() const
|
T& operator*() const { return *get(); }
|
||||||
{
|
|
||||||
return *get();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Disallow copy constructor, but only in debug mode. We only define
|
// Disallow copy constructor, but only in debug mode. We only define
|
||||||
@ -120,15 +111,9 @@ public:
|
|||||||
return (this = aRhs.mRawPtr);
|
return (this = aRhs.mRawPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
T* get() const
|
T* get() const { return mRawPtr; }
|
||||||
{
|
|
||||||
return mRawPtr;
|
|
||||||
}
|
|
||||||
|
|
||||||
operator T*() const
|
operator T*() const { return get(); }
|
||||||
{
|
|
||||||
return get();
|
|
||||||
}
|
|
||||||
|
|
||||||
T* operator->() const
|
T* operator->() const
|
||||||
{
|
{
|
||||||
@ -136,10 +121,7 @@ public:
|
|||||||
return get();
|
return get();
|
||||||
}
|
}
|
||||||
|
|
||||||
T& operator*() const
|
T& operator*() const { return *get(); }
|
||||||
{
|
|
||||||
return *get();
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void AssignWithAddref(T* aNewPtr)
|
void AssignWithAddref(T* aNewPtr)
|
||||||
|
@ -53,8 +53,10 @@ public:
|
|||||||
virtual nsresult LogMessageWithMode(nsIConsoleMessage* aMessage,
|
virtual nsresult LogMessageWithMode(nsIConsoleMessage* aMessage,
|
||||||
OutputMode aOutputMode);
|
OutputMode aOutputMode);
|
||||||
|
|
||||||
typedef nsInterfaceHashtable<nsISupportsHashKey, nsIConsoleListener> ListenerHash;
|
typedef nsInterfaceHashtable<nsISupportsHashKey,
|
||||||
void EnumerateListeners(ListenerHash::EnumReadFunction aFunction, void* aClosure);
|
nsIConsoleListener> ListenerHash;
|
||||||
|
void EnumerateListeners(ListenerHash::EnumReadFunction aFunction,
|
||||||
|
void* aClosure);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
~nsConsoleService();
|
~nsConsoleService();
|
||||||
|
@ -23,7 +23,8 @@ SanitizeEnvironmentVariables()
|
|||||||
DWORD bufferSize = GetEnvironmentVariableW(L"PATH", nullptr, 0);
|
DWORD bufferSize = GetEnvironmentVariableW(L"PATH", nullptr, 0);
|
||||||
if (bufferSize) {
|
if (bufferSize) {
|
||||||
wchar_t* originalPath = new wchar_t[bufferSize];
|
wchar_t* originalPath = new wchar_t[bufferSize];
|
||||||
if (bufferSize - 1 == GetEnvironmentVariableW(L"PATH", originalPath, bufferSize)) {
|
if (bufferSize - 1 == GetEnvironmentVariableW(L"PATH", originalPath,
|
||||||
|
bufferSize)) {
|
||||||
bufferSize = ExpandEnvironmentStringsW(originalPath, nullptr, 0);
|
bufferSize = ExpandEnvironmentStringsW(originalPath, nullptr, 0);
|
||||||
if (bufferSize) {
|
if (bufferSize) {
|
||||||
wchar_t* newPath = new wchar_t[bufferSize];
|
wchar_t* newPath = new wchar_t[bufferSize];
|
||||||
|
@ -109,7 +109,8 @@ public:
|
|||||||
nsresult AddObject(T* aObj)
|
nsresult AddObject(T* aObj)
|
||||||
{
|
{
|
||||||
nsExpirationState* state = aObj->GetExpirationState();
|
nsExpirationState* state = aObj->GetExpirationState();
|
||||||
NS_ASSERTION(!state->IsTracked(), "Tried to add an object that's already tracked");
|
NS_ASSERTION(!state->IsTracked(),
|
||||||
|
"Tried to add an object that's already tracked");
|
||||||
nsTArray<T*>& generation = mGenerations[mNewestGeneration];
|
nsTArray<T*>& generation = mGenerations[mNewestGeneration];
|
||||||
uint32_t index = generation.Length();
|
uint32_t index = generation.Length();
|
||||||
if (index > nsExpirationState::MAX_INDEX_IN_GENERATION) {
|
if (index > nsExpirationState::MAX_INDEX_IN_GENERATION) {
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
{0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
|
{0x93, 0xb6, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef nsInterfaceHashtable<nsCharPtrHashKey, nsISupports>
|
typedef nsInterfaceHashtable<nsCharPtrHashKey,
|
||||||
nsProperties_HashBase;
|
nsISupports> nsProperties_HashBase;
|
||||||
|
|
||||||
class nsProperties MOZ_FINAL
|
class nsProperties MOZ_FINAL
|
||||||
: public nsIProperties
|
: public nsIProperties
|
||||||
|
@ -296,7 +296,7 @@ public:
|
|||||||
|
|
||||||
index_type i = 0;
|
index_type i = 0;
|
||||||
size_type len = aStart->mOrderedLT.Length();
|
size_type len = aStart->mOrderedLT.Length();
|
||||||
for (const OrderingEntry* const* it = aStart->mOrderedLT.Elements(); i < len; ++i, ++it) {
|
for (auto it = aStart->mOrderedLT.Elements(); i < len; ++i, ++it) {
|
||||||
if (InTransitiveClosure(*it, aTarget)) {
|
if (InTransitiveClosure(*it, aTarget)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -347,7 +347,7 @@ public:
|
|||||||
|
|
||||||
index_type i = 0;
|
index_type i = 0;
|
||||||
size_type len = aStart->mOrderedLT.Length();
|
size_type len = aStart->mOrderedLT.Length();
|
||||||
for (const OrderingEntry* const* it = aStart->mOrderedLT.Elements(); i < len; ++i, ++it) {
|
for (auto it = aStart->mOrderedLT.Elements(); i < len; ++i, ++it) {
|
||||||
aChain->AppendElement((*it)->mResource);
|
aChain->AppendElement((*it)->mResource);
|
||||||
if (GetDeductionChain_Helper(*it, aTarget, aChain)) {
|
if (GetDeductionChain_Helper(*it, aTarget, aChain)) {
|
||||||
return true;
|
return true;
|
||||||
|
@ -129,7 +129,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
NS_WARN_UNUSED_RESULT bool Put(KeyType aKey, const UserDataType& aData,
|
NS_WARN_UNUSED_RESULT bool Put(KeyType aKey, const UserDataType& aData,
|
||||||
const fallible_t&) {
|
const fallible_t&)
|
||||||
|
{
|
||||||
EntryType* ent = this->PutEntry(aKey);
|
EntryType* ent = this->PutEntry(aKey);
|
||||||
if (!ent) {
|
if (!ent) {
|
||||||
return false;
|
return false;
|
||||||
@ -223,7 +224,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
typedef size_t
|
typedef size_t
|
||||||
(*SizeOfEntryExcludingThisFun)(KeyType aKey,
|
(*SizeOfEntryExcludingThisFun)(KeyType aKey,
|
||||||
const DataType &aData,
|
const DataType& aData,
|
||||||
mozilla::MallocSizeOf aMallocSizeOf,
|
mozilla::MallocSizeOf aMallocSizeOf,
|
||||||
void* aUserArg);
|
void* aUserArg);
|
||||||
|
|
||||||
|
@ -31,7 +31,8 @@ NS_COM_GLUE nsresult CallGetClassObject(const char* aContractID,
|
|||||||
class NS_COM_GLUE nsCreateInstanceByCID : public nsCOMPtr_helper
|
class NS_COM_GLUE nsCreateInstanceByCID : public nsCOMPtr_helper
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
nsCreateInstanceByCID(const nsCID& aCID, nsISupports* aOuter, nsresult* aErrorPtr)
|
nsCreateInstanceByCID(const nsCID& aCID, nsISupports* aOuter,
|
||||||
|
nsresult* aErrorPtr)
|
||||||
: mCID(aCID)
|
: mCID(aCID)
|
||||||
, mOuter(aOuter)
|
, mOuter(aOuter)
|
||||||
, mErrorPtr(aErrorPtr)
|
, mErrorPtr(aErrorPtr)
|
||||||
|
@ -177,7 +177,10 @@ class nsMainThreadPtrHandle
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
nsMainThreadPtrHandle() : mPtr(nullptr) {}
|
nsMainThreadPtrHandle() : mPtr(nullptr) {}
|
||||||
explicit nsMainThreadPtrHandle(nsMainThreadPtrHolder<T>* aHolder) : mPtr(aHolder) {}
|
explicit nsMainThreadPtrHandle(nsMainThreadPtrHolder<T>* aHolder)
|
||||||
|
: mPtr(aHolder)
|
||||||
|
{
|
||||||
|
}
|
||||||
nsMainThreadPtrHandle(const nsMainThreadPtrHandle& aOther)
|
nsMainThreadPtrHandle(const nsMainThreadPtrHandle& aOther)
|
||||||
: mPtr(aOther.mPtr)
|
: mPtr(aOther.mPtr)
|
||||||
{
|
{
|
||||||
|
@ -473,7 +473,7 @@ public:
|
|||||||
}
|
}
|
||||||
// Invoke the copy-constructor in place.
|
// Invoke the copy-constructor in place.
|
||||||
template<class A>
|
template<class A>
|
||||||
static inline void Construct(E* aE, A &&aArg)
|
static inline void Construct(E* aE, A&& aArg)
|
||||||
{
|
{
|
||||||
typedef typename mozilla::RemoveCV<E>::Type E_NoCV;
|
typedef typename mozilla::RemoveCV<E>::Type E_NoCV;
|
||||||
typedef typename mozilla::RemoveCV<A>::Type A_NoCV;
|
typedef typename mozilla::RemoveCV<A>::Type A_NoCV;
|
||||||
@ -1103,8 +1103,9 @@ public:
|
|||||||
{
|
{
|
||||||
// Adjust memory allocation up-front to catch errors.
|
// Adjust memory allocation up-front to catch errors.
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + aArrayLen - aCount,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + aArrayLen - aCount,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
DestructRange(aStart, aCount);
|
DestructRange(aStart, aCount);
|
||||||
this->ShiftData(aStart, aCount, aArrayLen,
|
this->ShiftData(aStart, aCount, aArrayLen,
|
||||||
sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
||||||
@ -1164,8 +1165,9 @@ public:
|
|||||||
elem_type* InsertElementAt(index_type aIndex)
|
elem_type* InsertElementAt(index_type aIndex)
|
||||||
{
|
{
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
this->ShiftData(aIndex, 0, 1, sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
this->ShiftData(aIndex, 0, 1, sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
||||||
elem_type* elem = Elements() + aIndex;
|
elem_type* elem = Elements() + aIndex;
|
||||||
elem_traits::Construct(elem);
|
elem_traits::Construct(elem);
|
||||||
@ -1177,11 +1179,13 @@ public:
|
|||||||
elem_type* InsertElementAt(index_type aIndex, elem_type&& aItem)
|
elem_type* InsertElementAt(index_type aIndex, elem_type&& aItem)
|
||||||
{
|
{
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
this->ShiftData(aIndex, 0, 1, sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
this->ShiftData(aIndex, 0, 1, sizeof(elem_type), MOZ_ALIGNOF(elem_type));
|
||||||
elem_type* elem = Elements() + aIndex;
|
elem_type* elem = Elements() + aIndex;
|
||||||
nsTArrayElementTraits<elem_type>::Construct(elem, mozilla::Forward<elem_type>(aItem));
|
nsTArrayElementTraits<elem_type>::Construct(elem,
|
||||||
|
mozilla::Forward<elem_type>(aItem));
|
||||||
return elem;
|
return elem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1257,8 +1261,9 @@ public:
|
|||||||
elem_type* AppendElements(const Item* aArray, size_type aArrayLen)
|
elem_type* AppendElements(const Item* aArray, size_type aArrayLen)
|
||||||
{
|
{
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + aArrayLen,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + aArrayLen,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
index_type len = Length();
|
index_type len = Length();
|
||||||
AssignRange(len, aArrayLen, aArray);
|
AssignRange(len, aArrayLen, aArray);
|
||||||
this->IncrementLength(aArrayLen);
|
this->IncrementLength(aArrayLen);
|
||||||
@ -1283,11 +1288,13 @@ public:
|
|||||||
elem_type* AppendElement(elem_type&& aItem)
|
elem_type* AppendElement(elem_type&& aItem)
|
||||||
{
|
{
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + 1,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
index_type len = Length();
|
index_type len = Length();
|
||||||
elem_type* iter = Elements() + len;
|
elem_type* iter = Elements() + len;
|
||||||
nsTArrayElementTraits<elem_type>::Construct(iter, mozilla::Forward<elem_type>(aItem));
|
nsTArrayElementTraits<elem_type>::Construct(iter,
|
||||||
|
mozilla::Forward<elem_type>(aItem));
|
||||||
this->IncrementLength(1);
|
this->IncrementLength(1);
|
||||||
return iter;
|
return iter;
|
||||||
}
|
}
|
||||||
@ -1299,8 +1306,9 @@ public:
|
|||||||
elem_type* AppendElements(size_type aCount)
|
elem_type* AppendElements(size_type aCount)
|
||||||
{
|
{
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(Length() + aCount,
|
if (!Alloc::Successful(this->EnsureCapacity(Length() + aCount,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
elem_type* elems = Elements() + Length();
|
elem_type* elems = Elements() + Length();
|
||||||
size_type i;
|
size_type i;
|
||||||
for (i = 0; i < aCount; ++i) {
|
for (i = 0; i < aCount; ++i) {
|
||||||
@ -1325,8 +1333,9 @@ public:
|
|||||||
index_type len = Length();
|
index_type len = Length();
|
||||||
index_type otherLen = aArray.Length();
|
index_type otherLen = aArray.Length();
|
||||||
if (!Alloc::Successful(this->EnsureCapacity(len + otherLen,
|
if (!Alloc::Successful(this->EnsureCapacity(len + otherLen,
|
||||||
sizeof(elem_type))))
|
sizeof(elem_type)))) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
}
|
||||||
copy_type::CopyElements(Elements() + len, aArray.Elements(), otherLen,
|
copy_type::CopyElements(Elements() + len, aArray.Elements(), otherLen,
|
||||||
sizeof(elem_type));
|
sizeof(elem_type));
|
||||||
this->IncrementLength(otherLen);
|
this->IncrementLength(otherLen);
|
||||||
@ -1433,7 +1442,7 @@ public:
|
|||||||
// removes elements from the array (see also RemoveElementsAt).
|
// removes elements from the array (see also RemoveElementsAt).
|
||||||
// @param aNewLen The desired length of this array.
|
// @param aNewLen The desired length of this array.
|
||||||
// @return True if the operation succeeded; false otherwise.
|
// @return True if the operation succeeded; false otherwise.
|
||||||
// See also TruncateLength if the new length is guaranteed to be smaller than
|
// See also TruncateLength if the new length is guaranteed to be smaller than
|
||||||
// the old.
|
// the old.
|
||||||
typename Alloc::ResultType SetLength(size_type aNewLen)
|
typename Alloc::ResultType SetLength(size_type aNewLen)
|
||||||
{
|
{
|
||||||
|
@ -294,7 +294,11 @@ template<class ClassType, bool Owning>
|
|||||||
struct nsRunnableMethodReceiver<ClassType, void, Owning>
|
struct nsRunnableMethodReceiver<ClassType, void, Owning>
|
||||||
{
|
{
|
||||||
ClassType* mObj;
|
ClassType* mObj;
|
||||||
explicit nsRunnableMethodReceiver(ClassType* aObj) : mObj(aObj) { NS_IF_ADDREF(mObj); }
|
explicit nsRunnableMethodReceiver(ClassType* aObj)
|
||||||
|
: mObj(aObj)
|
||||||
|
{
|
||||||
|
NS_IF_ADDREF(mObj);
|
||||||
|
}
|
||||||
~nsRunnableMethodReceiver() { Revoke(); }
|
~nsRunnableMethodReceiver() { Revoke(); }
|
||||||
void Revoke() { NS_IF_RELEASE(mObj); }
|
void Revoke() { NS_IF_RELEASE(mObj); }
|
||||||
};
|
};
|
||||||
|
@ -46,7 +46,8 @@ namespace mozilla {
|
|||||||
int32_t NS_COM_GLUE CompareVersions(const char* aStrA, const char* aStrB);
|
int32_t NS_COM_GLUE CompareVersions(const char* aStrA, const char* aStrB);
|
||||||
|
|
||||||
#ifdef XP_WIN
|
#ifdef XP_WIN
|
||||||
int32_t NS_COM_GLUE CompareVersions(const char16_t* aStrA, const char16_t* aStrB);
|
int32_t NS_COM_GLUE CompareVersions(const char16_t* aStrA,
|
||||||
|
const char16_t* aStrB);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct NS_COM_GLUE Version
|
struct NS_COM_GLUE Version
|
||||||
|
@ -18,22 +18,20 @@
|
|||||||
/**
|
/**
|
||||||
* Enabled preloading of dynamically loaded libraries
|
* Enabled preloading of dynamically loaded libraries
|
||||||
*/
|
*/
|
||||||
extern "C" NS_HIDDEN_(void)
|
extern "C" NS_HIDDEN_(void) XPCOMGlueEnablePreload();
|
||||||
XPCOMGlueEnablePreload();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialize the XPCOM glue by dynamically linking against the XPCOM
|
* Initialize the XPCOM glue by dynamically linking against the XPCOM
|
||||||
* shared library indicated by xpcomFile.
|
* shared library indicated by xpcomFile.
|
||||||
*/
|
*/
|
||||||
extern "C" NS_HIDDEN_(nsresult)
|
extern "C" NS_HIDDEN_(nsresult) XPCOMGlueStartup(const char* xpcomFile);
|
||||||
XPCOMGlueStartup(const char* xpcomFile);
|
|
||||||
|
|
||||||
typedef void (*NSFuncPtr)();
|
typedef void (*NSFuncPtr)();
|
||||||
|
|
||||||
struct nsDynamicFunctionLoad
|
struct nsDynamicFunctionLoad
|
||||||
{
|
{
|
||||||
const char *functionName;
|
const char* functionName;
|
||||||
NSFuncPtr *function;
|
NSFuncPtr* function;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -45,7 +43,7 @@ struct nsDynamicFunctionLoad
|
|||||||
* functions were found.
|
* functions were found.
|
||||||
*/
|
*/
|
||||||
extern "C" NS_HIDDEN_(nsresult)
|
extern "C" NS_HIDDEN_(nsresult)
|
||||||
XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols);
|
XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad* symbols);
|
||||||
|
|
||||||
#endif // XPCOM_GLUE
|
#endif // XPCOM_GLUE
|
||||||
#endif // nsXPCOMGlue_h__
|
#endif // nsXPCOMGlue_h__
|
||||||
|
@ -35,7 +35,8 @@ NtPathToDosPath(const nsAString& aNtPath, nsAString& aDosPath)
|
|||||||
nsAutoString logicalDrives;
|
nsAutoString logicalDrives;
|
||||||
DWORD len = 0;
|
DWORD len = 0;
|
||||||
while (true) {
|
while (true) {
|
||||||
len = GetLogicalDriveStringsW(len, reinterpret_cast<wchar_t*>(logicalDrives.BeginWriting()));
|
len = GetLogicalDriveStringsW(
|
||||||
|
len, reinterpret_cast<wchar_t*>(logicalDrives.BeginWriting()));
|
||||||
if (!len) {
|
if (!len) {
|
||||||
return false;
|
return false;
|
||||||
} else if (len > logicalDrives.Length()) {
|
} else if (len > logicalDrives.Length()) {
|
||||||
|
@ -24,8 +24,6 @@ class nsDirectoryService MOZ_FINAL
|
|||||||
, public nsIDirectoryServiceProvider2
|
, public nsIDirectoryServiceProvider2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
||||||
// nsISupports interface
|
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
|
|
||||||
NS_DECL_NSIPROPERTIES
|
NS_DECL_NSIPROPERTIES
|
||||||
|
@ -18,7 +18,8 @@ inline nsresult
|
|||||||
NS_GetSpecialDirectory(const char* aSpecialDirName, nsIFile** aResult)
|
NS_GetSpecialDirectory(const char* aSpecialDirName, nsIFile** aResult)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsCOMPtr<nsIProperties> serv(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID, &rv));
|
nsCOMPtr<nsIProperties> serv(do_GetService(NS_DIRECTORY_SERVICE_CONTRACTID,
|
||||||
|
&rv));
|
||||||
if (NS_FAILED(rv)) {
|
if (NS_FAILED(rv)) {
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
@ -122,13 +122,15 @@ public:
|
|||||||
if (aN > 0) {
|
if (aN > 0) {
|
||||||
difference_type step = XPCOM_MIN(aN, size_forward());
|
difference_type step = XPCOM_MIN(aN, size_forward());
|
||||||
|
|
||||||
NS_ASSERTION(step > 0, "can't advance a reading iterator beyond the end of a string");
|
NS_ASSERTION(step > 0,
|
||||||
|
"can't advance a reading iterator beyond the end of a string");
|
||||||
|
|
||||||
mPosition += step;
|
mPosition += step;
|
||||||
} else if (aN < 0) {
|
} else if (aN < 0) {
|
||||||
difference_type step = XPCOM_MAX(aN, -size_backward());
|
difference_type step = XPCOM_MAX(aN, -size_backward());
|
||||||
|
|
||||||
NS_ASSERTION(step < 0, "can't advance (backward) a reading iterator beyond the end of a string");
|
NS_ASSERTION(step < 0,
|
||||||
|
"can't advance (backward) a reading iterator beyond the end of a string");
|
||||||
|
|
||||||
mPosition += step;
|
mPosition += step;
|
||||||
}
|
}
|
||||||
@ -248,13 +250,15 @@ public:
|
|||||||
if (aN > 0) {
|
if (aN > 0) {
|
||||||
difference_type step = XPCOM_MIN(aN, size_forward());
|
difference_type step = XPCOM_MIN(aN, size_forward());
|
||||||
|
|
||||||
NS_ASSERTION(step > 0, "can't advance a writing iterator beyond the end of a string");
|
NS_ASSERTION(step > 0,
|
||||||
|
"can't advance a writing iterator beyond the end of a string");
|
||||||
|
|
||||||
mPosition += step;
|
mPosition += step;
|
||||||
} else if (aN < 0) {
|
} else if (aN < 0) {
|
||||||
difference_type step = XPCOM_MAX(aN, -size_backward());
|
difference_type step = XPCOM_MAX(aN, -size_backward());
|
||||||
|
|
||||||
NS_ASSERTION(step < 0, "can't advance (backward) a writing iterator beyond the end of a string");
|
NS_ASSERTION(step < 0,
|
||||||
|
"can't advance (backward) a writing iterator beyond the end of a string");
|
||||||
|
|
||||||
mPosition += step;
|
mPosition += step;
|
||||||
}
|
}
|
||||||
@ -263,7 +267,8 @@ public:
|
|||||||
|
|
||||||
void write(const value_type* aS, uint32_t aN)
|
void write(const value_type* aS, uint32_t aN)
|
||||||
{
|
{
|
||||||
NS_ASSERTION(size_forward() > 0, "You can't |write| into an |nsWritingIterator| with no space!");
|
NS_ASSERTION(size_forward() > 0,
|
||||||
|
"You can't |write| into an |nsWritingIterator| with no space!");
|
||||||
|
|
||||||
nsCharTraits<value_type>::move(mPosition, aS, aN);
|
nsCharTraits<value_type>::move(mPosition, aS, aN);
|
||||||
advance(difference_type(aN));
|
advance(difference_type(aN));
|
||||||
|
@ -768,7 +768,8 @@ public:
|
|||||||
|
|
||||||
size_type GetMutableData(wchar_t** aData, size_type aNewLen, const fallible_t&)
|
size_type GetMutableData(wchar_t** aData, size_type aNewLen, const fallible_t&)
|
||||||
{
|
{
|
||||||
return GetMutableData(reinterpret_cast<char16_t**>(aData), aNewLen, fallible_t());
|
return GetMutableData(reinterpret_cast<char16_t**>(aData), aNewLen,
|
||||||
|
fallible_t());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -958,8 +959,7 @@ protected:
|
|||||||
{
|
{
|
||||||
aCutLength = XPCOM_MIN(aCutLength, mLength - aCutStart);
|
aCutLength = XPCOM_MIN(aCutLength, mLength - aCutStart);
|
||||||
uint32_t newTotalLen = mLength - aCutLength + aNewLength;
|
uint32_t newTotalLen = mLength - aCutLength + aNewLength;
|
||||||
if (aCutStart == mLength && Capacity() > newTotalLen)
|
if (aCutStart == mLength && Capacity() > newTotalLen) {
|
||||||
{
|
|
||||||
mFlags &= ~F_VOIDED;
|
mFlags &= ~F_VOIDED;
|
||||||
mData[newTotalLen] = char_type(0);
|
mData[newTotalLen] = char_type(0);
|
||||||
mLength = newTotalLen;
|
mLength = newTotalLen;
|
||||||
|
@ -40,7 +40,7 @@ void Shutdown();
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Notify the hang monitor of activity which will reset its internal timer.
|
* Notify the hang monitor of activity which will reset its internal timer.
|
||||||
*
|
*
|
||||||
* @param activityType The type of activity being reported.
|
* @param activityType The type of activity being reported.
|
||||||
* @see ActivityType
|
* @see ActivityType
|
||||||
*/
|
*/
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
void Fire();
|
void Fire();
|
||||||
// If a failure is encountered, the reference is returned to the caller
|
// If a failure is encountered, the reference is returned to the caller
|
||||||
static already_AddRefed<nsTimerImpl> PostTimerEvent(
|
static already_AddRefed<nsTimerImpl> PostTimerEvent(
|
||||||
already_AddRefed<nsTimerImpl> aTimerRef);
|
already_AddRefed<nsTimerImpl> aTimerRef);
|
||||||
void SetDelayInternal(uint32_t aDelay);
|
void SetDelayInternal(uint32_t aDelay);
|
||||||
|
|
||||||
NS_DECL_THREADSAFE_ISUPPORTS
|
NS_DECL_THREADSAFE_ISUPPORTS
|
||||||
|
Loading…
Reference in New Issue
Block a user