Bug 1121623 part 7. Remove AuthenticatorResponse::WrapObject. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Fri, 24 May 2019 07:23:54 +0000
changeset 475402 b5e4781f21b39dc662549e551580300537b3460f
parent 475401 47671db885266d07d84f67dc80474c23bd72e47e
child 475403 9fc4bc90881829606cfd810017be8c1b6be58573
push id86310
push userbzbarsky@mozilla.com
push dateFri, 24 May 2019 15:01:13 +0000
treeherderautoland@1bec5b571ed1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1121623
milestone69.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 1121623 part 7. Remove AuthenticatorResponse::WrapObject. r=peterv It's dead code because we never create AuthenticatorResponse objects directly, and all subclasses override WrapObject. Differential Revision: https://phabricator.services.mozilla.com/D32205
dom/webauthn/AuthenticatorResponse.cpp
dom/webauthn/AuthenticatorResponse.h
--- a/dom/webauthn/AuthenticatorResponse.cpp
+++ b/dom/webauthn/AuthenticatorResponse.cpp
@@ -1,15 +1,14 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=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 "mozilla/dom/WebAuthenticationBinding.h"
 #include "mozilla/dom/AuthenticatorResponse.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(AuthenticatorResponse)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AuthenticatorResponse)
   NS_IMPL_CYCLE_COLLECTION_UNLINK(mParent)
@@ -38,21 +37,16 @@ AuthenticatorResponse::AuthenticatorResp
     : mParent(aParent), mClientDataJSONCachedObj(nullptr) {
   mozilla::HoldJSObjects(this);
 }
 
 AuthenticatorResponse::~AuthenticatorResponse() {
   mozilla::DropJSObjects(this);
 }
 
-JSObject* AuthenticatorResponse::WrapObject(JSContext* aCx,
-                                            JS::Handle<JSObject*> aGivenProto) {
-  return AuthenticatorResponse_Binding::Wrap(aCx, this, aGivenProto);
-}
-
 void AuthenticatorResponse::GetClientDataJSON(
     JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal) {
   if (!mClientDataJSONCachedObj) {
     mClientDataJSONCachedObj = mClientDataJSON.ToArrayBuffer(aCx);
   }
   aRetVal.set(mClientDataJSONCachedObj);
 }
 
--- a/dom/webauthn/AuthenticatorResponse.h
+++ b/dom/webauthn/AuthenticatorResponse.h
@@ -26,19 +26,16 @@ class AuthenticatorResponse : public nsI
   explicit AuthenticatorResponse(nsPIDOMWindowInner* aParent);
 
  protected:
   virtual ~AuthenticatorResponse();
 
  public:
   nsISupports* GetParentObject() const { return mParent; }
 
-  virtual JSObject* WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aGivenProto) override;
-
   void GetFormat(nsString& aRetVal) const;
 
   void GetClientDataJSON(JSContext* aCx, JS::MutableHandle<JSObject*> aRetVal);
 
   nsresult SetClientDataJSON(CryptoBuffer& aBuffer);
 
  private:
   nsCOMPtr<nsPIDOMWindowInner> mParent;