LCOV - code coverage report
Current view: top level - obj-x86_64-pc-linux-gnu/dist/include/mozilla/dom - FileSystemFileEntryBinding.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 29 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 FILE IS AUTOGENERATED FROM FileSystemFileEntry.webidl BY Codegen.py - DO NOT EDIT */
       2             : 
       3             : #ifndef mozilla_dom_FileSystemFileEntryBinding_h
       4             : #define mozilla_dom_FileSystemFileEntryBinding_h
       5             : 
       6             : #include "js/RootingAPI.h"
       7             : #include "jspubtd.h"
       8             : #include "mozilla/ErrorResult.h"
       9             : #include "mozilla/dom/BindingDeclarations.h"
      10             : #include "mozilla/dom/CallbackInterface.h"
      11             : #include "mozilla/dom/Nullable.h"
      12             : #include "mozilla/dom/ToJSValue.h"
      13             : 
      14             : namespace mozilla {
      15             : namespace dom {
      16             : 
      17             : class File;
      18             : class FileCallback;
      19             : struct FileCallbackAtoms;
      20             : class FileSystemFileEntry;
      21             : struct FileSystemFileEntryAtoms;
      22             : struct NativePropertyHooks;
      23             : class ProtoAndIfaceCache;
      24             : 
      25             : } // namespace dom
      26             : } // namespace mozilla
      27             : 
      28             : namespace mozilla {
      29             : namespace dom {
      30             : 
      31             : namespace FileSystemFileEntryBinding {
      32             : 
      33             :   typedef mozilla::dom::FileSystemFileEntry NativeType;
      34             : 
      35             :   JSObject*
      36             :   DefineDOMInterface(JSContext* aCx, JS::Handle<JSObject*> aGlobal, JS::Handle<jsid> id, bool aDefineOnGlobal);
      37             : 
      38             :   const JSClass*
      39             :   GetJSClass();
      40             : 
      41             :   bool
      42             :   Wrap(JSContext* aCx, mozilla::dom::FileSystemFileEntry* aObject, nsWrapperCache* aCache, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
      43             : 
      44             :   template <class T>
      45           0 :   inline JSObject* Wrap(JSContext* aCx, T* aObject, JS::Handle<JSObject*> aGivenProto)
      46             :   {
      47           0 :     JS::Rooted<JSObject*> reflector(aCx);
      48           0 :     return Wrap(aCx, aObject, aObject, aGivenProto, &reflector) ? reflector.get() : nullptr;
      49             :   }
      50             : 
      51             :   // We declare this as an array so that retrieving a pointer to this
      52             :   // binding's property hooks only requires compile/link-time resolvable
      53             :   // address arithmetic.  Declaring it as a pointer instead would require
      54             :   // doing a run-time load to fetch a pointer to this binding's property
      55             :   // hooks.  And then structures which embedded a pointer to this structure
      56             :   // would require a run-time load for proper initialization, which would
      57             :   // then induce static constructors.  Lots of static constructors.
      58             :   extern const NativePropertyHooks sNativePropertyHooks[];
      59             : 
      60             :   void
      61             :   CreateInterfaceObjects(JSContext* aCx, JS::Handle<JSObject*> aGlobal, ProtoAndIfaceCache& aProtoAndIfaceCache, bool aDefineOnGlobal);
      62             : 
      63             :   JS::Handle<JSObject*>
      64             :   GetProtoObjectHandle(JSContext* aCx);
      65             : 
      66             :   JS::Handle<JSObject*>
      67             :   GetConstructorObjectHandle(JSContext* aCx, bool aDefineOnGlobal = true);
      68             : 
      69             :   JSObject*
      70             :   GetConstructorObject(JSContext* aCx);
      71             : 
      72             : } // namespace FileSystemFileEntryBinding
      73             : 
      74             : 
      75             : 
      76           0 : class FileCallback : public CallbackInterface
      77             : {
      78             : public:
      79             :   explicit inline FileCallback(JSContext* aCx, JS::Handle<JSObject*> aCallback, nsIGlobalObject* aIncumbentGlobal)
      80             :     : CallbackInterface(aCx, aCallback, aIncumbentGlobal)
      81             :   {
      82             :   }
      83             : 
      84           0 :   explicit inline FileCallback(JS::Handle<JSObject*> aCallback, const FastCallbackConstructor& )
      85           0 :     : CallbackInterface(aCallback, FastCallbackConstructor())
      86             :   {
      87           0 :   }
      88             : 
      89             :   explicit inline FileCallback(JS::Handle<JSObject*> aCallback, JS::Handle<JSObject*> aAsyncStack, nsIGlobalObject* aIncumbentGlobal)
      90             :     : CallbackInterface(aCallback, aAsyncStack, aIncumbentGlobal)
      91             :   {
      92             :   }
      93             : 
      94             :   template <typename T>
      95             :   inline void
      96             :   HandleEvent(const T& thisVal, File& file, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JSCompartment* aCompartment = nullptr)
      97             :   {
      98             :     MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
      99             :     if (!aExecutionReason) {
     100             :       aExecutionReason = "FileCallback.handleEvent";
     101             :     }
     102             :     CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aCompartment);
     103             :     if (!s.GetContext()) {
     104             :       MOZ_ASSERT(aRv.Failed());
     105             :       return;
     106             :     }
     107             :     JS::Rooted<JS::Value> thisValJS(s.GetContext());
     108             :     if (!ToJSValue(s.GetContext(), thisVal, &thisValJS)) {
     109             :       aRv.Throw(NS_ERROR_FAILURE);
     110             :       return;
     111             :     }
     112             :     return HandleEvent(s.GetContext(), thisValJS, file, aRv);
     113             :   }
     114             : 
     115             :   inline void
     116           0 :   HandleEvent(File& file, ErrorResult& aRv, const char* aExecutionReason = nullptr, ExceptionHandling aExceptionHandling = eReportExceptions, JSCompartment* aCompartment = nullptr)
     117             :   {
     118           0 :     MOZ_ASSERT(!aRv.Failed(), "Don't pass an already-failed ErrorResult to a callback!");
     119           0 :     if (!aExecutionReason) {
     120           0 :       aExecutionReason = "FileCallback.handleEvent";
     121             :     }
     122           0 :     CallSetup s(this, aRv, aExecutionReason, aExceptionHandling, aCompartment);
     123           0 :     if (!s.GetContext()) {
     124           0 :       MOZ_ASSERT(aRv.Failed());
     125           0 :       return;
     126             :     }
     127           0 :     return HandleEvent(s.GetContext(), JS::UndefinedHandleValue, file, aRv);
     128             :   }
     129             : 
     130             :   template <typename T>
     131             :   inline void
     132             :   HandleEvent(const T& thisVal, File& file, const char* aExecutionReason = nullptr)
     133             :   {
     134             :     IgnoredErrorResult rv;
     135             :     return HandleEvent(thisVal, file, rv, aExecutionReason);
     136             :   }
     137             : 
     138             :   inline void
     139           0 :   HandleEvent(File& file, const char* aExecutionReason = nullptr)
     140             :   {
     141           0 :     IgnoredErrorResult rv;
     142           0 :     return HandleEvent(file, rv, aExecutionReason, eReportExceptions, nullptr);
     143             :   }
     144             : 
     145             :   inline bool
     146             :   operator==(const FileCallback& aOther) const
     147             :   {
     148             :     return CallbackInterface::operator==(aOther);
     149             :   }
     150             : 
     151             : private:
     152             :   void HandleEvent(JSContext* cx, JS::Handle<JS::Value> aThisVal, File& file, ErrorResult& aRv);
     153             : 
     154             :   static bool
     155             :   InitIds(JSContext* cx, FileCallbackAtoms* atomsCache);
     156             : };
     157             : 
     158             : 
     159             : namespace binding_detail {
     160           0 : class FastFileCallback : public FileCallback
     161             : {
     162             : public:
     163           0 :   explicit inline FastFileCallback(JS::Handle<JSObject*> aCallback)
     164           0 :     : FileCallback(aCallback, FastCallbackConstructor())
     165             :   {
     166           0 :   }
     167             : 
     168             :   inline void
     169           0 :   Trace(JSTracer* aTracer)
     170             :   {
     171           0 :     FileCallback::Trace(aTracer);
     172           0 :   }
     173             : 
     174             :   inline void
     175           0 :   FinishSlowJSInitIfMoreThanOneOwner(JSContext* aCx)
     176             :   {
     177           0 :     FileCallback::FinishSlowJSInitIfMoreThanOneOwner(aCx);
     178           0 :   }
     179             : };
     180             : } // namespace binding_detail
     181             : 
     182             : 
     183             : } // namespace dom
     184             : } // namespace mozilla
     185             : 
     186             : #endif // mozilla_dom_FileSystemFileEntryBinding_h

Generated by: LCOV version 1.13