Bug 1728955: part 3) Add logging to `nsBaseClipboard`. r=masayuki
[gecko.git] / dom / base / nsMimeTypeArray.cpp
blob4e49b87dc7722e5a21083e85a4442940fca68451
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsMimeTypeArray.h"
9 #include "mozilla/dom/MimeTypeArrayBinding.h"
10 #include "mozilla/dom/MimeTypeBinding.h"
12 using namespace mozilla;
13 using namespace mozilla::dom;
15 NS_IMPL_CYCLE_COLLECTING_ADDREF(nsMimeTypeArray)
16 NS_IMPL_CYCLE_COLLECTING_RELEASE(nsMimeTypeArray)
17 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(nsMimeTypeArray)
18 NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
19 NS_INTERFACE_MAP_ENTRY(nsISupports)
20 NS_INTERFACE_MAP_END
22 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsMimeTypeArray, mWindow)
24 nsMimeTypeArray::nsMimeTypeArray(nsPIDOMWindowInner* aWindow)
25 : mWindow(aWindow) {}
27 nsMimeTypeArray::~nsMimeTypeArray() = default;
29 JSObject* nsMimeTypeArray::WrapObject(JSContext* aCx,
30 JS::Handle<JSObject*> aGivenProto) {
31 return MimeTypeArray_Binding::Wrap(aCx, this, aGivenProto);
34 nsPIDOMWindowInner* nsMimeTypeArray::GetParentObject() const {
35 MOZ_ASSERT(mWindow);
36 return mWindow;
39 NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(nsMimeType, AddRef)
40 NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(nsMimeType, Release)
42 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(nsMimeType)