• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ putDirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: DOMConstructorWithDocument

JSAudioConstructor::JSAudioConstructor(ExecState* exec, JSDOMGlobalObject* globalObject)
    : DOMConstructorWithDocument(JSAudioConstructor::createStructure(globalObject->objectPrototype()), globalObject)
{
    putDirect(exec->propertyNames().prototype, JSHTMLAudioElementPrototype::self(exec, globalObject), None);
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontDelete | DontEnum);
}
开发者ID:Treeeater,项目名称:Chromium_on_windows,代码行数:6,代码来源:JSAudioConstructor.cpp


示例2: DOMConstructorObject

JSSVGPathSegClosePathConstructor::JSSVGPathSegClosePathConstructor(ExecState* exec, Structure* structure, JSDOMGlobalObject* globalObject)
    : DOMConstructorObject(structure, globalObject)
{
    ASSERT(inherits(&s_info));
    putDirect(exec->globalData(), exec->propertyNames().prototype, JSSVGPathSegClosePathPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
开发者ID:13W,项目名称:phantomjs,代码行数:6,代码来源:JSSVGPathSegClosePath.cpp


示例3: ASSERT

void JSMessagePortConstructor::finishCreation(ExecState* exec, JSDOMGlobalObject* globalObject)
{
    Base::finishCreation(exec->globalData());
    ASSERT(inherits(&s_info));
    putDirect(exec->globalData(), exec->propertyNames().prototype, JSMessagePortPrototype::self(exec, globalObject), DontDelete | ReadOnly);
}
开发者ID:Xertz,项目名称:EAWebKit,代码行数:6,代码来源:JSMessagePort.cpp


示例4: JSCSSCharsetRuleConstructor

 JSCSSCharsetRuleConstructor(ExecState* exec)
 {
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
     putDirect(exec->propertyNames().prototype, JSCSSCharsetRulePrototype::self(exec), None);
 }
开发者ID:pk-codebox-evo,项目名称:remixos-usb-tool,代码行数:5,代码来源:JSCSSCharsetRule.cpp


示例5: JSXMLHttpRequestProgressEventConstructor

 JSXMLHttpRequestProgressEventConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSXMLHttpRequestProgressEvent.cpp


示例6: JSHTMLTableColElementConstructor

 JSHTMLTableColElementConstructor(ExecState* exec)
 {
     setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
     putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec), None);
 }
开发者ID:Crawping,项目名称:davinci,代码行数:5,代码来源:JSHTMLTableColElement.cpp


示例7: putDescriptor


//.........这里部分代码省略.........

    if (current.equalTo(descriptor))
        return true;

    // Filter out invalid changes
    if (!current.configurable()) {
        if (descriptor.configurable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to configurable attribute of unconfigurable property.");
            return false;
        }
        if (descriptor.enumerablePresent() && descriptor.enumerable() != current.enumerable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change enumerable attribute of unconfigurable property.");
            return false;
        }
    }

    // A generic descriptor is simply changing the attributes of an existing property
    if (descriptor.isGenericDescriptor()) {
        if (!current.attributesEqual(descriptor)) {
            deleteProperty(exec, propertyName);
            putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value());
        }
        return true;
    }

    // Changing between a normal property or an accessor property
    if (descriptor.isDataDescriptor() != current.isDataDescriptor()) {
        if (!current.configurable()) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change access mechanism for an unconfigurable property.");
            return false;
        }
        deleteProperty(exec, propertyName);
        return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value() ? current.value() : jsUndefined());
    }

    // Changing the value and attributes of an existing property
    if (descriptor.isDataDescriptor()) {
        if (!current.configurable()) {
            if (!current.writable() && descriptor.writable()) {
                if (throwException)
                    throwError(exec, TypeError, "Attempting to change writable attribute of unconfigurable property.");
                return false;
            }
            if (!current.writable()) {
                if (descriptor.value() || !TiValue::strictEqual(current.value(), descriptor.value())) {
                    if (throwException)
                        throwError(exec, TypeError, "Attempting to change value of a readonly property.");
                    return false;
                }
            }
        } else if (current.attributesEqual(descriptor)) {
            if (!descriptor.value())
                return true;
            PutPropertySlot slot;
            put(exec, propertyName, descriptor.value(), slot);
            if (exec->hadException())
                return false;
            return true;
        }
        deleteProperty(exec, propertyName);
        return putDescriptor(exec, this, propertyName, descriptor, current.attributesWithOverride(descriptor), current.value());
    }

    // Changing the accessor functions of an existing accessor property
    ASSERT(descriptor.isAccessorDescriptor());
    if (!current.configurable()) {
        if (descriptor.setterPresent() && !(current.setter() && TiValue::strictEqual(current.setter(), descriptor.setter()))) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change the setter of an unconfigurable property.");
            return false;
        }
        if (descriptor.getterPresent() && !(current.getter() && TiValue::strictEqual(current.getter(), descriptor.getter()))) {
            if (throwException)
                throwError(exec, TypeError, "Attempting to change the getter of an unconfigurable property.");
            return false;
        }
    }
    TiValue accessor = getDirect(propertyName);
    if (!accessor)
        return false;
    GetterSetter* getterSetter = asGetterSetter(accessor);
    if (current.attributesEqual(descriptor)) {
        if (descriptor.setter())
            getterSetter->setSetter(asObject(descriptor.setter()));
        if (descriptor.getter())
            getterSetter->setGetter(asObject(descriptor.getter()));
        return true;
    }
    deleteProperty(exec, propertyName);
    unsigned attrs = current.attributesWithOverride(descriptor);
    if (descriptor.setter())
        attrs |= Setter;
    if (descriptor.getter())
        attrs |= Getter;
    putDirect(propertyName, getterSetter, attrs);
    return true;
}
开发者ID:rseagraves,项目名称:tijscore,代码行数:101,代码来源:TiObject.cpp


示例8: DOMObject

JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor(ExecState* exec)
    : DOMObject(JSWebKitCSSMatrixConstructor::createStructure(exec->lexicalGlobalObject()->objectPrototype()))
{
    putDirect(exec->propertyNames().prototype, JSWebKitCSSMatrixPrototype::self(exec, exec->lexicalGlobalObject()), None);
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum);
}
开发者ID:jackiekaon,项目名称:owb-mirror,代码行数:6,代码来源:JSWebKitCSSMatrixConstructor.cpp


示例9: JSCharacterDataConstructor

 JSCharacterDataConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSCharacterDataPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSCharacterData.cpp


示例10: JSCSSVariablesRuleConstructor

 JSCSSVariablesRuleConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSCSSVariablesRulePrototype::self(exec), None);
 }
开发者ID:Chingliu,项目名称:EAWebkit,代码行数:5,代码来源:JSCSSVariablesRule.cpp


示例11: DOMObject

JSAudioConstructor::JSAudioConstructor(ExecState* exec, Document* document)
    : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
    , m_document(document)
{
    putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly|DontDelete|DontEnum);
}
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:6,代码来源:JSAudioConstructor.cpp


示例12: JSObject

InternalFunction::InternalFunction(JSGlobalData* globalData, NonNullPassRefPtr<Structure> structure, const Identifier& name)
    : JSObject(structure)
{
    putDirect(globalData->propertyNames->name, jsString(globalData, name.ustring()), DontDelete | ReadOnly | DontEnum);
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:5,代码来源:InternalFunction.cpp


示例13: putDirect

template<> void JSImageConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
    putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::prototype(vm, &globalObject), None);
}
开发者ID:Comcast,项目名称:WebKitForWayland,代码行数:4,代码来源:JSImageConstructor.cpp


示例14: putDirect

