Bug 1450421 part 2. Remove nsIDOMDOMRequest. r=qdot
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 19 Apr 2018 12:55:33 -0400
changeset 468107 878832949713c8c01362396bc327366f7c0e3bae
parent 468106 e43112abb9ded798923eb4804f0870b313df0d28
child 468108 1960a9a89faf938a6941d7b1051c26f315d3a827
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersqdot
bugs1450421
milestone61.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 1450421 part 2. Remove nsIDOMDOMRequest. r=qdot MozReview-Commit-ID: AuxBpCcrQ0T
dom/base/DOMRequest.cpp
dom/base/DOMRequest.h
dom/base/nsIDOMDOMRequest.idl
--- a/dom/base/DOMRequest.cpp
+++ b/dom/base/DOMRequest.cpp
@@ -61,60 +61,27 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 NS_IMPL_CYCLE_COLLECTION_TRACE_BEGIN_INHERITED(DOMRequest,
                                                DOMEventTargetHelper)
   // Don't need NS_IMPL_CYCLE_COLLECTION_TRACE_PRESERVED_WRAPPER because
   // DOMEventTargetHelper does it for us.
   NS_IMPL_CYCLE_COLLECTION_TRACE_JS_MEMBER_CALLBACK(mResult)
 NS_IMPL_CYCLE_COLLECTION_TRACE_END
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(DOMRequest)
-  NS_INTERFACE_MAP_ENTRY(nsIDOMDOMRequest)
 NS_INTERFACE_MAP_END_INHERITING(DOMEventTargetHelper)
 
 NS_IMPL_ADDREF_INHERITED(DOMRequest, DOMEventTargetHelper)
 NS_IMPL_RELEASE_INHERITED(DOMRequest, DOMEventTargetHelper)
 
 /* virtual */ JSObject*
 DOMRequest::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
 {
   return DOMRequestBinding::Wrap(aCx, this, aGivenProto);
 }
 
-NS_IMETHODIMP
-DOMRequest::GetReadyState(nsAString& aReadyState)
-{
-  DOMRequestReadyState readyState = ReadyState();
-  switch (readyState) {
-    case DOMRequestReadyState::Pending:
-      aReadyState.AssignLiteral("pending");
-      break;
-    case DOMRequestReadyState::Done:
-      aReadyState.AssignLiteral("done");
-      break;
-    default:
-      MOZ_CRASH("Unrecognized readyState.");
-  }
-
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-DOMRequest::GetResult(JS::MutableHandle<JS::Value> aResult)
-{
-  GetResult(nullptr, aResult);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-DOMRequest::GetError(nsISupports** aError)
-{
-  NS_IF_ADDREF(*aError = static_cast<Exception*>(GetError()));
-  return NS_OK;
-}
-
 void
 DOMRequest::FireSuccess(JS::Handle<JS::Value> aResult)
 {
   NS_ASSERTION(!mDone, "mDone shouldn't have been set to true already!");
   NS_ASSERTION(!mError, "mError shouldn't have been set!");
   NS_ASSERTION(mResult.isUndefined(), "mResult shouldn't have been set!");
 
   mDone = true;
--- a/dom/base/DOMRequest.h
+++ b/dom/base/DOMRequest.h
@@ -19,28 +19,26 @@ namespace mozilla {
 
 class ErrorResult;
 
 namespace dom {
 
 class AnyCallback;
 class Promise;
 
-class DOMRequest : public DOMEventTargetHelper,
-                   public nsIDOMDOMRequest
+class DOMRequest : public DOMEventTargetHelper
 {
 protected:
   JS::Heap<JS::Value> mResult;
   RefPtr<DOMException> mError;
   RefPtr<Promise> mPromise;
   bool mDone;
 
 public:
   NS_DECL_ISUPPORTS_INHERITED
-  NS_DECL_NSIDOMDOMREQUEST
 
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS_INHERITED(DOMRequest,
                                                          DOMEventTargetHelper)
 
   // WrapperCache
   nsPIDOMWindowInner* GetParentObject() const
   {
     return GetOwner();
--- a/dom/base/nsIDOMDOMRequest.idl
+++ b/dom/base/nsIDOMDOMRequest.idl
@@ -1,31 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "nsIDOMEventTarget.idl"
+#include "nsISupports.idl"
 
 interface mozIDOMWindow;
 interface nsICursorContinueCallback;
 webidl DOMRequest;
 
-[shim(DOMRequest), uuid(e39da69e-2232-4e49-9856-b8a4a6210336)]
-interface nsIDOMDOMRequest : nsIDOMEventTarget
-{
-  readonly attribute DOMString readyState; // "pending" or "done"
-
-  readonly attribute jsval result;
-
-  // DOMException
-  readonly attribute nsISupports error;
-};
-
 [scriptable, builtinclass, uuid(9a57e5de-ce93-45fa-8145-755722834f7c)]
 interface nsIDOMRequestService : nsISupports
 {
   DOMRequest createRequest(in mozIDOMWindow window);
 
   void fireSuccess(in DOMRequest request, in jsval result);
   void fireError(in DOMRequest request, in DOMString error);
   void fireSuccessAsync(in DOMRequest request, in jsval result);