#include "config.h"
#include "JSNotAnObject.h"
#include <wtf/UnusedParam.h>
namespace JSC {
ASSERT_CLASS_FITS_IN_CELL(JSNotAnObject);
JSValuePtr JSNotAnObject::toPrimitive(ExecState* exec, PreferredPrimitiveType) const
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return m_exception;
}
bool JSNotAnObject::getPrimitiveNumber(ExecState* exec, double&, JSValuePtr&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
bool JSNotAnObject::toBoolean(ExecState* exec) const
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
double JSNotAnObject::toNumber(ExecState* exec) const
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return NaN;
}
UString JSNotAnObject::toString(ExecState* exec) const
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return "";
}
JSObject* JSNotAnObject::toObject(ExecState* exec) const
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return m_exception;
}
void JSNotAnObject::mark()
{
JSCell::mark();
if (!m_exception->marked())
m_exception->mark();
}
bool JSNotAnObject::getOwnPropertySlot(ExecState* exec, const Identifier&, PropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
bool JSNotAnObject::getOwnPropertySlot(ExecState* exec, unsigned, PropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
void JSNotAnObject::put(ExecState* exec, const Identifier& , JSValuePtr, PutPropertySlot&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
}
void JSNotAnObject::put(ExecState* exec, unsigned, JSValuePtr)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
}
bool JSNotAnObject::deleteProperty(ExecState* exec, const Identifier&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
bool JSNotAnObject::deleteProperty(ExecState* exec, unsigned)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
return false;
}
void JSNotAnObject::getPropertyNames(ExecState* exec, PropertyNameArray&)
{
ASSERT_UNUSED(exec, exec->hadException() && exec->exception() == m_exception);
}
}