本文整理汇总了C++中putDirect函数的典型用法代码示例。如果您正苦于以下问题:C++ putDirect函数的具体用法?C++ putDirect怎么用?C++ putDirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了putDirect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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);
}
示例4: JSCSSCharsetRuleConstructor
JSCSSCharsetRuleConstructor(ExecState* exec)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(exec->propertyNames().prototype, JSCSSCharsetRulePrototype::self(exec), None);
}
示例5: JSXMLHttpRequestProgressEventConstructor
JSXMLHttpRequestProgressEventConstructor(ExecState* exec)
: DOMObject(exec->lexicalGlobalObject()->objectPrototype())
{
putDirect(exec->propertyNames().prototype, JSXMLHttpRequestProgressEventPrototype::self(exec), None);
}
示例6: JSHTMLTableColElementConstructor
JSHTMLTableColElementConstructor(ExecState* exec)
{
setPrototype(exec->lexicalInterpreter()->builtinObjectPrototype());
putDirect(exec->propertyNames().prototype, JSHTMLTableColElementPrototype::self(exec), None);
}
示例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;
}
示例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);
}
示例9: JSCharacterDataConstructor
JSCharacterDataConstructor(ExecState* exec)
: DOMObject(exec->lexicalGlobalObject()->objectPrototype())
{
putDirect(exec->propertyNames().prototype, JSCharacterDataPrototype::self(exec), None);
}
示例10: JSCSSVariablesRuleConstructor
JSCSSVariablesRuleConstructor(ExecState* exec)
: DOMObject(exec->lexicalGlobalObject()->objectPrototype())
{
putDirect(exec->propertyNames().prototype, JSCSSVariablesRulePrototype::self(exec), None);
}
示例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);
}
示例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);
}
示例13: putDirect
template<> void JSImageConstructor::initializeProperties(VM& vm, JSDOMGlobalObject& globalObject)
{
putDirect(vm, vm.propertyNames->prototype, JSHTMLImageElement::prototype(vm, &globalObject), None);
}
示例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));
}
示例15: JSProcessingInstructionConstructor
JSProcessingInstructionConstructor(ExecState* exec)
: DOMObject(exec->lexicalGlobalObject()->objectPrototype())
{
putDirect(exec->propertyNames().prototype, JSProcessingInstructionPrototype::self(exec), None);
}