Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj

This commit is contained in:
Kyle Huey
2016-05-05 01:45:00 -07:00
parent 7bfda7e22f
commit b972c94d0f
238 changed files with 1046 additions and 1279 deletions

View File

@@ -1248,7 +1248,7 @@ WebSocketChannel::Observe(nsISupports *subject,
// Next we check mDataStarted, which we need to do on mTargetThread.
if (!IsOnTargetThread()) {
mTargetThread->Dispatch(
NS_NewRunnableMethod(this, &WebSocketChannel::OnNetworkChanged),
NewRunnableMethod(this, &WebSocketChannel::OnNetworkChanged),
NS_DISPATCH_NORMAL);
} else {
OnNetworkChanged();
@@ -1272,7 +1272,7 @@ WebSocketChannel::OnNetworkChanged()
}
return mSocketThread->Dispatch(
NS_NewRunnableMethod(this, &WebSocketChannel::OnNetworkChanged),
NewRunnableMethod(this, &WebSocketChannel::OnNetworkChanged),
NS_DISPATCH_NORMAL);
}
@@ -1359,7 +1359,7 @@ WebSocketChannel::BeginOpen(bool aCalledFromAdmissionManager)
// When called from nsWSAdmissionManager post an event to avoid potential
// re-entering of nsWSAdmissionManager and its lock.
NS_DispatchToMainThread(
NS_NewRunnableMethod(this, &WebSocketChannel::BeginOpenInternal),
NewRunnableMethod(this, &WebSocketChannel::BeginOpenInternal),
NS_DISPATCH_NORMAL);
} else {
BeginOpenInternal();
@@ -2795,7 +2795,7 @@ WebSocketChannel::StartWebsocketData()
if (!IsOnTargetThread()) {
return mTargetThread->Dispatch(
NS_NewRunnableMethod(this, &WebSocketChannel::StartWebsocketData),
NewRunnableMethod(this, &WebSocketChannel::StartWebsocketData),
NS_DISPATCH_NORMAL);
}
@@ -2808,15 +2808,15 @@ WebSocketChannel::StartWebsocketData()
LOG(("WebSocketChannel::StartWebsocketData mSocketIn->AsyncWait() failed "
"with error 0x%08x", rv));
return mSocketThread->Dispatch(
NS_NewRunnableMethodWithArgs<nsresult>(this,
&WebSocketChannel::AbortSession,
rv),
NewRunnableMethod<nsresult>(this,
&WebSocketChannel::AbortSession,
rv),
NS_DISPATCH_NORMAL);
}
if (mPingInterval) {
rv = mSocketThread->Dispatch(
NS_NewRunnableMethod(this, &WebSocketChannel::StartPinging),
NewRunnableMethod(this, &WebSocketChannel::StartPinging),
NS_DISPATCH_NORMAL);
if (NS_FAILED(rv)) {
LOG(("WebSocketChannel::StartWebsocketData Could not start pinging, "