Example #1
0
JSValue* jsSVGExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue* thisValue, const ArgList& args)
{
    if (!thisValue->isObject(&JSSVGException::s_info))
        return throwError(exec, TypeError);
    JSSVGException* castedThisObj = static_cast<JSSVGException*>(thisValue);
    SVGException* imp = static_cast<SVGException*>(castedThisObj->impl());


    JSC::JSValue* result = jsString(exec, imp->toString());
    return result;
}
Example #2
0
JSValue JSC_HOST_CALL jsSVGExceptionPrototypeFunctionToString(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSSVGException::s_info))
        return throwError(exec, TypeError);
    JSSVGException* castedThisObj = static_cast<JSSVGException*>(asObject(thisValue));
    SVGException* imp = static_cast<SVGException*>(castedThisObj->impl());


    JSC::JSValue result = jsString(exec, imp->toString());
    return result;
}
Example #3
0
JSValue* JSSVGException::getValueProperty(ExecState* exec, int token) const
{
    switch (token) {
    case CodeAttrNum: {
        SVGException* imp = static_cast<SVGException*>(impl());
        return jsNumber(exec, imp->code());
    }
    case NameAttrNum: {
        SVGException* imp = static_cast<SVGException*>(impl());
        return jsString(exec, imp->name());
    }
    case MessageAttrNum: {
        SVGException* imp = static_cast<SVGException*>(impl());
        return jsString(exec, imp->message());
    }
    case ConstructorAttrNum:
        return getConstructor(exec);
    }
    return 0;
}