当前位置: 首页>>代码示例>>C++>>正文


C++ JSTestTypedefs::globalObject方法代码示例

本文整理汇总了C++中JSTestTypedefs::globalObject方法的典型用法代码示例。如果您正苦于以下问题:C++ JSTestTypedefs::globalObject方法的具体用法?C++ JSTestTypedefs::globalObject怎么用?C++ JSTestTypedefs::globalObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JSTestTypedefs的用法示例。


在下文中一共展示了JSTestTypedefs::globalObject方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: jsTestTypedefsConstructor

EncodedJSValue jsTestTypedefsConstructor(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue, PropertyName)
{
    JSTestTypedefs* domObject = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(slotBase));
    if (!domObject)
        return throwVMTypeError(exec);
    return JSValue::encode(JSTestTypedefs::getConstructor(exec->vm(), domObject->globalObject()));
}
开发者ID:liudengyong,项目名称:webkit,代码行数:7,代码来源:JSTestTypedefs.cpp

示例2: jsTestTypedefsConstructorTestSubObj

EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(exec);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestTypedefs* castedThis = jsCast<JSTestTypedefs*>(slotBase);
    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:8,代码来源:JSTestTypedefs.cpp

示例3: jsTestTypedefsConstructorTestSubObj

EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:8,代码来源:JSTestTypedefs.cpp

示例4: jsTestTypedefsPrototypeFunctionImmutablePointFunction

EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionImmutablePointFunction(ExecState* exec)
{
    JSValue thisValue = exec->thisValue();
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    if (UNLIKELY(!castedThis))
        return throwThisTypeError(*exec, "TestTypedefs", "immutablePointFunction");
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    auto& impl = castedThis->impl();
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(SVGPropertyTearOff<SVGPoint>::create(impl.immutablePointFunction())));
    return JSValue::encode(result);
}
开发者ID:feel2d,项目名称:webkit,代码行数:11,代码来源:JSTestTypedefs.cpp

示例5: jsTestTypedefsConstructorTestSubObj

EncodedJSValue jsTestTypedefsConstructorTestSubObj(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis) {
        if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) {
            ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
            scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'TestSubObj' on a non-TestTypedefs object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    return JSValue::encode(JSTestSubObj::getConstructor(exec->vm(), castedThis->globalObject()));
}
开发者ID:boska,项目名称:webkit,代码行数:14,代码来源:JSTestTypedefs.cpp

示例6: throwThisTypeError

EncodedJSValue JSC_HOST_CALL jsTestTypedefsPrototypeFunctionStringArrayFunction2(ExecState* exec)
{
    JSValue thisValue = exec->thisValue();
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(thisValue);
    if (UNLIKELY(!castedThis))
        return throwThisTypeError(*exec, "TestTypedefs", "stringArrayFunction2");
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestTypedefs::info());
    auto& impl = castedThis->impl();
    if (UNLIKELY(exec->argumentCount() < 1))
        return throwVMError(exec, createNotEnoughArgumentsError(exec));
    ExceptionCode ec = 0;
    Vector<String> values(toNativeArray<String>(exec, exec->argument(0)));
    if (UNLIKELY(exec->hadException()))
        return JSValue::encode(jsUndefined());
    JSValue result = jsArray(exec, castedThis->globalObject(), impl.stringArrayFunction2(values, ec));

    setDOMException(exec, ec);
    return JSValue::encode(result);
}
开发者ID:feel2d,项目名称:webkit,代码行数:19,代码来源:JSTestTypedefs.cpp

示例7: jsTestTypedefsImmutableSerializedScriptValue

EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(exec);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis)) {
        if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase))
            return reportDeprecatedGetterError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
        return throwGetterTypeError(*exec, "TestTypedefs", "immutableSerializedScriptValue");
    }
    auto& impl = castedThis->impl();
    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    return JSValue::encode(result);
}
开发者ID:feel2d,项目名称:webkit,代码行数:15,代码来源:JSTestTypedefs.cpp

示例8: jsTestTypedefsImmutableSerializedScriptValue

EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    TestTypedefs& impl = castedThis->impl();
    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    return JSValue::encode(result);
}
开发者ID:Happy-Ferret,项目名称:webkit.js,代码行数:11,代码来源:JSTestTypedefs.cpp

示例9: jsTestTypedefsImmutableSerializedScriptValue

EncodedJSValue jsTestTypedefsImmutableSerializedScriptValue(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestTypedefs* castedThis = jsDynamicCast<JSTestTypedefs*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis) {
        if (jsDynamicCast<JSTestTypedefsPrototype*>(slotBase)) {
            ScriptExecutionContext* scriptExecutionContext = jsCast<JSDOMGlobalObject*>(exec->lexicalGlobalObject())->scriptExecutionContext();
            scriptExecutionContext->addConsoleMessage(MessageSource::JS, MessageLevel::Error, String("Deprecated attempt to access property 'immutableSerializedScriptValue' on a non-TestTypedefs object."));
            return JSValue::encode(jsUndefined());
        }
        return throwVMTypeError(exec);
    }
    UNUSED_PARAM(exec);
    TestTypedefs& impl = castedThis->impl();
    JSValue result = impl.immutableSerializedScriptValue() ? impl.immutableSerializedScriptValue()->deserialize(exec, castedThis->globalObject(), 0) : jsNull();
    return JSValue::encode(result);
}
开发者ID:boska,项目名称:webkit,代码行数:17,代码来源:JSTestTypedefs.cpp


注:本文中的JSTestTypedefs::globalObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。