diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /js/xpconnect/public/xpc_map_end.h | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/xpconnect/public/xpc_map_end.h')
-rw-r--r-- | js/xpconnect/public/xpc_map_end.h | 114 |
1 files changed, 114 insertions, 0 deletions
diff --git a/js/xpconnect/public/xpc_map_end.h b/js/xpconnect/public/xpc_map_end.h new file mode 100644 index 0000000000..07f0f0b707 --- /dev/null +++ b/js/xpconnect/public/xpc_map_end.h @@ -0,0 +1,114 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim: set ts=8 sts=2 et sw=2 tw=80: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +// If you include this file you must also include xpc_make_class.h at the top +// of the file doing the including. + +#ifndef XPC_MAP_CLASSNAME +# error "Must #define XPC_MAP_CLASSNAME before #including xpc_map_end.h" +#endif + +#ifndef XPC_MAP_QUOTED_CLASSNAME +# error "Must #define XPC_MAP_QUOTED_CLASSNAME before #including xpc_map_end.h" +#endif + +#ifndef XPC_MAP_FLAGS +# error "Must #define XPC_MAP_FLAGS before #including xpc_map_end.h" +#endif + +#include "js/Id.h" + +/**************************************************************/ + +NS_IMETHODIMP XPC_MAP_CLASSNAME::GetClassName(nsACString& aClassName) { + aClassName.AssignLiteral(XPC_MAP_QUOTED_CLASSNAME); + return NS_OK; +} + +/**************************************************************/ + +// virtual +uint32_t XPC_MAP_CLASSNAME::GetScriptableFlags() { return (XPC_MAP_FLAGS); } + +// virtual +const JSClass* XPC_MAP_CLASSNAME::GetJSClass() { + static const JSClassOps classOps = XPC_MAKE_CLASS_OPS(GetScriptableFlags()); + static const JSClass klass = + XPC_MAKE_CLASS(XPC_MAP_QUOTED_CLASSNAME, GetScriptableFlags(), &classOps); + return &klass; +} + +/**************************************************************/ + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_PRECREATE) +NS_IMETHODIMP XPC_MAP_CLASSNAME::PreCreate(nsISupports* nativeObj, + JSContext* cx, JSObject* globalObj, + JSObject** parentObj) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_NEWENUMERATE) +NS_IMETHODIMP XPC_MAP_CLASSNAME::NewEnumerate( + nsIXPConnectWrappedNative* wrapper, JSContext* cx, JSObject* obj, + JS::MutableHandleIdVector properties, bool enumerableOnly, bool* _retval) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_RESOLVE) +NS_IMETHODIMP XPC_MAP_CLASSNAME::Resolve(nsIXPConnectWrappedNative* wrapper, + JSContext* cx, JSObject* obj, jsid id, + bool* resolvedp, bool* _retval) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_FINALIZE) +NS_IMETHODIMP XPC_MAP_CLASSNAME::Finalize(nsIXPConnectWrappedNative* wrapper, + JSFreeOp* fop, JSObject* obj) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_CALL) +NS_IMETHODIMP XPC_MAP_CLASSNAME::Call(nsIXPConnectWrappedNative* wrapper, + JSContext* cx, JSObject* obj, + const JS::CallArgs& args, bool* _retval) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_CONSTRUCT) +NS_IMETHODIMP XPC_MAP_CLASSNAME::Construct(nsIXPConnectWrappedNative* wrapper, + JSContext* cx, JSObject* obj, + const JS::CallArgs& args, + bool* _retval) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +#if !((XPC_MAP_FLAGS)&XPC_SCRIPTABLE_WANT_HASINSTANCE) +NS_IMETHODIMP XPC_MAP_CLASSNAME::HasInstance(nsIXPConnectWrappedNative* wrapper, + JSContext* cx, JSObject* obj, + JS::HandleValue val, bool* bp, + bool* _retval) { + NS_ERROR("never called"); + return NS_ERROR_NOT_IMPLEMENTED; +} +#endif + +/**************************************************************/ + +#undef XPC_MAP_CLASSNAME +#undef XPC_MAP_QUOTED_CLASSNAME +#undef XPC_MAP_FLAGS |