From 1868e88741dfc593adf74e1df4c8c676002b16d3 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 3 Oct 2022 20:00:02 +0000 Subject: [PATCH 1/4] Fix some debug assertions. refactored code porting in assertions causing debug build failures. --- js/src/jsfun.h | 1 - layout/generic/nsGridContainerFrame.cpp | 1 - layout/generic/nsPageContentFrame.cpp | 2 +- layout/generic/nsPageFrame.cpp | 2 +- layout/generic/nsVideoFrame.cpp | 4 ++-- netwerk/base/nsSocketTransport2.h | 4 ++-- netwerk/protocol/http/nsHttpConnectionMgr.cpp | 2 +- 7 files changed, 7 insertions(+), 9 deletions(-) diff --git a/js/src/jsfun.h b/js/src/jsfun.h index 481f062080..a139bc336a 100644 --- a/js/src/jsfun.h +++ b/js/src/jsfun.h @@ -361,7 +361,6 @@ class JSFunction : public js::NativeObject MOZ_ASSERT(!hasCompileTimeName()); MOZ_ASSERT(!hasGuessedAtom()); MOZ_ASSERT(!isBoundFunction()); - MOZ_ASSERT(js::AtomIsMarked(zone(), atom)); atom_ = atom; flags_ |= HAS_GUESSED_ATOM; } diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index 34113e4fa7..1e1afac234 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -5887,7 +5887,6 @@ nsGridContainerFrame::ReflowChildren(GridReflowInput& aState, nsReflowStatus& aStatus) { MOZ_ASSERT(aState.mReflowInput); - MOZ_ASSERT(aStatus.IsEmpty(), "Caller should pass a fresh reflow status!"); aStatus = NS_FRAME_COMPLETE; nsOverflowAreas ocBounds; diff --git a/layout/generic/nsPageContentFrame.cpp b/layout/generic/nsPageContentFrame.cpp index cb558374db..5a7af2ec85 100644 --- a/layout/generic/nsPageContentFrame.cpp +++ b/layout/generic/nsPageContentFrame.cpp @@ -91,7 +91,7 @@ nsPageContentFrame::Reflow(nsPresContext* aPresContext, FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, 0, 0, ReflowChildFlags::Default); - NS_ASSERTION(aPresContext->IsDynamic() || !aStatus.IsFullyComplete() || + NS_ASSERTION(aPresContext->IsDynamic() || !NS_FRAME_IS_FULLY_COMPLETE(aStatus) || !frame->GetNextInFlow(), "bad child flow list"); } diff --git a/layout/generic/nsPageFrame.cpp b/layout/generic/nsPageFrame.cpp index 6120e35103..1327b3932b 100644 --- a/layout/generic/nsPageFrame.cpp +++ b/layout/generic/nsPageFrame.cpp @@ -148,7 +148,7 @@ nsPageFrame::Reflow(nsPresContext* aPresContext, FinishReflowChild(frame, aPresContext, aDesiredSize, &kidReflowInput, xc, yc, ReflowChildFlags::Default); - NS_ASSERTION(!aStatus.IsFullyComplete() || !frame->GetNextInFlow(), + NS_ASSERTION(!NS_FRAME_IS_FULLY_COMPLETE(aStatus) || !frame->GetNextInFlow(), "bad child flow list"); } PR_PL(("PageFrame::Reflow %p ", this)); diff --git a/layout/generic/nsVideoFrame.cpp b/layout/generic/nsVideoFrame.cpp index 7986f672c1..fb7cefd504 100644 --- a/layout/generic/nsVideoFrame.cpp +++ b/layout/generic/nsVideoFrame.cpp @@ -337,7 +337,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext, ReflowChild(imageFrame, aPresContext, kidDesiredSize, kidReflowInput, posterRenderRect.x, posterRenderRect.y, ReflowChildFlags::Default, childStatus); - MOZ_ASSERT(childStatus.IsFullyComplete(), + MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus), "We gave our child unconstrained available block-size, " "so it should be complete!"); @@ -380,7 +380,7 @@ nsVideoFrame::Reflow(nsPresContext* aPresContext, ReflowChild(child, aPresContext, kidDesiredSize, kidReflowInput, mBorderPadding.left, mBorderPadding.top, ReflowChildFlags::Default, childStatus); - MOZ_ASSERT(childStatus.IsFullyComplete(), + MOZ_ASSERT(NS_FRAME_IS_FULLY_COMPLETE(childStatus), "We gave our child unconstrained available block-size, " "so it should be complete!"); diff --git a/netwerk/base/nsSocketTransport2.h b/netwerk/base/nsSocketTransport2.h index a61e432b48..c36d46c04e 100644 --- a/netwerk/base/nsSocketTransport2.h +++ b/netwerk/base/nsSocketTransport2.h @@ -351,13 +351,13 @@ private: void OnMsgInputPending() { - MOZ_ASSERT(OnSocketThread(), "not on socket thread"); + NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread"); if (mState == STATE_TRANSFERRING) mPollFlags |= (PR_POLL_READ | PR_POLL_EXCEPT); } void OnMsgOutputPending() { - MOZ_ASSERT(OnSocketThread(), "not on socket thread"); + NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread"); if (mState == STATE_TRANSFERRING) mPollFlags |= (PR_POLL_WRITE | PR_POLL_EXCEPT); } diff --git a/netwerk/protocol/http/nsHttpConnectionMgr.cpp b/netwerk/protocol/http/nsHttpConnectionMgr.cpp index 70d051f747..f23d9e9e9a 100644 --- a/netwerk/protocol/http/nsHttpConnectionMgr.cpp +++ b/netwerk/protocol/http/nsHttpConnectionMgr.cpp @@ -2630,7 +2630,7 @@ nsHttpConnectionMgr::OnMsgCompleteUpgrade(int32_t, ARefBase *param) void nsHttpConnectionMgr::OnMsgUpdateParam(int32_t inParam, ARefBase *) { - MOZ_ASSERT(OnSocketThread(), "not on socket thread"); + NS_ASSERTION(PR_GetCurrentThread() == gSocketThread, "not on socket thread"); uint32_t param = static_cast(inParam); uint16_t name = ((param) & 0xFFFF0000) >> 16; uint16_t value = param & 0x0000FFFF; From 062b2c255f115c0cbd22247921cc4fc65ef0759c Mon Sep 17 00:00:00 2001 From: Basilisk-Dev Date: Sun, 25 Sep 2022 10:49:01 -0400 Subject: [PATCH 2/4] [Basilisk] Add SSUAO for Facebook --- application/basilisk/branding/shared/uaoverrides.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/application/basilisk/branding/shared/uaoverrides.inc b/application/basilisk/branding/shared/uaoverrides.inc index fc6c2dd54b..4fbba14fa1 100644 --- a/application/basilisk/branding/shared/uaoverrides.inc +++ b/application/basilisk/branding/shared/uaoverrides.inc @@ -61,6 +61,7 @@ pref("@GUAO_PREF@.twitter.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_D pref("@GUAO_PREF@.humblebundle.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Basilisk)"); pref("@GUAO_PREF@.privat24.ua","Mozilla/5.0 (%OS_SLICE% rv:38.0) @GK_SLICE@ Firefox/38.0"); pref("@GUAO_PREF@.citi.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 SeaMonkey/2.53.12"); +pref("@GUAO_PREF@.facebook.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 @APP_SLICE@"); pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9"); pref("@GUAO_PREF@.netflximg.net","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9"); pref("@GUAO_PREF@.mewe.com", "Mozilla/5.0 (%OS_SLICE% rv:102.0) Gecko/20100101 Firefox/102.0"); From a46b413b76acbef4e359f38de4a9e257c1dbfc46 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sun, 25 Sep 2022 09:57:36 +0000 Subject: [PATCH 3/4] [Pale-Moon] Add SSUAO for Facebook (because compatmode 102 breaks their JS) --- application/palemoon/branding/shared/pref/uaoverrides.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 6476d89809..0a01dde3f7 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -63,6 +63,7 @@ pref("@GUAO_PREF@.twitter.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_D pref("@GUAO_PREF@.humblebundle.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)"); pref("@GUAO_PREF@.privat24.ua","Mozilla/5.0 (%OS_SLICE% rv:38.0) @GK_SLICE@ Firefox/38.0"); pref("@GUAO_PREF@.citi.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 SeaMonkey/2.53.12"); +pref("@GUAO_PREF@.facebook.com","Mozilla/5.0 (%OS_SLICE% rv:68.0) @GK_SLICE@ Firefox/68.0 @PM_SLICE@"); pref("@GUAO_PREF@.netflix.com","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9"); pref("@GUAO_PREF@.netflximg.net","Mozilla/5.0 (Windows NT 6.1; rv:45.9) @GK_SLICE@ Firefox/45.9"); pref("@GUAO_PREF@.mewe.com", "Mozilla/5.0 (%OS_SLICE% rv:102.0) Gecko/20100101 Firefox/102.0"); From 3ea1f776a96ff3ad7fc10b275c47ee956f1daca2 Mon Sep 17 00:00:00 2001 From: Moonchild Date: Mon, 3 Oct 2022 21:57:35 +0000 Subject: [PATCH 4/4] [Pale-Moon] Use native mode for Zoho --- application/palemoon/branding/shared/pref/uaoverrides.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/application/palemoon/branding/shared/pref/uaoverrides.inc b/application/palemoon/branding/shared/pref/uaoverrides.inc index 0a01dde3f7..aa2cdc56da 100644 --- a/application/palemoon/branding/shared/pref/uaoverrides.inc +++ b/application/palemoon/branding/shared/pref/uaoverrides.inc @@ -58,6 +58,7 @@ pref("@GUAO_PREF@.mozilla.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_D pref("@GUAO_PREF@.github.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); pref("@GUAO_PREF@.spotify.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); pref("@GUAO_PREF@.twitter.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); +pref("@GUAO_PREF@.zoho.com","Mozilla/5.0 (%OS_SLICE% rv:@GRE_VERSION@) @GRE_DATE_SLICE@ @PM_SLICE@"); // UA-Sniffing domains below have indicated no interest in supporting Pale Moon (BOO!) pref("@GUAO_PREF@.humblebundle.com","Mozilla/5.0 (%OS_SLICE% rv:@GK_VERSION@) @GK_SLICE@ @FX_SLICE@ (Pale Moon)");