StringObjectThatMasqueradesAsUndefined.h [plain text]
#ifndef StringObjectThatMasqueradesAsUndefined_h
#define StringObjectThatMasqueradesAsUndefined_h
#include "JSGlobalObject.h"
#include "StringObject.h"
#include "UString.h"
namespace JSC {
class StringObjectThatMasqueradesAsUndefined : public StringObject {
public:
static StringObjectThatMasqueradesAsUndefined* create(ExecState* exec, const UString& string)
{
return new (exec) StringObjectThatMasqueradesAsUndefined(exec,
createStructure(exec->globalData(), exec->lexicalGlobalObject()->stringPrototype()), string);
}
private:
StringObjectThatMasqueradesAsUndefined(ExecState* exec, Structure* structure, const UString& string)
: StringObject(exec, structure, string)
{
}
static Structure* createStructure(JSGlobalData& globalData, JSValue proto)
{
return Structure::create(globalData, proto, TypeInfo(ObjectType, StructureFlags), AnonymousSlotCount, &s_info);
}
static const unsigned StructureFlags = OverridesGetOwnPropertySlot | MasqueradesAsUndefined | OverridesGetPropertyNames | StringObject::StructureFlags;
virtual bool toBoolean(ExecState*) const { return false; }
};
}
#endif // StringObjectThatMasqueradesAsUndefined_h