mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1459035 - micro-optimize refcounting for nsSocket{Input,Output}Stream; r=valentin
This commit is contained in:
parent
753c26dd7e
commit
709477d79d
@ -284,8 +284,7 @@ nsSocketInputStream::OnSocketReady(nsresult condition)
|
||||
|
||||
// ignore event if only waiting for closure and not closed.
|
||||
if (NS_FAILED(mCondition) || !(mCallbackFlags & WAIT_CLOSURE_ONLY)) {
|
||||
callback = mCallback;
|
||||
mCallback = nullptr;
|
||||
callback = mCallback.forget();
|
||||
mCallbackFlags = 0;
|
||||
}
|
||||
}
|
||||
@ -545,8 +544,7 @@ nsSocketOutputStream::OnSocketReady(nsresult condition)
|
||||
|
||||
// ignore event if only waiting for closure and not closed.
|
||||
if (NS_FAILED(mCondition) || !(mCallbackFlags & WAIT_CLOSURE_ONLY)) {
|
||||
callback = mCallback;
|
||||
mCallback = nullptr;
|
||||
callback = mCallback.forget();
|
||||
mCallbackFlags = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user