Bug 990242. Remove some dead Promise code. r=nsm
authorBoris Zbarsky <bzbarsky@mit.edu>
Tue, 01 Apr 2014 01:58:28 -0400
changeset 194972 c6e7e5965fb813eeaf106bd2a24e1431c85792b0
parent 194971 57553ed7b1400fc3413ccc2171f864b38213f5e4
child 194973 8560fc7e284964200de406d17b0d7033c3ef10dd
push id3624
push userasasaki@mozilla.com
push dateMon, 09 Jun 2014 21:49:01 +0000
treeherdermozilla-beta@b1a5da15899a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnsm
bugs990242
milestone31.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 990242. Remove some dead Promise code. r=nsm
dom/promise/PromiseCallback.cpp
dom/promise/PromiseCallback.h
--- a/dom/promise/PromiseCallback.cpp
+++ b/dom/promise/PromiseCallback.cpp
@@ -237,49 +237,16 @@ WrapperPromiseCallback::Call(JS::Handle<
 
   // Otherwise, run resolver's resolve with value and the synchronous flag
   // set.
   Maybe<JSAutoCompartment> ac2;
   EnterCompartment(ac2, cx, value);
   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,
                                      PromiseCallback, mHandler)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED(NativePromiseCallback)
 NS_INTERFACE_MAP_END_INHERITING(PromiseCallback)
 
--- a/dom/promise/PromiseCallback.h
+++ b/dom/promise/PromiseCallback.h
@@ -51,35 +51,16 @@ public:
   WrapperPromiseCallback(Promise* aNextPromise, AnyCallback* aCallback);
   ~WrapperPromiseCallback();
 
 private:
   nsRefPtr<Promise> mNextPromise;
   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
 {
 public:
   NS_DECL_ISUPPORTS_INHERITED
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(ResolvePromiseCallback,
                                            PromiseCallback)