Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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);
}