blob: 81000103ffc001cfad3dc6a95b193f751c5ae5cf [file] [log] [blame]
/*
This file is part of the WebKit open source project.
This file has been generated by generate-bindings.pl. DO NOT MODIFY!
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "config.h"
#if ENABLE(MEDIA_STREAM)
#include "JSMediaTrackSupportedConstraints.h"
#include "JSDOMBinding.h"
#include <wtf/GetPtr.h>
using namespace JSC;
namespace WebCore {
class JSMediaTrackSupportedConstraintsPrototype : public JSC::JSNonFinalObject {
public:
typedef JSC::JSNonFinalObject Base;
static JSMediaTrackSupportedConstraintsPrototype* create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure)
{
JSMediaTrackSupportedConstraintsPrototype* ptr = new (NotNull, JSC::allocateCell<JSMediaTrackSupportedConstraintsPrototype>(vm.heap)) JSMediaTrackSupportedConstraintsPrototype(vm, globalObject, structure);
ptr->finishCreation(vm);
return ptr;
}
DECLARE_INFO;
static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::JSValue prototype)
{
return JSC::Structure::create(vm, globalObject, prototype, JSC::TypeInfo(JSC::ObjectType, StructureFlags), info());
}
private:
JSMediaTrackSupportedConstraintsPrototype(JSC::VM& vm, JSC::JSGlobalObject*, JSC::Structure* structure)
: JSC::JSNonFinalObject(vm, structure)
{
}
};
/* Hash table for prototype */
const ClassInfo JSMediaTrackSupportedConstraintsPrototype::s_info = { "MediaTrackSupportedConstraintsPrototype", &Base::s_info, 0, CREATE_METHOD_TABLE(JSMediaTrackSupportedConstraintsPrototype) };
const ClassInfo JSMediaTrackSupportedConstraints::s_info = { "MediaTrackSupportedConstraints", &Base::s_info, 0, CREATE_METHOD_TABLE(JSMediaTrackSupportedConstraints) };
JSMediaTrackSupportedConstraints::JSMediaTrackSupportedConstraints(Structure* structure, JSDOMGlobalObject& globalObject, Ref<MediaTrackSupportedConstraints>&& impl)
: JSDOMWrapper<MediaTrackSupportedConstraints>(structure, globalObject, WTFMove(impl))
{
}
JSObject* JSMediaTrackSupportedConstraints::createPrototype(VM& vm, JSGlobalObject* globalObject)
{
return JSMediaTrackSupportedConstraintsPrototype::create(vm, globalObject, JSMediaTrackSupportedConstraintsPrototype::createStructure(vm, globalObject, globalObject->objectPrototype()));
}
JSObject* JSMediaTrackSupportedConstraints::prototype(VM& vm, JSGlobalObject* globalObject)
{
return getDOMPrototype<JSMediaTrackSupportedConstraints>(vm, globalObject);
}
void JSMediaTrackSupportedConstraints::destroy(JSC::JSCell* cell)
{
JSMediaTrackSupportedConstraints* thisObject = static_cast<JSMediaTrackSupportedConstraints*>(cell);
thisObject->JSMediaTrackSupportedConstraints::~JSMediaTrackSupportedConstraints();
}
bool JSMediaTrackSupportedConstraints::getOwnPropertySlot(JSObject* object, ExecState* state, PropertyName propertyName, PropertySlot& slot)
{
auto* thisObject = jsCast<JSMediaTrackSupportedConstraints*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))
return true;
if (Base::getOwnPropertySlot(thisObject, state, propertyName, slot))
return true;
return false;
}
bool JSMediaTrackSupportedConstraints::getOwnPropertySlotByIndex(JSObject* object, ExecState* state, unsigned index, PropertySlot& slot)
{
auto* thisObject = jsCast<JSMediaTrackSupportedConstraints*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
Identifier propertyName = Identifier::from(state, index);
if (thisObject->getOwnPropertySlotDelegate(state, propertyName, slot))
return true;
return Base::getOwnPropertySlotByIndex(thisObject, state, index, slot);
}
bool JSMediaTrackSupportedConstraintsOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
UNUSED_PARAM(handle);
UNUSED_PARAM(visitor);
return false;
}
void JSMediaTrackSupportedConstraintsOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
auto* jsMediaTrackSupportedConstraints = jsCast<JSMediaTrackSupportedConstraints*>(handle.slot()->asCell());
auto& world = *static_cast<DOMWrapperWorld*>(context);
uncacheWrapper(world, &jsMediaTrackSupportedConstraints->wrapped(), jsMediaTrackSupportedConstraints);
}
JSC::JSValue toJSNewlyCreated(JSC::ExecState*, JSDOMGlobalObject* globalObject, Ref<MediaTrackSupportedConstraints>&& impl)
{
#if COMPILER(CLANG)
// If you hit this failure the interface definition has the ImplementationLacksVTable
// attribute. You should remove that attribute. If the class has subclasses
// that may be passed through this toJS() function you should use the SkipVTableValidation
// attribute to MediaTrackSupportedConstraints.
static_assert(!__is_polymorphic(MediaTrackSupportedConstraints), "MediaTrackSupportedConstraints is polymorphic but the IDL claims it is not");
#endif
return createWrapper<MediaTrackSupportedConstraints>(globalObject, WTFMove(impl));
}
JSC::JSValue toJS(JSC::ExecState* state, JSDOMGlobalObject* globalObject, MediaTrackSupportedConstraints& impl)
{
return wrap(state, globalObject, impl);
}
MediaTrackSupportedConstraints* JSMediaTrackSupportedConstraints::toWrapped(JSC::JSValue value)
{
if (auto* wrapper = jsDynamicCast<JSMediaTrackSupportedConstraints*>(value))
return &wrapper->wrapped();
return nullptr;
}
}
#endif // ENABLE(MEDIA_STREAM)