icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue