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


C++ JSTestInterface类代码示例

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


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

示例1: setJSTestInterfaceImplementsStr2

void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    if (exec->hadException())
        return;
    impl->setImplementsStr2(nativeValue);
}
开发者ID:emandino,项目名称:webkit,代码行数:10,代码来源:JSTestInterface.cpp

示例2: setJSTestInterfaceSupplementalNode

void setJSTestInterfaceSupplementalNode(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
    TestInterface& impl = castedThis->impl();
    Node* nativeValue(toNode(value));
    if (exec->hadException())
        return;
    TestSupplemental::setSupplementalNode(&impl, nativeValue);
}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:10,代码来源:JSTestInterface.cpp

示例3: putByIndex

void JSTestInterface::putByIndex(JSCell* cell, ExecState* exec, unsigned index, JSValue value, bool shouldThrow)
{
    JSTestInterface* thisObject = jsCast<JSTestInterface*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    PropertyName propertyName = Identifier::from(exec, index);
    PutPropertySlot slot(shouldThrow);
    if (thisObject->putDelegate(exec, propertyName, value, slot))
        return;
    Base::putByIndex(cell, exec, index, value, shouldThrow);
}
开发者ID:emandino,项目名称:webkit,代码行数:10,代码来源:JSTestInterface.cpp

示例4: setJSTestInterfaceSupplementalStr2

void setJSTestInterfaceSupplementalStr2(ExecState* exec, JSObject* thisObject, JSValue value)
{
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsCast<JSTestInterface*>(thisObject);
    TestInterface& impl = castedThis->impl();
    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    if (exec->hadException())
        return;
    TestSupplemental::setSupplementalStr2(&impl, nativeValue);
}
开发者ID:ZeusbaseWeb,项目名称:webkit,代码行数:10,代码来源:JSTestInterface.cpp

示例5: isReachableFromOpaqueRoots

bool JSTestInterfaceOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSTestInterface* jsTestInterface = static_cast<JSTestInterface*>(handle.get().asCell());
    if (jsTestInterface->impl()->hasPendingActivity())
        return true;
    if (!isObservable(jsTestInterface))
        return false;
    UNUSED_PARAM(visitor);
    return false;
}
开发者ID:,项目名称:,代码行数:10,代码来源:

示例6: jsTestInterfacePrototypeFunctionSupplementalMethod1

EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(JSTestInterface::info()))
        return throwVMTypeError(exec);
    JSTestInterface* castedThis = jsCast<JSTestInterface*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    TestInterface* impl = static_cast<TestInterface*>(castedThis->impl());
    TestSupplemental::supplementalMethod1(impl);
    return JSValue::encode(jsUndefined());
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例7: jsTestInterfaceSupplementalNode

EncodedJSValue jsTestInterfaceSupplementalNode(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    TestInterface& impl = castedThis->impl();
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(TestSupplemental::supplementalNode(&impl)));
    return JSValue::encode(result);
}
开发者ID:EliBing,项目名称:webkit,代码行数:11,代码来源:JSTestInterface.cpp

示例8: jsTestInterfaceSupplementalStr2

EncodedJSValue jsTestInterfaceSupplementalStr2(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    TestInterface& impl = castedThis->impl();
    JSValue result = jsStringWithCache(exec, TestSupplemental::supplementalStr2(&impl));
    return JSValue::encode(result);
}
开发者ID:EliBing,项目名称:webkit,代码行数:11,代码来源:JSTestInterface.cpp

示例9: jsTestInterfacePrototypeFunctionSupplementalMethod1

EncodedJSValue JSC_HOST_CALL jsTestInterfacePrototypeFunctionSupplementalMethod1(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestInterface::info());
    TestInterface& impl = castedThis->impl();
    TestSupplemental::supplementalMethod1(&impl);
    return JSValue::encode(jsUndefined());
}
开发者ID:boska,项目名称:webkit,代码行数:11,代码来源:JSTestInterface.cpp

示例10: setJSTestInterfaceSupplementalStr3

bool setJSTestInterfaceSupplementalStr3(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(thisValue);
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis)) {
        return throwSetterTypeError(*state, "TestInterface", "supplementalStr3");
    }
    castedThis->setSupplementalStr3(*state, value);
    return true;
}
开发者ID:edcwconan,项目名称:webkit,代码行数:11,代码来源:JSTestInterface.cpp

示例11: setJSTestInterfaceSupplementalStr3

void setJSTestInterfaceSupplementalStr3(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    castedThis->setSupplementalStr3(exec, value);
}
开发者ID:boska,项目名称:webkit,代码行数:11,代码来源:JSTestInterface.cpp

示例12: jsTestInterfaceSupplementalStr3

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

示例13: setJSTestInterfaceImplementsStr2

void setJSTestInterfaceImplementsStr2(ExecState* exec, JSObject* /* baseObject */, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    TestInterface& impl = castedThis->impl();
    const String& nativeValue(value.isEmpty() ? String() : value.toString(exec)->value(exec));
    if (exec->hadException())
        return;
    impl.setImplementsStr2(nativeValue);
}
开发者ID:boska,项目名称:webkit,代码行数:15,代码来源:JSTestInterface.cpp

示例14: setJSTestInterfaceImplementsNode

void setJSTestInterfaceImplementsNode(ExecState* exec, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(exec);
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    if (!castedThis) {
        throwVMTypeError(exec);
        return;
    }
    TestInterface& impl = castedThis->impl();
    Node* nativeValue(toNode(value));
    if (exec->hadException())
        return;
    impl.setImplementsNode(nativeValue);
}
开发者ID:EliBing,项目名称:webkit,代码行数:15,代码来源:JSTestInterface.cpp

示例15: setJSTestInterfaceSupplementalStr2

bool setJSTestInterfaceSupplementalStr2(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    UNUSED_PARAM(thisValue);
    JSTestInterface* castedThis = jsDynamicCast<JSTestInterface*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis)) {
        return throwSetterTypeError(*state, "TestInterface", "supplementalStr2");
    }
    auto& impl = castedThis->wrapped();
    auto nativeValue = value.toWTFString(state);
    if (UNLIKELY(state->hadException()))
        return false;
    WebCore::TestSupplemental::setSupplementalStr2(impl, WTFMove(nativeValue));
    return true;
}
开发者ID:edcwconan,项目名称:webkit,代码行数:15,代码来源:JSTestInterface.cpp


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