Bug 1121623 part 8. Remove MIDIPort::WrapObject. r=baku
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 23 May 2019 05:36:56 +0000
changeset 475390 9fc4bc90881829606cfd810017be8c1b6be58573
parent 475389 b5e4781f21b39dc662549e551580300537b3460f
child 475391 99d7cbadce926aad011bc60980eadb87bfa11f81
push id36060
push usercbrindusan@mozilla.com
push dateFri, 24 May 2019 21:47:21 +0000
treeherdermozilla-central@ac95bdf3c0b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
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 8. Remove MIDIPort::WrapObject. r=baku It's dead code because we never create MIDIPort objects directly, and all subclasses override WrapObject. Differential Revision: https://phabricator.services.mozilla.com/D32206
--- a/dom/midi/MIDIPort.cpp
+++ b/dom/midi/MIDIPort.cpp
@@ -68,21 +68,16 @@ bool MIDIPort::Initialize(const MIDIPort
   // Make sure to increase the ref count for the port, so it can be cleaned up
   // by the IPC manager.
   return true;
 void MIDIPort::UnsetIPCPort() { mPort = nullptr; }
-JSObject* MIDIPort::WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aGivenProto) {
-  return MIDIPort_Binding::Wrap(aCx, this, aGivenProto);
 void MIDIPort::GetId(nsString& aRetVal) const {
   aRetVal = mPort->MIDIPortInterface::Id();
 void MIDIPort::GetManufacturer(nsString& aRetVal) const {
   aRetVal = mPort->Manufacturer();
--- a/dom/midi/MIDIPort.h
+++ b/dom/midi/MIDIPort.h
@@ -8,17 +8,16 @@
 #define mozilla_dom_MIDIPort_h
 #include "nsWrapperCache.h"
 #include "mozilla/Attributes.h"
 #include "mozilla/Observer.h"
 #include "mozilla/DOMEventTargetHelper.h"
 #include "mozilla/ErrorResult.h"
 #include "mozilla/dom/MIDIAccess.h"
-#include "mozilla/dom/MIDIPortBinding.h"
 #include "mozilla/dom/MIDIPortInterface.h"
 struct JSContext;
 namespace mozilla {
 namespace dom {
 class Promise;
@@ -42,19 +41,16 @@ class MIDIPort : public DOMEventTargetHe
   MIDIPort(nsPIDOMWindowInner* aWindow, MIDIAccess* aMIDIAccessParent);
   bool Initialize(const MIDIPortInfo& aPortInfo, bool aSysexEnabled);
   virtual ~MIDIPort();
   nsPIDOMWindowInner* GetParentObject() const { return GetOwner(); }
-  virtual JSObject* WrapObject(JSContext* aCx,
-                               JS::Handle<JSObject*> aGivenProto) override;
   // Getters
   void GetId(nsString& aRetVal) const;
   void GetManufacturer(nsString& aRetVal) const;
   void GetName(nsString& aRetVal) const;
   void GetVersion(nsString& aRetVal) const;
   MIDIPortType Type() const;
   MIDIPortConnectionState Connection() const;
   MIDIPortDeviceState State() const;