icecat: add release icecat-140.10.1-1gnu1 for ecne

This commit is contained in:
Ark74 2026-05-04 16:58:41 -06:00
parent a5f93cb214
commit ff85d7c623
1256 changed files with 63469 additions and 24141 deletions

View file

@ -315,21 +315,8 @@ class MOZ_STACK_CLASS AutoWebRenderBridgeParentAsyncMessageSender final {
mWebRenderBridgeParent->SendPendingAsyncMessages();
if (mActorsToDestroy) {
// Destroy the actors after sending the async messages because the latter
// may contain references to some actors. De-duplicate the array to avoid
// destroying the same texture parent actor twice.
nsTHashSet<PTextureParent*> seenTextureParents;
for (const auto& op : *mActorsToDestroy) {
// Peek inside the op (as DestroyActor does) to see if we are about
// to destroy a PTextureParent.
if (op.type() == OpDestroy::TPTexture) {
PTextureParent* textureParent = op.get_PTexture().AsParent();
if (!seenTextureParents.EnsureInserted(textureParent)) {
// Already seen, so skip this one.
continue;
}
}
mWebRenderBridgeParent->DestroyActor(op);
}
// may contain references to some actors.
mWebRenderBridgeParent->DestroyActors(*mActorsToDestroy);
}
}
@ -477,8 +464,10 @@ struct WROTSAlloc {
wr::Vec<uint8_t> mVec;
void* Grow(void* aPtr, size_t aLength) {
// Only grow if capacity is insufficient.
if (aLength > mVec.Capacity()) {
mVec.Reserve(aLength - mVec.Capacity());
// Reserve() is relative to existing length.
mVec.Reserve(aLength - mVec.Length());
}
return mVec.inner.data;
}
@ -492,20 +481,17 @@ struct WROTSAlloc {
static bool ReadRawFont(const OpAddRawFont& aOp, wr::ShmSegmentsReader& aReader,
wr::TransactionBuilder& aUpdates) {
wr::Vec<uint8_t> sourceBytes;
Maybe<Range<uint8_t>> ptr =
aReader.GetReadPointerOrCopy(aOp.bytes(), sourceBytes);
if (ptr.isNothing()) {
gfxCriticalNote << "No read pointer from reader for sanitizing font "
wr::Vec<uint8_t> source;
if (!aReader.Read(aOp.bytes(), source)) {
gfxCriticalNote << "Failed to read data for sanitizing font "
<< aOp.key().mHandle;
return false;
}
Range<uint8_t>& source = ptr.ref();
// Attempt to sanitize the font before passing it along for updating.
// Ensure that we're not strict here about font types, since any font that
// failed generating a descriptor might end up here as raw font data.
size_t lengthHint = gfxOTSContext::GuessSanitizedFontSize(
source.begin().get(), source.length(), false);
source.Data(), source.Length(), false);
if (!lengthHint) {
gfxCriticalNote << "Could not determine font type for sanitizing font "
<< aOp.key().mHandle;
@ -513,7 +499,7 @@ static bool ReadRawFont(const OpAddRawFont& aOp, wr::ShmSegmentsReader& aReader,
}
gfxOTSExpandingMemoryStream<WROTSAlloc> output(lengthHint);
gfxOTSContext otsContext;
if (!otsContext.Process(&output, source.begin().get(), source.length())) {
if (!otsContext.Process(&output, source.Data(), source.Length())) {
gfxCriticalNote << "Failed sanitizing font " << aOp.key().mHandle;
return false;
}
@ -827,6 +813,14 @@ bool WebRenderBridgeParent::PushExternalImageForTexture(
auto op = aIsUpdate ? TextureHost::UPDATE_IMAGE : TextureHost::ADD_IMAGE;
WebRenderTextureHost* wrTexture = aTexture->AsWebRenderTextureHost();
if (wrTexture) {
if (wrTexture->NumSubTextures() != 1) {
gfxCriticalNote << "PushExternalImageForTexture: texture requires "
<< wrTexture->NumSubTextures()
<< " keys but only 1 provided for extId:"
<< wr::AsUint64(aExtId);
return false;
}
Range<wr::ImageKey> keys(&aKey, 1);
wrTexture->PushResourceUpdates(aResources, op, keys,
wrTexture->GetExternalImageKey());
@ -1264,9 +1258,7 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvSetDisplayList(
const TimeStamp& aFwdTime, nsTArray<CompositionPayload>&& aPayloads,
const bool& aRenderOffscreen) {
if (mDestroyed) {
for (const auto& op : aToDestroy) {
DestroyActor(op);
}
DestroyActors(aToDestroy);
wr::IpcResourceUpdateQueue::ReleaseShmems(this, aDisplayList.mSmallShmems);
wr::IpcResourceUpdateQueue::ReleaseShmems(this, aDisplayList.mLargeShmems);
return IPC_OK();
@ -1402,9 +1394,7 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvEmptyTransaction(
const TimeStamp& aTxnStartTime, const nsACString& aTxnURL,
const TimeStamp& aFwdTime, nsTArray<CompositionPayload>&& aPayloads) {
if (mDestroyed) {
for (const auto& op : aToDestroy) {
DestroyActor(op);
}
DestroyActors(aToDestroy);
if (aTransactionData) {
wr::IpcResourceUpdateQueue::ReleaseShmems(this,
aTransactionData->mSmallShmems);
@ -1898,6 +1888,12 @@ void WebRenderBridgeParent::AddPipelineIdForCompositable(
return;
}
if (aPipelineId == mPipelineId) {
gfxCriticalNote << "Content attempted AddPipelineIdForCompositable on "
"root pipeline";
return;
}
MOZ_ASSERT(mAsyncCompositables.find(wr::AsUint64(aPipelineId)) ==
mAsyncCompositables.end());
@ -1954,6 +1950,12 @@ void WebRenderBridgeParent::RemovePipelineIdForCompositable(
return;
}
if (aPipelineId == mPipelineId) {
gfxCriticalNote << "Content attempted RemovePipelineIdForCompositable on "
"root pipeline";
return;
}
auto it = mAsyncCompositables.find(wr::AsUint64(aPipelineId));
if (it == mAsyncCompositables.end()) {
return;
@ -2150,9 +2152,9 @@ mozilla::ipc::IPCResult WebRenderBridgeParent::RecvCapture() {
}
mozilla::ipc::IPCResult WebRenderBridgeParent::RecvStartCaptureSequence(
const nsACString& aPath, const uint32_t& aFlags) {
const uint32_t& aFlags) {
if (!mDestroyed) {
mApi->StartCaptureSequence(aPath, aFlags);
mApi->StartCaptureSequence(aFlags);
}
return IPC_OK();
}