mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 11:57:32 +09:00
Fix build error in nsStyleCoord
This commit is contained in:
parent
f2c3f135b5
commit
1d6a74d103
1 changed files with 54 additions and 0 deletions
|
|
@ -114,7 +114,34 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CalcNode final {
|
struct CalcNode final {
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
MOZ_NEVER_INLINE MozExternalRefCountType AddRef(void)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(CalcNode)
|
||||||
|
MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");
|
||||||
|
nsrefcnt count = ++mRefCnt;
|
||||||
|
NS_LOG_ADDREF(this, count, "CalcNode", sizeof(*this));
|
||||||
|
return (nsrefcnt) count;
|
||||||
|
}
|
||||||
|
|
||||||
|
MOZ_NEVER_INLINE MozExternalRefCountType Release(void)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");
|
||||||
|
nsrefcnt count = --mRefCnt;
|
||||||
|
NS_LOG_RELEASE(this, count, "CalcNode");
|
||||||
|
if (count == 0) {
|
||||||
|
delete (this);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
typedef mozilla::TrueType HasThreadSafeRefCnt;
|
||||||
|
protected:
|
||||||
|
::mozilla::ThreadSafeAutoRefCnt mRefCnt;
|
||||||
|
public:
|
||||||
|
#else
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CalcNode)
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(CalcNode)
|
||||||
|
#endif
|
||||||
|
|
||||||
enum class Type : uint8_t {
|
enum class Type : uint8_t {
|
||||||
Leaf,
|
Leaf,
|
||||||
|
|
@ -151,7 +178,34 @@ public:
|
||||||
// Reference counted calc() value. This is the type that is used to store
|
// Reference counted calc() value. This is the type that is used to store
|
||||||
// the calc() value in nsStyleCoord.
|
// the calc() value in nsStyleCoord.
|
||||||
struct Calc final : public CalcValue {
|
struct Calc final : public CalcValue {
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
MOZ_NEVER_INLINE MozExternalRefCountType AddRef(void)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT_TYPE_OK_FOR_REFCOUNTING(Calc)
|
||||||
|
MOZ_ASSERT(int32_t(mRefCnt) >= 0, "illegal refcnt");
|
||||||
|
nsrefcnt count = ++mRefCnt;
|
||||||
|
NS_LOG_ADDREF(this, count, "Calc", sizeof(*this));
|
||||||
|
return (nsrefcnt) count;
|
||||||
|
}
|
||||||
|
|
||||||
|
MOZ_NEVER_INLINE MozExternalRefCountType Release(void)
|
||||||
|
{
|
||||||
|
MOZ_ASSERT(int32_t(mRefCnt) > 0, "dup release");
|
||||||
|
nsrefcnt count = --mRefCnt;
|
||||||
|
NS_LOG_RELEASE(this, count, "Calc");
|
||||||
|
if (count == 0) {
|
||||||
|
delete (this);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
typedef mozilla::TrueType HasThreadSafeRefCnt;
|
||||||
|
protected:
|
||||||
|
::mozilla::ThreadSafeAutoRefCnt mRefCnt;
|
||||||
|
public:
|
||||||
|
#else
|
||||||
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Calc)
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(Calc)
|
||||||
|
#endif
|
||||||
Calc() {}
|
Calc() {}
|
||||||
|
|
||||||
bool HasCalcNode() const { return !!mNode; }
|
bool HasCalcNode() const { return !!mNode; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue