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


C++ JSTestActiveDOMObject类代码示例

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


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

示例1: finalize

void JSTestActiveDOMObjectOwner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)
{
    JSTestActiveDOMObject* jsTestActiveDOMObject = jsCast<JSTestActiveDOMObject*>(handle.slot()->asCell());
    DOMWrapperWorld& world = *static_cast<DOMWrapperWorld*>(context);
    uncacheWrapper(world, &jsTestActiveDOMObject->impl(), jsTestActiveDOMObject);
    jsTestActiveDOMObject->releaseImpl();
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:7,代码来源:JSTestActiveDOMObject.cpp

示例2: jsTestActiveDOMObjectConstructor

EncodedJSValue jsTestActiveDOMObjectConstructor(ExecState* state, JSObject*, EncodedJSValue thisValue, PropertyName)
{
    JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
    if (!domObject)
        return throwVMTypeError(state);
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, domObject->impl()))
        return JSValue::encode(jsUndefined());
    return JSValue::encode(JSTestActiveDOMObject::getConstructor(state->vm(), domObject->globalObject()));
}
开发者ID:simudream,项目名称:webkit,代码行数:9,代码来源:JSTestActiveDOMObject.cpp

示例3: jsTestActiveDOMObjectExcitingAttrGetter

static inline JSValue jsTestActiveDOMObjectExcitingAttrGetter(ExecState& state, JSTestActiveDOMObject& thisObject, ThrowScope& throwScope)
{
    UNUSED_PARAM(throwScope);
    UNUSED_PARAM(state);
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(&state, thisObject.wrapped().window(), ThrowSecurityError))
        return jsUndefined();
    auto& impl = thisObject.wrapped();
    JSValue result = toJS<IDLLong>(state, throwScope, impl.excitingAttr());
    return result;
}
开发者ID:wolfviking0,项目名称:webcl-webkit,代码行数:10,代码来源:JSTestActiveDOMObject.cpp

示例4: jsTestActiveDOMObjectExcitingAttr

EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* exec, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(exec);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestActiveDOMObject* castedThis = jsCast<JSTestActiveDOMObject*>(slotBase);
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, castedThis->impl()))
        return JSValue::encode(jsUndefined());
    TestActiveDOMObject& impl = castedThis->impl();
    JSValue result = jsNumber(impl.excitingAttr());
    return JSValue::encode(result);
}
开发者ID:AndriyKalashnykov,项目名称:webkit,代码行数:12,代码来源:JSTestActiveDOMObject.cpp

示例5: setJSTestActiveDOMObjectConstructor

void setJSTestActiveDOMObjectConstructor(ExecState* state, EncodedJSValue thisValue, EncodedJSValue encodedValue)
{
    JSValue value = JSValue::decode(encodedValue);
    JSTestActiveDOMObject* domObject = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
    if (UNLIKELY(!domObject)) {
        throwVMTypeError(state);
        return;
    }
    if (!shouldAllowAccessToFrame(state, domObject->wrapped().frame()))
        return;
    // Shadowing a built-in constructor
    domObject->putDirect(state->vm(), state->propertyNames().constructor, value);
}
开发者ID:kamihouse,项目名称:webkit,代码行数:13,代码来源:JSTestActiveDOMObject.cpp

示例6: jsTestActiveDOMObjectExcitingAttr

EncodedJSValue jsTestActiveDOMObjectExcitingAttr(ExecState* state, JSObject* slotBase, EncodedJSValue thisValue, PropertyName)
{
    UNUSED_PARAM(state);
    UNUSED_PARAM(slotBase);
    UNUSED_PARAM(thisValue);
    JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(JSValue::decode(thisValue));
    if (UNLIKELY(!castedThis)) {
        return throwGetterTypeError(*state, "TestActiveDOMObject", "excitingAttr");
    }
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->wrapped()))
        return JSValue::encode(jsUndefined());
    auto& impl = castedThis->wrapped();
    JSValue result = jsNumber(impl.excitingAttr());
    return JSValue::encode(result);
}
开发者ID:shenangovalleyavclub,项目名称:webkit,代码行数:15,代码来源:JSTestActiveDOMObject.cpp

示例7: jsTestActiveDOMObjectPrototypeFunctionPostMessage

EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionPostMessage(ExecState* state)
{
    JSValue thisValue = state->thisValue();
    JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
    if (UNLIKELY(!castedThis))
        return throwThisTypeError(*state, "TestActiveDOMObject", "postMessage");
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
    auto& impl = castedThis->impl();
    if (UNLIKELY(state->argumentCount() < 1))
        return throwVMError(state, createNotEnoughArgumentsError(state));
    String message = state->argument(0).toString(state)->value(state);
    if (UNLIKELY(state->hadException()))
        return JSValue::encode(jsUndefined());
    impl.postMessage(message);
    return JSValue::encode(jsUndefined());
}
开发者ID:simudream,项目名称:webkit,代码行数:16,代码来源:JSTestActiveDOMObject.cpp

示例8: jsTestActiveDOMObjectPrototypeFunctionExcitingFunction

EncodedJSValue JSC_HOST_CALL jsTestActiveDOMObjectPrototypeFunctionExcitingFunction(ExecState* state)
{
    JSValue thisValue = state->thisValue();
    JSTestActiveDOMObject* castedThis = jsDynamicCast<JSTestActiveDOMObject*>(thisValue);
    if (UNLIKELY(!castedThis))
        return throwThisTypeError(*state, "TestActiveDOMObject", "excitingFunction");
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestActiveDOMObject::info());
    if (!BindingSecurity::shouldAllowAccessToDOMWindow(state, castedThis->impl()))
        return JSValue::encode(jsUndefined());
    auto& impl = castedThis->impl();
    if (UNLIKELY(state->argumentCount() < 1))
        return throwVMError(state, createNotEnoughArgumentsError(state));
    Node* nextChild = JSNode::toWrapped(state->argument(0));
    if (UNLIKELY(state->hadException()))
        return JSValue::encode(jsUndefined());
    impl.excitingFunction(nextChild);
    return JSValue::encode(jsUndefined());
}
开发者ID:simudream,项目名称:webkit,代码行数:18,代码来源:JSTestActiveDOMObject.cpp


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