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

@ -25,6 +25,11 @@ NS_INTERFACE_MAP_END
void TCPServerSocketParent::ReleaseIPDLReference() {
MOZ_ASSERT(mIPCOpen);
NS_ASSERTION(mIPCOpen,
"ReleaseIPDLReference called without matching AddIPDLReference");
if (!mIPCOpen) {
return;
}
mIPCOpen = false;
this->Release();
}
@ -70,8 +75,9 @@ nsresult TCPServerSocketParent::SendCallbackAccept(TCPSocketParent* socket) {
if (mNeckoParent) {
if (mNeckoParent->SendPTCPSocketConstructor(socket, host, port)) {
// Call |AddIPDLReference| after the consructor message is sent
// successfully, otherwise |socket| could be leaked.
// Call |AddIPDLReference| only on success; on failure IPDL calls
// DeallocPTCPSocketParent which calls ReleaseIPDLReference, guarded
// against the unbalanced case.
socket->AddIPDLReference();
mozilla::Unused << PTCPServerSocketParent::SendCallbackAccept(

View file

@ -10,6 +10,7 @@
#include "TCPSocketParent.h"
#include "mozilla/BasePrincipal.h"
#include "mozilla/ErrorResult.h"
#include "mozilla/StaticPrefs_dom.h"
#include "mozilla/SyncRunnable.h"
#include "mozilla/dom/RootedDictionary.h"
#include "mozilla/dom/ScriptSettings.h"
@ -1163,6 +1164,10 @@ TCPSocket::Observe(nsISupports* aSubject, const char* aTopic,
/* static */
bool TCPSocket::ShouldTCPSocketExist(JSContext* aCx, JSObject* aGlobal) {
if (XRE_IsContentProcess() &&
!StaticPrefs::dom_tcpsocket_in_child_enabled()) {
return false;
}
JS::Rooted<JSObject*> global(aCx, aGlobal);
return nsContentUtils::ObjectPrincipal(global)->IsSystemPrincipal();
}

View file

@ -56,6 +56,11 @@ TCPSocketParentBase::~TCPSocketParentBase() = default;
void TCPSocketParentBase::ReleaseIPDLReference() {
MOZ_ASSERT(mIPCOpen);
NS_ASSERTION(mIPCOpen,
"ReleaseIPDLReference called without matching AddIPDLReference");
if (!mIPCOpen) {
return;
}
mIPCOpen = false;
this->Release();
}
@ -78,6 +83,9 @@ NS_IMETHODIMP_(MozExternalRefCountType) TCPSocketParent::Release(void) {
mozilla::ipc::IPCResult TCPSocketParent::RecvOpen(
const nsString& aHost, const uint16_t& aPort, const bool& aUseSSL,
const bool& aUseArrayBuffers) {
if (!StaticPrefs::dom_tcpsocket_in_child_enabled()) {
return IPC_FAIL(this, "tcp socket not enabled");
}
mSocket = new TCPSocket(nullptr, aHost, aPort, aUseSSL, aUseArrayBuffers);
mSocket->SetSocketBridgeParent(this);
NS_ENSURE_SUCCESS(mSocket->Init(nullptr), IPC_OK());

View file

@ -159,6 +159,8 @@ void UDPSocket::CloseWithReason(nsresult aReason) {
return;
}
RefPtr<UDPSocket> kungFuDeathGrip(this);
if (mOpened) {
if (mReadyState == SocketReadyState::Opening) {
// reject openedPromise with AbortError if socket is closed without error

View file

@ -307,6 +307,10 @@ mozilla::ipc::IPCResult UDPSocketParent::RecvOutgoingData(
return IPC_OK();
}
if (!mFilter && aData.type() == UDPData::TIPCStream) {
return IPC_FAIL(this, "IPCStream payload requires a filter");
}
nsresult rv;
if (mFilter) {
if (aAddr.type() != UDPSocketAddr::TNetAddr) {

View file

@ -1,4 +1,5 @@
[DEFAULT]
prefs = ["dom.tcpsocket_in_child.enabled=true"]
support-files = [
"tcpsocket_test.sys.mjs",
"test_tcpsocket_client_and_server_basics.js",