LCOV - code coverage report
Current view: top level - dom/bindings/test - TestInterfaceSetlike.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 22 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 11 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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/. */
       4             : 
       5             : #include "mozilla/dom/TestInterfaceSetlike.h"
       6             : #include "mozilla/dom/TestInterfaceJSMaplikeSetlikeIterableBinding.h"
       7             : #include "nsPIDOMWindow.h"
       8             : #include "mozilla/dom/BindingUtils.h"
       9             : 
      10             : namespace mozilla {
      11             : namespace dom {
      12             : 
      13           0 : NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(TestInterfaceSetlike, mParent)
      14             : 
      15           0 : NS_IMPL_CYCLE_COLLECTING_ADDREF(TestInterfaceSetlike)
      16           0 : NS_IMPL_CYCLE_COLLECTING_RELEASE(TestInterfaceSetlike)
      17             : 
      18           0 : NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(TestInterfaceSetlike)
      19           0 : NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
      20           0 : NS_INTERFACE_MAP_ENTRY(nsISupports)
      21           0 : NS_INTERFACE_MAP_END
      22             : 
      23           0 : TestInterfaceSetlike::TestInterfaceSetlike(JSContext* aCx,
      24           0 :                                            nsPIDOMWindowInner* aParent)
      25           0 : : mParent(aParent)
      26             : {
      27           0 : }
      28             : 
      29             : //static
      30             : already_AddRefed<TestInterfaceSetlike>
      31           0 : TestInterfaceSetlike::Constructor(const GlobalObject& aGlobal,
      32             :                                   ErrorResult& aRv)
      33             : {
      34           0 :   nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(aGlobal.GetAsSupports());
      35           0 :   if (!window) {
      36           0 :     aRv.Throw(NS_ERROR_FAILURE);
      37           0 :     return nullptr;
      38             :   }
      39             : 
      40           0 :   RefPtr<TestInterfaceSetlike> r = new TestInterfaceSetlike(nullptr, window);
      41           0 :   return r.forget();
      42             : }
      43             : 
      44             : JSObject*
      45           0 : TestInterfaceSetlike::WrapObject(JSContext* aCx,
      46             :                                  JS::Handle<JSObject*> aGivenProto)
      47             : {
      48           0 :   return TestInterfaceSetlikeBinding::Wrap(aCx, this, aGivenProto);
      49             : }
      50             : 
      51             : nsPIDOMWindowInner*
      52           0 : TestInterfaceSetlike::GetParentObject() const
      53             : {
      54           0 :   return mParent;
      55             : }
      56             : 
      57             : } // namespace dom
      58             : } // namespace mozilla

Generated by: LCOV version 1.13