void JSDollarVMPrototype::addFunction(VM& vm, JSGlobalObject* globalObject, const char* name, NativeFunction function, unsigned arguments)
{
    Identifier identifier = Identifier::fromString(&vm, name);
    putDirect(vm, identifier, JSFunction::create(vm, globalObject, arguments, identifier.string(), function));
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:5,代码来源:JSDollarVMPrototype.cpp


示例15: JSProcessingInstructionConstructor

 JSProcessingInstructionConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSProcessingInstructionPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSProcessingInstruction.cpp


示例16: putDirect

void InspectorInstrumentationObject::disable(VM& vm)
{
    putDirect(vm, vm.propertyNames->isEnabled, jsBoolean(false));
}
开发者ID:nickooms,项目名称:webkit,代码行数:4,代码来源:InspectorInstrumentationObject.cpp


示例17: ASSERT

// ECMA 8.6.2.2
void JSObject::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
{
    ASSERT(value);
    ASSERT(!Heap::heap(value) || Heap::heap(value) == Heap::heap(this));

    if (propertyName == exec->propertyNames().underscoreProto) {
        // Setting __proto__ to a non-object, non-null value is silently ignored to match Mozilla.
        if (!value->isObject() && !value->isNull())
            return;

        JSValuePtr nextPrototypeValue = value;
        while (nextPrototypeValue && nextPrototypeValue->isObject()) {
            JSObject* nextPrototype = asObject(nextPrototypeValue)->unwrappedObject();
            if (nextPrototype == this) {
                throwError(exec, GeneralError, "cyclic __proto__ value");
                return;
            }
            nextPrototypeValue = nextPrototype->prototype();
        }

        setPrototype(value);
        return;
    }

    // Check if there are any setters or getters in the prototype chain
    JSValuePtr prototype;
    for (JSObject* obj = this; !obj->structure()->hasGetterSetterProperties(); obj = asObject(prototype)) {
        prototype = obj->prototype();
        if (prototype->isNull()) {
            putDirect(propertyName, value, 0, true, slot);
            return;
        }
    }
    
    unsigned attributes;
    if ((m_structure->get(propertyName, attributes) != WTF::notFound) && attributes & ReadOnly)
        return;

    for (JSObject* obj = this; ; obj = asObject(prototype)) {
        if (JSValuePtr gs = obj->getDirect(propertyName)) {
            if (gs->isGetterSetter()) {
                JSObject* setterFunc = asGetterSetter(gs)->setter();        
                if (!setterFunc) {
                    throwSetterError(exec);
                    return;
                }
                
                CallData callData;
                CallType callType = setterFunc->getCallData(callData);
                ArgList args;
                args.append(value);
                call(exec, setterFunc, callType, callData, this, args);
                return;
            }

            // If there's an existing property on the object or one of its 
            // prototypes it should be replaced, so break here.
            break;
        }

        prototype = obj->prototype();
        if (prototype->isNull())
            break;
    }

    putDirect(propertyName, value, 0, true, slot);
    return;
}
开发者ID:Fale,项目名称:qtmoko,代码行数:69,代码来源:JSObject.cpp


示例18: JSHTMLFrameSetElementConstructor

 JSHTMLFrameSetElementConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSHTMLFrameSetElementPrototype::self(exec), None);
 }
开发者ID:Gin-Rye,项目名称:duibrowser,代码行数:5,代码来源:JSHTMLFrameSetElement.cpp


示例19: putDirect

void JSObject::putWithAttributes(ExecState*, const Identifier& propertyName, JSValuePtr value, unsigned attributes)
{
    putDirect(propertyName, value, attributes);
}
开发者ID:Fale,项目名称:qtmoko,代码行数:4,代码来源:JSObject.cpp


示例20: JSXPathEvaluatorConstructor

 JSXPathEvaluatorConstructor(ExecState* exec)
     : DOMObject(exec->lexicalGlobalObject()->objectPrototype())
 {
     putDirect(exec->propertyNames().prototype, JSXPathEvaluatorPrototype::self(exec), None);
 }
开发者ID:lentinic,项目名称:EAWebKit,代码行数:5,代码来源:JSXPathEvaluator.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ putDirectWithoutTransition函数代码示例发布时间:2022-05-30
下一篇:
C++ putDebugChar函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap