Bug 1874684 - Part 4: Prefer const references instead of copying Instant values....
[gecko.git] / dom / midi / MIDIInputMap.cpp
blobaa4f57a7d3a91346d5f7385a0539d86e3ce8a081
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "mozilla/dom/MIDIInputMap.h"
6 #include "mozilla/dom/MIDIInputMapBinding.h"
7 #include "nsPIDOMWindow.h"
8 #include "mozilla/dom/BindingUtils.h"
10 namespace mozilla::dom {
12 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(MIDIInputMap, mParent)
14 NS_IMPL_CYCLE_COLLECTING_ADDREF(MIDIInputMap)
15 NS_IMPL_CYCLE_COLLECTING_RELEASE(MIDIInputMap)
17 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MIDIInputMap)
18 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
19 NS_INTERFACE_MAP_ENTRY(nsISupports)
20 NS_INTERFACE_MAP_END
22 MIDIInputMap::MIDIInputMap(nsPIDOMWindowInner* aParent) : mParent(aParent) {}
24 JSObject* MIDIInputMap::WrapObject(JSContext* aCx,
25 JS::Handle<JSObject*> aGivenProto) {
26 return MIDIInputMap_Binding::Wrap(aCx, this, aGivenProto);
29 } // namespace mozilla::dom