Copy as Markdown

Other Tools

/* THIS FILE IS AUTOGENERATED FROM AppNotificationServiceOptions.webidl BY Codegen.py - DO NOT EDIT */
#include <type_traits>
#include "AppNotificationServiceOptionsBinding.h"
#include "AtomList.h"
#include "MainThreadUtils.h"
#include "js/CallAndConstruct.h"
#include "js/Exception.h"
#include "js/MapAndSet.h"
#include "js/Object.h"
#include "js/PropertyAndElement.h"
#include "js/PropertyDescriptor.h"
#include "js/experimental/JitInfo.h"
#include "mozilla/OwningNonNull.h"
#include "mozilla/dom/BindingCallContext.h"
#include "mozilla/dom/BindingUtils.h"
#include "mozilla/dom/NonRefcountedDOMObject.h"
#include "mozilla/dom/PrimitiveConversions.h"
#include "mozilla/dom/ScriptSettings.h"
#include "mozilla/dom/SimpleGlobalObject.h"
namespace mozilla::dom {
namespace binding_detail {}; // Just to make sure it's known as a namespace
using namespace mozilla::dom::binding_detail;
AppNotificationServiceOptions::AppNotificationServiceOptions()
: mMozbehavior(FastDictionaryInitializer())
{
// Safe to pass a null context if we pass a null value
Init();
}
bool
AppNotificationServiceOptions::InitIds(JSContext* cx, AppNotificationServiceOptionsAtoms* atomsCache)
{
MOZ_ASSERT(reinterpret_cast<jsid*>(atomsCache)->isVoid());
// Initialize these in reverse order so that any failure leaves the first one
// uninitialized.
if (!atomsCache->textClickable_id.init(cx, "textClickable") ||
!atomsCache->tag_id.init(cx, "tag") ||
!atomsCache->mozbehavior_id.init(cx, "mozbehavior") ||
!atomsCache->manifestURL_id.init(cx, "manifestURL") ||
!atomsCache->lang_id.init(cx, "lang") ||
!atomsCache->id_id.init(cx, "id") ||
!atomsCache->dir_id.init(cx, "dir") ||
!atomsCache->dbId_id.init(cx, "dbId") ||
!atomsCache->data_id.init(cx, "data")) {
return false;
}
return true;
}
bool
AppNotificationServiceOptions::Init(const char* sourceDescription, bool passedToJSImpl)
{
JSContext* cx = nullptr;
{
// scope for any temporaries our default value setting needs.
mData.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mDbId.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mDir.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mId.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mLang.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mManifestURL.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
if (!mMozbehavior.Init(cx, (false) ? (JS::NullHandleValue) : JS::NullHandleValue, "'mozbehavior' member of AppNotificationServiceOptions", passedToJSImpl)) {
return false;
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mTag.AssignLiteral(u"");
}
mIsAnyMemberPresent = true;
{
// scope for any temporaries our default value setting needs.
mTextClickable = false;
}
mIsAnyMemberPresent = true;
return true;
}
void
AppNotificationServiceOptions::TraceDictionary(JSTracer* trc)
{
}
AppNotificationServiceOptions&
AppNotificationServiceOptions::operator=(const AppNotificationServiceOptions& aOther)
{
DictionaryBase::operator=(aOther);
mData = aOther.mData;
mDbId = aOther.mDbId;
mDir = aOther.mDir;
mId = aOther.mId;
mLang = aOther.mLang;
mManifestURL = aOther.mManifestURL;
mMozbehavior = aOther.mMozbehavior;
mTag = aOther.mTag;
mTextClickable = aOther.mTextClickable;
return *this;
}
} // namespace mozilla::dom