Example #1
0
void JSTestExceptionOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
    JSTestException* jsTestException = jsCast<JSTestException*>(handle.get().asCell());
    DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);
    uncacheWrapper(world, jsTestException->impl(), jsTestException);
    jsTestException->releaseImpl();
}
Example #2
0
JSValue jsTestExceptionName(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSTestException* castedThis = jsCast<JSTestException*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    TestException* impl = static_cast<TestException*>(castedThis->impl());
    JSValue result = jsString(exec, impl->name());
    return result;
}
EncodedJSValue jsTestExceptionName(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(exec);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestException* castedThis = jsCast<JSTestException*>(slotBase);
    TestException& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, impl.name());
    return JSValue::encode(result);
}
Example #4
0
EncodedJSValue jsTestExceptionName(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestException* castedThis = jsDynamicCast<JSTestException*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis)) {
        if (jsDynamicCast<JSTestExceptionPrototype*>(slotBase))
            return reportDeprecatedGetterError(*exec, "TestException", "name");
        return throwGetterTypeError(*exec, "TestException", "name");
    }
    TestException& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, impl.name());
    return JSValue::encode(result);
}
Example #5
0
JSValue jsTestExceptionConstructor(ExecState* exec, JSValue slotBase, PropertyName)
{
    JSTestException* domObject = jsCast<JSTestException*>(asObject(slotBase));
    return JSTestException::getConstructor(exec, domObject->globalObject());
}