mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-22 08:27:31 +09:00
Update NSS to 3.41
This commit is contained in:
parent
d5f6e64f43
commit
5f0986e66f
540 changed files with 49568 additions and 10631 deletions
|
|
@ -31,6 +31,20 @@ ScopedPRFileDesc DummyPrSocket::CreateFD() {
|
|||
return DummyIOLayerMethods::CreateFD(test_fd_identity, this);
|
||||
}
|
||||
|
||||
void DummyPrSocket::Reset() {
|
||||
auto p = peer_.lock();
|
||||
peer_.reset();
|
||||
if (p) {
|
||||
p->peer_.reset();
|
||||
p->Reset();
|
||||
}
|
||||
while (!input_.empty()) {
|
||||
input_.pop();
|
||||
}
|
||||
filter_ = nullptr;
|
||||
write_error_ = 0;
|
||||
}
|
||||
|
||||
void DummyPrSocket::PacketReceived(const DataBuffer &packet) {
|
||||
input_.push(Packet(packet));
|
||||
}
|
||||
|
|
@ -42,6 +56,12 @@ int32_t DummyPrSocket::Read(PRFileDesc *f, void *data, int32_t len) {
|
|||
return -1;
|
||||
}
|
||||
|
||||
auto dst = peer_.lock();
|
||||
if (!dst) {
|
||||
PR_SetError(PR_NOT_CONNECTED_ERROR, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (input_.empty()) {
|
||||
LOGV("Read --> wouldblock " << len);
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
|
||||
|
|
@ -74,6 +94,12 @@ int32_t DummyPrSocket::Recv(PRFileDesc *f, void *buf, int32_t buflen,
|
|||
return Read(f, buf, buflen);
|
||||
}
|
||||
|
||||
auto dst = peer_.lock();
|
||||
if (!dst) {
|
||||
PR_SetError(PR_NOT_CONNECTED_ERROR, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (input_.empty()) {
|
||||
PR_SetError(PR_WOULD_BLOCK_ERROR, 0);
|
||||
return -1;
|
||||
|
|
@ -101,7 +127,7 @@ int32_t DummyPrSocket::Write(PRFileDesc *f, const void *buf, int32_t length) {
|
|||
|
||||
auto dst = peer_.lock();
|
||||
if (!dst) {
|
||||
PR_SetError(PR_IO_ERROR, 0);
|
||||
PR_SetError(PR_NOT_CONNECTED_ERROR, 0);
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue