Skip to content

Commit

Permalink
Bug 1280067 - WorkerThreadModifyBusyCount should be the default value…
Browse files Browse the repository at this point in the history
… for WorkerRunnable, r=sicking
  • Loading branch information
bakulf committed Jun 28, 2016
1 parent ecfc76f commit 68ca2db
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions dom/push/PushManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class GetSubscriptionResultRunnable final : public WorkerRunnable
nsTArray<uint8_t>&& aRawP256dhKey,
nsTArray<uint8_t>&& aAuthSecret,
nsTArray<uint8_t>&& aAppServerKey)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mProxy(Move(aProxy))
, mStatus(aStatus)
, mEndpoint(aEndpoint)
Expand Down Expand Up @@ -360,7 +360,7 @@ class PermissionResultRunnable final : public WorkerRunnable
PermissionResultRunnable(PromiseWorkerProxy *aProxy,
nsresult aStatus,
PushPermissionState aState)
: WorkerRunnable(aProxy->GetWorkerPrivate(), WorkerThreadModifyBusyCount)
: WorkerRunnable(aProxy->GetWorkerPrivate())
, mProxy(aProxy)
, mStatus(aStatus)
, mState(aState)
Expand Down
2 changes: 1 addition & 1 deletion dom/push/PushSubscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class UnsubscribeResultRunnable final : public WorkerRunnable
already_AddRefed<PromiseWorkerProxy>&& aProxy,
nsresult aStatus,
bool aSuccess)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mProxy(Move(aProxy))
, mStatus(aStatus)
, mSuccess(aSuccess)
Expand Down
8 changes: 4 additions & 4 deletions dom/workers/ServiceWorkerClients.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class GetRunnable final : public Runnable
PromiseWorkerProxy* aPromiseProxy,
UniquePtr<ServiceWorkerClientInfo>&& aValue,
nsresult aRv)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
: WorkerRunnable(aWorkerPrivate),
mPromiseProxy(aPromiseProxy),
mValue(Move(aValue)),
mRv(Move(aRv))
Expand Down Expand Up @@ -153,7 +153,7 @@ class MatchAllRunnable final : public Runnable
ResolvePromiseWorkerRunnable(WorkerPrivate* aWorkerPrivate,
PromiseWorkerProxy* aPromiseProxy,
nsTArray<ServiceWorkerClientInfo>& aValue)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
: WorkerRunnable(aWorkerPrivate),
mPromiseProxy(aPromiseProxy)
{
AssertIsOnMainThread();
Expand Down Expand Up @@ -229,7 +229,7 @@ class ResolveClaimRunnable final : public WorkerRunnable
ResolveClaimRunnable(WorkerPrivate* aWorkerPrivate,
PromiseWorkerProxy* aPromiseProxy,
nsresult aResult)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mPromiseProxy(aPromiseProxy)
, mResult(aResult)
{
Expand Down Expand Up @@ -304,7 +304,7 @@ class ResolveOpenWindowRunnable final : public WorkerRunnable
ResolveOpenWindowRunnable(PromiseWorkerProxy* aPromiseProxy,
UniquePtr<ServiceWorkerClientInfo>&& aClientInfo,
const nsresult aStatus)
: WorkerRunnable(aPromiseProxy->GetWorkerPrivate(), WorkerThreadModifyBusyCount)
: WorkerRunnable(aPromiseProxy->GetWorkerPrivate())
, mPromiseProxy(aPromiseProxy)
, mClientInfo(Move(aClientInfo))
, mStatus(aStatus)
Expand Down
4 changes: 2 additions & 2 deletions dom/workers/ServiceWorkerPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class CheckScriptEvaluationWithCallback final : public WorkerRunnable
CheckScriptEvaluationWithCallback(WorkerPrivate* aWorkerPrivate,
KeepAliveToken* aKeepAliveToken,
LifeCycleEventCallback* aCallback)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mKeepAliveToken(new nsMainThreadPtrHolder<KeepAliveToken>(aKeepAliveToken))
, mCallback(aCallback)
#ifdef DEBUG
Expand Down Expand Up @@ -385,7 +385,7 @@ class ExtendableEventWorkerRunnable : public WorkerRunnable
public:
ExtendableEventWorkerRunnable(WorkerPrivate* aWorkerPrivate,
KeepAliveToken* aKeepAliveToken)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
{
AssertIsOnMainThread();
MOZ_ASSERT(aWorkerPrivate);
Expand Down
6 changes: 3 additions & 3 deletions dom/workers/ServiceWorkerRegistration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ class UpdateResultRunnable final : public WorkerRunnable

public:
UpdateResultRunnable(PromiseWorkerProxy* aPromiseProxy, ErrorResult& aStatus)
: WorkerRunnable(aPromiseProxy->GetWorkerPrivate(), WorkerThreadModifyBusyCount)
: WorkerRunnable(aPromiseProxy->GetWorkerPrivate())
, mPromiseProxy(aPromiseProxy)
, mStatus(Move(aStatus))
{ }
Expand Down Expand Up @@ -556,7 +556,7 @@ class FulfillUnregisterPromiseRunnable final : public WorkerRunnable
public:
FulfillUnregisterPromiseRunnable(PromiseWorkerProxy* aProxy,
Maybe<bool> aState)
: WorkerRunnable(aProxy->GetWorkerPrivate(), WorkerThreadModifyBusyCount)
: WorkerRunnable(aProxy->GetWorkerPrivate())
, mPromiseWorkerProxy(aProxy)
, mState(aState)
{
Expand Down Expand Up @@ -1285,7 +1285,7 @@ class FireUpdateFoundRunnable final : public WorkerRunnable
public:
FireUpdateFoundRunnable(WorkerPrivate* aWorkerPrivate,
WorkerListener* aListener)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mListener(aListener)
{
// Need this assertion for now since runnables which modify busy count can
Expand Down
2 changes: 1 addition & 1 deletion dom/workers/ServiceWorkerWindowClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class ResolveOrRejectPromiseRunnable final : public WorkerRunnable
ResolveOrRejectPromiseRunnable(WorkerPrivate* aWorkerPrivate,
PromiseWorkerProxy* aPromiseProxy,
UniquePtr<ServiceWorkerClientInfo>&& aClientInfo)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mPromiseProxy(aPromiseProxy)
, mClientInfo(Move(aClientInfo))
{
Expand Down
11 changes: 5 additions & 6 deletions dom/workers/WorkerPrivate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ class CompileScriptRunnable final : public WorkerRunnable
public:
explicit CompileScriptRunnable(WorkerPrivate* aWorkerPrivate,
const nsAString& aScriptURL)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
: WorkerRunnable(aWorkerPrivate),
mScriptURL(aScriptURL)
{ }

Expand Down Expand Up @@ -1492,7 +1492,7 @@ class UpdateLanguagesRunnable final : public WorkerRunnable
public:
UpdateLanguagesRunnable(WorkerPrivate* aWorkerPrivate,
const nsTArray<nsString>& aLanguages)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
: WorkerRunnable(aWorkerPrivate),
mLanguages(aLanguages)
{ }

Expand Down Expand Up @@ -1609,7 +1609,7 @@ class OfflineStatusChangeRunnable : public WorkerRunnable
{
public:
OfflineStatusChangeRunnable(WorkerPrivate* aWorkerPrivate, bool aIsOffline)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount),
: WorkerRunnable(aWorkerPrivate),
mIsOffline(aIsOffline)
{
}
Expand Down Expand Up @@ -1723,9 +1723,8 @@ class MessagePortRunnable final : public WorkerRunnable
MessagePortIdentifier mPortIdentifier;

public:
MessagePortRunnable(WorkerPrivate* aWorkerPrivate,
MessagePort* aPort)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
MessagePortRunnable(WorkerPrivate* aWorkerPrivate, MessagePort* aPort)
: WorkerRunnable(aWorkerPrivate)
{
MOZ_ASSERT(aPort);
// In order to move the port from one thread to another one, we have to
Expand Down
7 changes: 4 additions & 3 deletions dom/workers/WorkerRunnable.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ class WorkerRunnable : public nsIRunnable,
FromRunnable(nsIRunnable* aRunnable);

protected:
WorkerRunnable(WorkerPrivate* aWorkerPrivate, TargetAndBusyBehavior aBehavior)
WorkerRunnable(WorkerPrivate* aWorkerPrivate,
TargetAndBusyBehavior aBehavior = WorkerThreadModifyBusyCount)
#ifdef DEBUG
;
#else
Expand Down Expand Up @@ -275,7 +276,7 @@ class WorkerControlRunnable : public WorkerRunnable

protected:
WorkerControlRunnable(WorkerPrivate* aWorkerPrivate,
TargetAndBusyBehavior aBehavior)
TargetAndBusyBehavior aBehavior = WorkerThreadModifyBusyCount)
#ifdef DEBUG
;
#else
Expand All @@ -300,7 +301,7 @@ class WorkerControlRunnable : public WorkerRunnable
using WorkerRunnable::Cancel;
};

// A convenience class for WorkerRunnables that originate on the main
// A convenience class for WorkerRunnables that are originated on the main
// thread.
class MainThreadWorkerRunnable : public WorkerRunnable
{
Expand Down
2 changes: 1 addition & 1 deletion dom/workers/WorkerScope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ class SkipWaitingResultRunnable final : public WorkerRunnable
public:
SkipWaitingResultRunnable(WorkerPrivate* aWorkerPrivate,
PromiseWorkerProxy* aPromiseProxy)
: WorkerRunnable(aWorkerPrivate, WorkerThreadModifyBusyCount)
: WorkerRunnable(aWorkerPrivate)
, mPromiseProxy(aPromiseProxy)
{
AssertIsOnMainThread();
Expand Down

0 comments on commit 68ca2db

Please sign in to comment.