Bug 990242. Remove some dead Promise code. r=nsm

This commit is contained in:
Boris Zbarsky 2014-04-01 01:58:28 -04:00
parent ebbf189925
commit 0087f2d16b
2 changed files with 0 additions and 52 deletions

View File

@ -242,39 +242,6 @@ WrapperPromiseCallback::Call(JS::Handle<JS::Value> aValue)
mNextPromise->ResolveInternal(cx, value, Promise::SyncTask);
}
// SimpleWrapperPromiseCallback
NS_IMPL_CYCLE_COLLECTION_INHERITED_2(SimpleWrapperPromiseCallback,
PromiseCallback,
mPromise, mCallback)
NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(SimpleWrapperPromiseCallback)
NS_INTERFACE_MAP_END_INHERITING(PromiseCallback)
NS_IMPL_ADDREF_INHERITED(SimpleWrapperPromiseCallback, PromiseCallback)
NS_IMPL_RELEASE_INHERITED(SimpleWrapperPromiseCallback, PromiseCallback)
SimpleWrapperPromiseCallback::SimpleWrapperPromiseCallback(Promise* aPromise,
AnyCallback* aCallback)
: mPromise(aPromise)
, mCallback(aCallback)
{
MOZ_ASSERT(aPromise);
MOZ_COUNT_CTOR(SimpleWrapperPromiseCallback);
}
SimpleWrapperPromiseCallback::~SimpleWrapperPromiseCallback()
{
MOZ_COUNT_DTOR(SimpleWrapperPromiseCallback);
}
void
SimpleWrapperPromiseCallback::Call(JS::Handle<JS::Value> aValue)
{
ErrorResult rv;
mCallback->Call(mPromise, aValue, rv);
}
// NativePromiseCallback
NS_IMPL_CYCLE_COLLECTION_INHERITED_1(NativePromiseCallback,

View File

@ -56,25 +56,6 @@ private:
nsRefPtr<AnyCallback> mCallback;
};
// SimpleWrapperPromiseCallback execs a JS Callback with a value.
class SimpleWrapperPromiseCallback MOZ_FINAL : public PromiseCallback
{
public:
NS_DECL_ISUPPORTS_INHERITED
NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(SimpleWrapperPromiseCallback,
PromiseCallback)
void Call(JS::Handle<JS::Value> aValue) MOZ_OVERRIDE;
SimpleWrapperPromiseCallback(Promise* aPromise,
AnyCallback* aCallback);
~SimpleWrapperPromiseCallback();
private:
nsRefPtr<Promise> mPromise;
nsRefPtr<AnyCallback> mCallback;
};
// ResolvePromiseCallback calls aPromise->ResolveFunction() with the value
// received by Call().
class ResolvePromiseCallback MOZ_FINAL : public PromiseCallback