Revert r85550 and r85575.
Rubber-stamped by Adam Roben.
Variables cannot be exported via the .def file. Instead, they should be annotated with
JS_EXPORTDATA.
* JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
* runtime/Structure.cpp:
(JSC::Structure::materializePropertyMap):
* runtime/Structure.h:
(JSC::Structure::typeInfo):
(JSC::Structure::previousID):
(JSC::Structure::propertyStorageCapacity):
(JSC::Structure::propertyStorageSize):
(JSC::Structure::get):
(JSC::Structure::materializePropertyMapIfNecessary):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@85605 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/runtime/Structure.h b/Source/JavaScriptCore/runtime/Structure.h
index 7556da9..f4e31a3 100644
--- a/Source/JavaScriptCore/runtime/Structure.h
+++ b/Source/JavaScriptCore/runtime/Structure.h
@@ -98,18 +98,18 @@
bool isDictionary() const { return m_dictionaryKind != NoneDictionaryKind; }
bool isUncacheableDictionary() const { return m_dictionaryKind == UncachedDictionaryKind; }
- const TypeInfo& typeInfo() const { return m_typeInfo; }
+ const TypeInfo& typeInfo() const { ASSERT(structure()->classInfo() == &s_info); return m_typeInfo; }
JSValue storedPrototype() const { return m_prototype.get(); }
JSValue prototypeForLookup(ExecState*) const;
StructureChain* prototypeChain(ExecState*) const;
void visitChildren(SlotVisitor&);
- Structure* previousID() const { return m_previous.get(); }
+ Structure* previousID() const { ASSERT(structure()->classInfo() == &s_info); return m_previous.get(); }
void growPropertyStorageCapacity();
- unsigned propertyStorageCapacity() const { return m_propertyStorageCapacity; }
- unsigned propertyStorageSize() const { return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); }
+ unsigned propertyStorageCapacity() const { ASSERT(structure()->classInfo() == &s_info); return m_propertyStorageCapacity; }
+ unsigned propertyStorageSize() const { ASSERT(structure()->classInfo() == &s_info); return m_anonymousSlotCount + (m_propertyTable ? m_propertyTable->propertyStorageSize() : static_cast<unsigned>(m_offset + 1)); }
bool isUsingInlineStorage() const;
size_t get(JSGlobalData&, const Identifier& propertyName);
@@ -117,6 +117,7 @@
size_t get(JSGlobalData& globalData, const Identifier& propertyName, unsigned& attributes, JSCell*& specificValue)
{
ASSERT(!propertyName.isNull());
+ ASSERT(structure()->classInfo() == &s_info);
return get(globalData, propertyName.impl(), attributes, specificValue);
}
@@ -171,7 +172,7 @@
return new (&globalData) Structure(globalData, structure);
}
- static const ClassInfo s_info;
+ static JS_EXPORTDATA const ClassInfo s_info;
typedef enum {
NoneDictionaryKind = 0,
@@ -193,6 +194,7 @@
void materializePropertyMap(JSGlobalData&);
void materializePropertyMapIfNecessary(JSGlobalData& globalData)
{
+ ASSERT(structure()->classInfo() == &s_info);
if (!m_propertyTable && m_previous)
materializePropertyMap(globalData);
}
@@ -254,6 +256,7 @@
inline size_t Structure::get(JSGlobalData& globalData, const Identifier& propertyName)
{
+ ASSERT(structure()->classInfo() == &s_info);
materializePropertyMapIfNecessary(globalData);
if (!m_propertyTable)
return notFound;