summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2016-05-24 08:28:08 +0000
commita4e969f4965059196ca948db781e52f7cfebf19e (patch)
tree6ca352808c8fdc52006a0f33f6ae3c593b23867d /Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
parent41386e9cb918eed93b3f13648cbef387e371e451 (diff)
downloadWebKitGtk-tarball-a4e969f4965059196ca948db781e52f7cfebf19e.tar.gz
webkitgtk-2.12.3webkitgtk-2.12.3
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp')
-rw-r--r--Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp b/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
index 2ac2524c5..1e78b7d04 100644
--- a/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
+++ b/Source/JavaScriptCore/runtime/JSSymbolTableObject.cpp
@@ -10,7 +10,7 @@
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
@@ -29,10 +29,9 @@
#include "config.h"
#include "JSSymbolTableObject.h"
-#include "JSActivation.h"
#include "JSGlobalObject.h"
-#include "JSNameScope.h"
-#include "Operations.h"
+#include "JSLexicalEnvironment.h"
+#include "JSCInlines.h"
#include "PropertyNameArray.h"
namespace JSC {
@@ -41,9 +40,6 @@ void JSSymbolTableObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
JSSymbolTableObject* thisObject = jsCast<JSSymbolTableObject*>(cell);
ASSERT_GC_OBJECT_INHERITS(thisObject, info());
- COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
- ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
-
Base::visitChildren(thisObject, visitor);
visitor.append(&thisObject->m_symbolTable);
}
@@ -51,7 +47,7 @@ void JSSymbolTableObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
bool JSSymbolTableObject::deleteProperty(JSCell* cell, ExecState* exec, PropertyName propertyName)
{
JSSymbolTableObject* thisObject = jsCast<JSSymbolTableObject*>(cell);
- if (thisObject->symbolTable()->contains(propertyName.publicName()))
+ if (thisObject->symbolTable()->contains(propertyName.uid()))
return false;
return JSObject::deleteProperty(thisObject, exec, propertyName);
@@ -64,8 +60,11 @@ void JSSymbolTableObject::getOwnNonIndexPropertyNames(JSObject* object, ExecStat
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))
- propertyNames.add(Identifier(exec, it->key.get()));
+ if (!(it->value.getAttributes() & DontEnum) || mode.includeDontEnumProperties()) {
+ if (it->key->isSymbol() && !propertyNames.includeSymbolProperties())
+ continue;
+ propertyNames.add(Identifier::fromUid(exec, it->key.get()));
+ }
}
}