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


C++ JSDOMPluginArray::impl方法代码示例

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


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

示例1: getOwnPropertySlotByIndex

bool JSDOMPluginArray::getOwnPropertySlotByIndex(JSObject* object, ExecState* exec, unsigned index, PropertySlot& slot)
{
    JSDOMPluginArray* thisObject = jsCast<JSDOMPluginArray*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    if (index < thisObject->impl().length()) {
        unsigned attributes = DontDelete | ReadOnly;
        slot.setCustomIndex(thisObject, attributes, index, thisObject->indexGetter);
        return true;
    }
    PropertyName propertyName = Identifier::from(exec, index);
    if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) {
        slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
        return true;
    }
    return Base::getOwnPropertySlotByIndex(thisObject, exec, index, slot);
}
开发者ID:,项目名称:,代码行数:16,代码来源:

示例2: finalize

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

示例3: getOwnPropertyNames

void JSDOMPluginArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
    JSDOMPluginArray* thisObject = jsCast<JSDOMPluginArray*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    for (unsigned i = 0, count = thisObject->impl().length(); i < count; ++i)
        propertyNames.add(Identifier::from(exec, i));
     Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
开发者ID:,项目名称:,代码行数:8,代码来源:

示例4: jsDOMPluginArrayLength

JSValue jsDOMPluginArrayLength(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSDOMPluginArray* castedThis = static_cast<JSDOMPluginArray*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    DOMPluginArray* imp = static_cast<DOMPluginArray*>(castedThis->impl());
    JSValue result = jsNumber(imp->length());
    return result;
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:8,代码来源:JSDOMPluginArray.cpp

示例5: isReachableFromOpaqueRoots

bool JSDOMPluginArrayOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)
{
    JSDOMPluginArray* jsDOMPluginArray = static_cast<JSDOMPluginArray*>(handle.get().asCell());
    if (!isObservable(jsDOMPluginArray))
        return false;
    Frame* root = jsDOMPluginArray->impl()->frame();
    if (!root)
        return false;
    return visitor.containsOpaqueRoot(root);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:10,代码来源:JSDOMPluginArray.cpp

示例6: jsDOMPluginArrayLength

EncodedJSValue jsDOMPluginArrayLength(ExecState* exec, EncodedJSValue slotBase, EncodedJSValue thisValue, PropertyName)
{
    JSDOMPluginArray* castedThis = jsDynamicCast<JSDOMPluginArray*>(JSValue::decode(thisValue));
    UNUSED_PARAM(slotBase);
    if (!castedThis)
        return throwVMTypeError(exec);
    UNUSED_PARAM(exec);
    DOMPluginArray& impl = castedThis->impl();
    JSValue result = jsNumber(impl.length());
    return JSValue::encode(result);
}
开发者ID:,项目名称:,代码行数:11,代码来源:

示例7: getOwnPropertySlot

bool JSDOMPluginArray::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot& slot)
{
    JSDOMPluginArray* thisObject = jsCast<JSDOMPluginArray*>(object);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    const HashEntry* entry = getStaticValueSlotEntryWithoutCaching<JSDOMPluginArray>(exec, propertyName);
    if (entry) {
        slot.setCustom(thisObject, entry->attributes(), entry->propertyGetter());
        return true;
    }
    unsigned index = propertyName.asIndex();
    if (index != PropertyName::NotAnIndex && index < thisObject->impl().length()) {
        unsigned attributes = DontDelete | ReadOnly;
        slot.setCustomIndex(thisObject, attributes, index, indexGetter);
        return true;
    }
    if (canGetItemsForName(exec, &thisObject->impl(), propertyName)) {
        slot.setCustom(thisObject, ReadOnly | DontDelete | DontEnum, thisObject->nameGetter);
        return true;
    }
    return getStaticValueSlot<JSDOMPluginArray, Base>(exec, JSDOMPluginArrayTable, thisObject, propertyName, slot);
}
开发者ID:,项目名称:,代码行数:21,代码来源:

示例8: jsDOMPluginArrayPrototypeFunctionRefresh

EncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionRefresh(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSDOMPluginArray* castedThis = jsDynamicCast<JSDOMPluginArray*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSDOMPluginArray::info());
    DOMPluginArray& impl = castedThis->impl();
    bool reload(exec->argument(0).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());
    impl.refresh(reload);
    return JSValue::encode(jsUndefined());
}
开发者ID:,项目名称:,代码行数:14,代码来源:

示例9: jsDOMPluginArrayPrototypeFunctionRefresh

EncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionRefresh(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSDOMPluginArray::s_info))
        return throwVMTypeError(exec);
    JSDOMPluginArray* castedThis = static_cast<JSDOMPluginArray*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSDOMPluginArray::s_info);
    DOMPluginArray* imp = static_cast<DOMPluginArray*>(castedThis->impl());
    bool reload(exec->argument(0).toBoolean(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());

    imp->refresh(reload);
    return JSValue::encode(jsUndefined());
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:15,代码来源:JSDOMPluginArray.cpp

示例10: jsDOMPluginArrayPrototypeFunctionItem

EncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionItem(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSDOMPluginArray* castedThis = jsDynamicCast<JSDOMPluginArray*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSDOMPluginArray::info());
    DOMPluginArray& impl = castedThis->impl();
    unsigned index(toUInt32(exec, exec->argument(0), NormalConversion));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());

    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.item(index)));
    return JSValue::encode(result);
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例11: jsDOMPluginArrayPrototypeFunctionNamedItem

EncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionNamedItem(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    JSDOMPluginArray* castedThis = jsDynamicCast<JSDOMPluginArray*>(thisValue);
    if (!castedThis)
        return throwVMTypeError(exec);
    ASSERT_GC_OBJECT_INHERITS(castedThis, JSDOMPluginArray::info());
    DOMPluginArray& impl = castedThis->impl();
    const String& name(exec->argument(0).isEmpty() ? String() : exec->argument(0).toString(exec)->value(exec));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());

    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(impl.namedItem(name)));
    return JSValue::encode(result);
}
开发者ID:,项目名称:,代码行数:15,代码来源:

示例12: jsDOMPluginArrayPrototypeFunctionNamedItem

EncodedJSValue JSC_HOST_CALL jsDOMPluginArrayPrototypeFunctionNamedItem(ExecState* exec)
{
    JSValue thisValue = exec->hostThisValue();
    if (!thisValue.inherits(&JSDOMPluginArray::s_info))
        return throwVMTypeError(exec);
    JSDOMPluginArray* castedThis = static_cast<JSDOMPluginArray*>(asObject(thisValue));
    ASSERT_GC_OBJECT_INHERITS(castedThis, &JSDOMPluginArray::s_info);
    DOMPluginArray* imp = static_cast<DOMPluginArray*>(castedThis->impl());
    const String& name(ustringToString(exec->argument(0).toString(exec)));
    if (exec->hadException())
        return JSValue::encode(jsUndefined());


    JSC::JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->namedItem(name)));
    return JSValue::encode(result);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:16,代码来源:JSDOMPluginArray.cpp

示例13: indexGetter

JSValue JSDOMPluginArray::indexGetter(ExecState* exec, JSValue slotBase, unsigned index)
{
    JSDOMPluginArray* thisObj = static_cast<JSDOMPluginArray*>(asObject(slotBase));
    ASSERT_GC_OBJECT_INHERITS(thisObj, &s_info);
    return toJS(exec, thisObj->globalObject(), static_cast<DOMPluginArray*>(thisObj->impl())->item(index));
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:6,代码来源:JSDOMPluginArray.cpp

示例14: nameGetter

JSValue JSDOMPluginArray::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
    JSDOMPluginArray* thisObj = static_cast<JSDOMPluginArray*>(asObject(slotBase));
    return toJS(exec, thisObj->globalObject(), thisObj->impl()->namedItem(identifierToAtomicString(propertyName)));
}
开发者ID:13W,项目名称:phantomjs,代码行数:5,代码来源:JSDOMPluginArrayCustom.cpp

示例15: nameGetter

JSValue JSDOMPluginArray::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
{
    JSDOMPluginArray* thisObj = jsCast<JSDOMPluginArray*>(asObject(slotBase));
    return toJS(exec, thisObj->globalObject(), thisObj->impl()->namedItem(propertyNameToAtomicString(propertyName)));
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:5,代码来源:JSDOMPluginArrayCustom.cpp


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