Beispiel #1
0
EncodedJSValue JSC_HOST_CALL jsGeolocationPrototypeFunctionGetCurrentPosition(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSGeolocation::s_info))
        return throwVMTypeError(exec);
    JSGeolocation* castedThis = static_cast<JSGeolocation*>(asObject(thisValue));
    return JSValue::encode(castedThis->getCurrentPosition(exec));
}
Beispiel #2
0
EncodedJSValue JSC_HOST_CALL jsGeolocationPrototypeFunctionGetCurrentPosition(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSGeolocation* castedThis = jsDynamicCast<JSGeolocation*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSGeolocation::info());
    return JSValue::encode(castedThis->getCurrentPosition(exec));
}