本文整理汇总了C++中EnumerationMode::includeDontEnumProperties方法的典型用法代码示例。如果您正苦于以下问题:C++ EnumerationMode::includeDontEnumProperties方法的具体用法?C++ EnumerationMode::includeDontEnumProperties怎么用?C++ EnumerationMode::includeDontEnumProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EnumerationMode
的用法示例。
在下文中一共展示了EnumerationMode::includeDontEnumProperties方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getOwnNonIndexPropertyNames
void JSArray::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSArray* thisObject = jsCast<JSArray*>(object);
if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().length);
JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
示例2: getOwnPropertyNames
void JSTestOverrideBuiltins::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
{
auto* thisObject = jsCast<JSTestOverrideBuiltins*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
if (mode.includeDontEnumProperties()) {
for (auto& propertyName : thisObject->impl().supportedPropertyNames())
propertyNames.add(Identifier::fromString(state, propertyName));
}
Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
}
示例3: getOwnPropertyNames
void JSDOMWindow::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSDOMWindow* thisObject = jsCast<JSDOMWindow*>(object);
if (!BindingSecurity::shouldAllowAccessToDOMWindow(exec, thisObject->wrapped(), DoNotReportSecurityError)) {
if (mode.includeDontEnumProperties())
addCrossOriginWindowPropertyNames(*exec, propertyNames);
return;
}
Base::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例4: getOwnNonIndexPropertyNames
void JSArrayBuffer::getOwnNonIndexPropertyNames(
JSObject* object, ExecState* exec, PropertyNameArray& array, EnumerationMode mode)
{
JSArrayBuffer* thisObject = jsCast<JSArrayBuffer*>(object);
if (mode.includeDontEnumProperties())
array.add(exec->propertyNames().byteLength);
Base::getOwnNonIndexPropertyNames(thisObject, exec, array, mode);
}
示例5: getOwnPropertyNames
void RuntimeArray::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
RuntimeArray* thisObject = jsCast<RuntimeArray*>(object);
unsigned length = thisObject->getLength();
for (unsigned i = 0; i < length; ++i)
propertyNames.add(Identifier::from(exec, i));
if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().length);
JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例6: getOwnPropertyNames
void JSTestEventTarget::getOwnPropertyNames(JSObject* object, ExecState* state, PropertyNameArray& propertyNames, EnumerationMode mode)
{
auto* thisObject = jsCast<JSTestEventTarget*>(object);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
for (unsigned i = 0, count = thisObject->wrapped().length(); i < count; ++i)
propertyNames.add(Identifier::from(state, i));
if (mode.includeDontEnumProperties()) {
for (auto& propertyName : thisObject->wrapped().supportedPropertyNames())
propertyNames.add(Identifier::fromString(state, propertyName));
}
Base::getOwnPropertyNames(thisObject, state, propertyNames, mode);
}
示例7: getOwnPropertyNames
void StringObject::getOwnPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
StringObject* thisObject = jsCast<StringObject*>(object);
if (propertyNames.includeStringProperties()) {
int size = thisObject->internalValue()->length();
for (int i = 0; i < size; ++i)
propertyNames.add(Identifier::from(exec, i));
}
if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().length);
return JSObject::getOwnPropertyNames(thisObject, exec, propertyNames, mode);
}
示例8: getOwnNonIndexPropertyNames
void JSArrayBufferView::getOwnNonIndexPropertyNames(
JSObject* object, ExecState* exec, PropertyNameArray& array, EnumerationMode mode)
{
JSArrayBufferView* thisObject = jsCast<JSArrayBufferView*>(object);
// length/byteOffset/byteLength are DontEnum, at least in Firefox.
if (mode.includeDontEnumProperties()) {
array.add(exec->propertyNames().byteOffset);
array.add(exec->propertyNames().byteLength);
array.add(exec->propertyNames().buffer);
}
Base::getOwnNonIndexPropertyNames(thisObject, exec, array, mode);
}
示例9: getOwnNonIndexPropertyNames
void JSFunction::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSFunction* thisObject = jsCast<JSFunction*>(object);
if (!thisObject->isHostOrBuiltinFunction() && mode.includeDontEnumProperties()) {
VM& vm = exec->vm();
// Make sure prototype has been reified.
PropertySlot slot(thisObject);
thisObject->methodTable(vm)->getOwnPropertySlot(thisObject, exec, vm.propertyNames->prototype, slot);
propertyNames.add(vm.propertyNames->arguments);
propertyNames.add(vm.propertyNames->caller);
propertyNames.add(vm.propertyNames->length);
propertyNames.add(vm.propertyNames->name);
}
Base::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
示例10: getOwnNonIndexPropertyNames
void JSSymbolTableObject::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSSymbolTableObject* thisObject = jsCast<JSSymbolTableObject*>(object);
{
ConcurrentJITLocker locker(thisObject->symbolTable()->m_lock);
SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker);
for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) {
if (!(it->value.getAttributes() & DontEnum) || mode.includeDontEnumProperties()) {
if (it->key->isSymbol() && !mode.includeSymbolProperties())
continue;
propertyNames.add(Identifier::fromUid(exec, it->key.get()));
}
}
}
JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
示例11: getOwnNonIndexPropertyNames
void JSLexicalEnvironment::getOwnNonIndexPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
JSLexicalEnvironment* thisObject = jsCast<JSLexicalEnvironment*>(object);
{
ConcurrentJITLocker locker(thisObject->symbolTable()->m_lock);
SymbolTable::Map::iterator end = thisObject->symbolTable()->end(locker);
for (SymbolTable::Map::iterator it = thisObject->symbolTable()->begin(locker); it != end; ++it) {
if (it->value.getAttributes() & DontEnum && !mode.includeDontEnumProperties())
continue;
if (!thisObject->isValid(it->value.scopeOffset()))
continue;
if (it->key->isSymbol() && !mode.includeSymbolProperties())
continue;
propertyNames.add(Identifier::fromUid(exec, it->key.get()));
}
}
// Skip the JSEnvironmentRecord implementation of getOwnNonIndexPropertyNames
JSObject::getOwnNonIndexPropertyNames(thisObject, exec, propertyNames, mode);
}
示例12: getGenericPropertyNames
void RegExpObject::getGenericPropertyNames(JSObject* object, ExecState* exec, PropertyNameArray& propertyNames, EnumerationMode mode)
{
if (mode.includeDontEnumProperties())
propertyNames.add(exec->propertyNames().lastIndex);
Base::getGenericPropertyNames(object, exec, propertyNames, mode);
}