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


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

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


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

示例1: nameGetter

JSValue JSStorage::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
    JSStorage* thisObj = jsCast<JSStorage*>(asObject(slotBase));
        
    JSValue prototype = asObject(slotBase)->prototype();
    if (prototype.isObject() && asObject(prototype)->hasProperty(exec, propertyName))
        return asObject(prototype)->get(exec, propertyName);
 
    return jsStringOrNull(exec, thisObj->impl()->getItem(identifierToString(propertyName)));
}
开发者ID:Moondee,项目名称:Artemis,代码行数:10,代码来源:JSStorageCustom.cpp

示例2: jsStoragePrototypeFunctionClear

JSValue JSC_HOST_CALL jsStoragePrototypeFunctionClear(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSStorage::s_info))
        return throwError(exec, TypeError);
    JSStorage* castedThisObj = static_cast<JSStorage*>(asObject(thisValue));
    Storage* imp = static_cast<Storage*>(castedThisObj->impl());

    imp->clear();
    return jsUndefined();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:11,代码来源:JSStorage.cpp

示例3: jsStoragePrototypeFunctionRemoveItem

JSValue JSC_HOST_CALL jsStoragePrototypeFunctionRemoveItem(ExecState* exec, JSObject*, JSValue thisValue, const ArgList& args)
{
    UNUSED_PARAM(args);
    if (!thisValue.inherits(&JSStorage::s_info))
        return throwError(exec, TypeError);
    JSStorage* castedThisObj = static_cast<JSStorage*>(asObject(thisValue));
    Storage* imp = static_cast<Storage*>(castedThisObj->impl());
    const UString& key = args.at(0).toString(exec);

    imp->removeItem(key);
    return jsUndefined();
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:12,代码来源:JSStorage.cpp

示例4: nameGetter

JSValue JSStorage::nameGetter(ExecState* exec, JSValue slotBase, PropertyName propertyName)
{
    JSStorage* thisObj = jsCast<JSStorage*>(asObject(slotBase));
        
    JSValue prototype = asObject(slotBase)->prototype();
    if (prototype.isObject() && asObject(prototype)->hasProperty(exec, propertyName))
        return asObject(prototype)->get(exec, propertyName);
 
    ExceptionCode ec = 0;
    JSValue result = jsStringOrNull(exec, thisObj->impl()->getItem(propertyNameToString(propertyName), ec));
    setDOMException(exec, ec);
    return result;
}
开发者ID:SchleunigerAG,项目名称:WinEC7_Qt5.3.1_Fixes,代码行数:13,代码来源:JSStorageCustom.cpp

示例5: nameGetter

EncodedJSValue JSStorage::nameGetter(ExecState* exec, JSObject* slotBase, EncodedJSValue, PropertyName propertyName)
{
    JSStorage* thisObject = jsCast<JSStorage*>(slotBase);
    JSValue prototype = thisObject->prototype();
    PropertySlot slot(thisObject);
    if (prototype.isObject() && asObject(prototype)->getPropertySlot(exec, propertyName, slot))
        return JSValue::encode(slot.getValue(exec, propertyName));

    ExceptionCode ec = 0;
    JSValue result = jsStringOrNull(exec, thisObject->impl().getItem(propertyNameToString(propertyName), ec));
    setDOMException(exec, ec);
    return JSValue::encode(result);
}
开发者ID:PTaylour,项目名称:webkit,代码行数:13,代码来源:JSStorageCustom.cpp

示例6: nameGetter

JSValue JSStorage::nameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName)
{
    JSStorage* thisObj = static_cast<JSStorage*>(asObject(slotBase));
    return jsStringOrNull(exec, thisObj->impl()->getItem(identifierToString(propertyName)));
}
开发者ID:CannedFish,项目名称:deepin-webkit,代码行数:5,代码来源:JSStorageCustom.cpp

示例7: nameGetter

JSValue* JSStorage::nameGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
{
    JSStorage* thisObj = static_cast<JSStorage*>(slot.slotBase());
    return jsStringOrNull(exec, thisObj->impl()->getItem(propertyName));
}
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:5,代码来源:JSStorageCustom.cpp


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