mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 990242. Remove some dead Promise code. r=nsm
This commit is contained in:
parent
ebbf189925
commit
0087f2d16b
@ -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,
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user