RegExpStaticsObject*
RegExpStatics::create(ExclusiveContext* cx, Handle<GlobalObject*> parent)
{
    RegExpStaticsObject* obj = NewObjectWithGivenProto<RegExpStaticsObject>(cx, nullptr);
    if (!obj)
        return nullptr;
    RegExpStatics* res = cx->new_<RegExpStatics>();
    if (!res)
        return nullptr;
    obj->setPrivate(static_cast<void*>(res));
    return obj;
}
Beispiel #2
0
RegExpStaticsObject*
RegExpStatics::create(JSContext* cx)
{
    RegExpStaticsObject* obj = NewObjectWithGivenProto<RegExpStaticsObject>(cx, nullptr);
    if (!obj)
        return nullptr;
    RegExpStatics* res = cx->new_<RegExpStatics>();
    if (!res)
        return nullptr;
    obj->setPrivate(static_cast<void*>(res));
    return obj;
}