mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-29 20:07:30 +09:00
Add a "close all tabs to the left" button + fix compile error
This commit is contained in:
parent
ea6b948f3b
commit
8bf148471c
5 changed files with 57 additions and 7 deletions
|
|
@ -250,8 +250,9 @@ bool StreamFilterParent::RecvClose() {
|
|||
void StreamFilterParent::Destroy() {
|
||||
// Close the channel asynchronously so the actor is never destroyed before
|
||||
// this message is fully processed.
|
||||
ActorThread()->Dispatch(NewRunnableMethod(this,
|
||||
&StreamFilterParent::Close),
|
||||
ActorThread()->Dispatch(NS_NewRunnableFunction([self = RefPtr<StreamFilterParent>(this)]() {
|
||||
self->Close();
|
||||
}),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
||||
|
|
@ -354,8 +355,8 @@ void StreamFilterParent::FinishDisconnect() {
|
|||
bool StreamFilterParent::RecvWrite(Data&& aData) {
|
||||
AssertIsActorThread();
|
||||
|
||||
RunOnIOThread(NS_NewRunnableFunction([this, data = std::move(aData)]() mutable {
|
||||
WriteMove(std::move(data));
|
||||
RunOnIOThread(NS_NewRunnableFunction([self = RefPtr<StreamFilterParent>(this), data = std::move(aData)]() mutable {
|
||||
self->WriteMove(std::move(data));
|
||||
}));
|
||||
return true;
|
||||
}
|
||||
|
|
@ -612,8 +613,8 @@ StreamFilterParent::OnDataAvailable(nsIRequest* aRequest,
|
|||
return NS_ERROR_FAILURE;
|
||||
} else {
|
||||
ActorThread()->Dispatch(
|
||||
NS_NewRunnableFunction([this, data = std::move(data)]() mutable {
|
||||
DoSendData(std::move(data));
|
||||
NS_NewRunnableFunction([self = RefPtr<StreamFilterParent>(this), data = std::move(data)]() mutable {
|
||||
self->DoSendData(std::move(data));
|
||||
}),
|
||||
NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue