Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (155218 => 155219)
--- trunk/Source/_javascript_Core/ChangeLog 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-09-06 22:32:08 UTC (rev 155219)
@@ -1,3 +1,47 @@
+2013-09-06 Anders Carlsson <[email protected]>
+
+ Stop using fastNew/fastDelete in _javascript_Core
+ https://bugs.webkit.org/show_bug.cgi?id=120898
+
+ Reviewed by Oliver Hunt.
+
+ Change all the hash table members in ExecState to be OwnPtrs and use
+ adoptPtr instead. Also, since none of the hash tables can be null, change their getters
+ to return references and propagate the reference types wherever we know that a HashTable can't be null.
+
+ * interpreter/CallFrame.h:
+ (JSC::ExecState::arrayConstructorTable):
+ (JSC::ExecState::arrayPrototypeTable):
+ (JSC::ExecState::booleanPrototypeTable):
+ (JSC::ExecState::dataViewTable):
+ (JSC::ExecState::dateTable):
+ (JSC::ExecState::dateConstructorTable):
+ (JSC::ExecState::errorPrototypeTable):
+ (JSC::ExecState::globalObjectTable):
+ (JSC::ExecState::jsonTable):
+ (JSC::ExecState::numberConstructorTable):
+ (JSC::ExecState::numberPrototypeTable):
+ (JSC::ExecState::objectConstructorTable):
+ (JSC::ExecState::privateNamePrototypeTable):
+ (JSC::ExecState::regExpTable):
+ (JSC::ExecState::regExpConstructorTable):
+ (JSC::ExecState::regExpPrototypeTable):
+ (JSC::ExecState::stringConstructorTable):
+ (JSC::ExecState::promisePrototypeTable):
+ (JSC::ExecState::promiseConstructorTable):
+ (JSC::ExecState::promiseResolverPrototypeTable):
+ * runtime/ClassInfo.h:
+ (JSC::ClassInfo::propHashTable):
+ * runtime/Lookup.h:
+ (JSC::getStaticPropertySlot):
+ (JSC::getStaticFunctionSlot):
+ (JSC::getStaticValueSlot):
+ (JSC::lookupPut):
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ (JSC::VM::~VM):
+ * runtime/VM.h:
+
2013-09-06 Filip Pizlo <[email protected]>
Concurrent FTL causes !hasOptimizedReplacement() asserts in cti_optimize
Modified: trunk/Source/_javascript_Core/interpreter/CallFrame.h (155218 => 155219)
--- trunk/Source/_javascript_Core/interpreter/CallFrame.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/interpreter/CallFrame.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -84,27 +84,27 @@
#ifndef NDEBUG
void dumpCaller();
#endif
- static const HashTable* arrayConstructorTable(CallFrame* callFrame) { return callFrame->vm().arrayConstructorTable; }
- static const HashTable* arrayPrototypeTable(CallFrame* callFrame) { return callFrame->vm().arrayPrototypeTable; }
- static const HashTable* booleanPrototypeTable(CallFrame* callFrame) { return callFrame->vm().booleanPrototypeTable; }
- static const HashTable* dataViewTable(CallFrame* callFrame) { return callFrame->vm().dataViewTable; }
- static const HashTable* dateTable(CallFrame* callFrame) { return callFrame->vm().dateTable; }
- static const HashTable* dateConstructorTable(CallFrame* callFrame) { return callFrame->vm().dateConstructorTable; }
- static const HashTable* errorPrototypeTable(CallFrame* callFrame) { return callFrame->vm().errorPrototypeTable; }
- static const HashTable* globalObjectTable(CallFrame* callFrame) { return callFrame->vm().globalObjectTable; }
- static const HashTable* jsonTable(CallFrame* callFrame) { return callFrame->vm().jsonTable; }
- static const HashTable* numberConstructorTable(CallFrame* callFrame) { return callFrame->vm().numberConstructorTable; }
- static const HashTable* numberPrototypeTable(CallFrame* callFrame) { return callFrame->vm().numberPrototypeTable; }
- static const HashTable* objectConstructorTable(CallFrame* callFrame) { return callFrame->vm().objectConstructorTable; }
- static const HashTable* privateNamePrototypeTable(CallFrame* callFrame) { return callFrame->vm().privateNamePrototypeTable; }
- static const HashTable* regExpTable(CallFrame* callFrame) { return callFrame->vm().regExpTable; }
- static const HashTable* regExpConstructorTable(CallFrame* callFrame) { return callFrame->vm().regExpConstructorTable; }
- static const HashTable* regExpPrototypeTable(CallFrame* callFrame) { return callFrame->vm().regExpPrototypeTable; }
- static const HashTable* stringConstructorTable(CallFrame* callFrame) { return callFrame->vm().stringConstructorTable; }
+ static const HashTable& arrayConstructorTable(CallFrame* callFrame) { return *callFrame->vm().arrayConstructorTable; }
+ static const HashTable& arrayPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().arrayPrototypeTable; }
+ static const HashTable& booleanPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().booleanPrototypeTable; }
+ static const HashTable& dataViewTable(CallFrame* callFrame) { return *callFrame->vm().dataViewTable; }
+ static const HashTable& dateTable(CallFrame* callFrame) { return *callFrame->vm().dateTable; }
+ static const HashTable& dateConstructorTable(CallFrame* callFrame) { return *callFrame->vm().dateConstructorTable; }
+ static const HashTable& errorPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().errorPrototypeTable; }
+ static const HashTable& globalObjectTable(CallFrame* callFrame) { return *callFrame->vm().globalObjectTable; }
+ static const HashTable& jsonTable(CallFrame* callFrame) { return *callFrame->vm().jsonTable; }
+ static const HashTable& numberConstructorTable(CallFrame* callFrame) { return *callFrame->vm().numberConstructorTable; }
+ static const HashTable& numberPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().numberPrototypeTable; }
+ static const HashTable& objectConstructorTable(CallFrame* callFrame) { return *callFrame->vm().objectConstructorTable; }
+ static const HashTable& privateNamePrototypeTable(CallFrame* callFrame) { return *callFrame->vm().privateNamePrototypeTable; }
+ static const HashTable& regExpTable(CallFrame* callFrame) { return *callFrame->vm().regExpTable; }
+ static const HashTable& regExpConstructorTable(CallFrame* callFrame) { return *callFrame->vm().regExpConstructorTable; }
+ static const HashTable& regExpPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().regExpPrototypeTable; }
+ static const HashTable& stringConstructorTable(CallFrame* callFrame) { return *callFrame->vm().stringConstructorTable; }
#if ENABLE(PROMISES)
- static const HashTable* promisePrototypeTable(CallFrame* callFrame) { return callFrame->vm().promisePrototypeTable; }
- static const HashTable* promiseConstructorTable(CallFrame* callFrame) { return callFrame->vm().promiseConstructorTable; }
- static const HashTable* promiseResolverPrototypeTable(CallFrame* callFrame) { return callFrame->vm().promiseResolverPrototypeTable; }
+ static const HashTable& promisePrototypeTable(CallFrame* callFrame) { return *callFrame->vm().promisePrototypeTable; }
+ static const HashTable& promiseConstructorTable(CallFrame* callFrame) { return *callFrame->vm().promiseConstructorTable; }
+ static const HashTable& promiseResolverPrototypeTable(CallFrame* callFrame) { return *callFrame->vm().promiseResolverPrototypeTable; }
#endif
static CallFrame* create(Register* callFrameBase) { return static_cast<CallFrame*>(callFrameBase); }
Modified: trunk/Source/_javascript_Core/runtime/ClassInfo.h (155218 => 155219)
--- trunk/Source/_javascript_Core/runtime/ClassInfo.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/runtime/ClassInfo.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -144,24 +144,21 @@
ClassName::TypedArrayStorageType
struct ClassInfo {
- /**
- * A string denoting the class name. Example: "Window".
- */
+ // A string denoting the class name. Example: "Window".
const char* className;
- /**
- * Pointer to the class information of the base class.
- * 0L if there is none.
- */
+ // Pointer to the class information of the base class.
+ // nullptrif there is none.
const ClassInfo* parentClass;
- /**
- * Static hash-table of properties.
- * For classes that can be used from multiple threads, it is accessed via a getter function that would typically return a pointer to thread-specific value.
- */
+
+ // Static hash-table of properties.
+ // For classes that can be used from multiple threads, it is accessed via a getter function
+ // that would typically return a pointer to a thread-specific value.
const HashTable* propHashTable(ExecState* exec) const
{
if (classPropHashTableGetterFunction)
- return classPropHashTableGetterFunction(exec);
+ return &classPropHashTableGetterFunction(exec);
+
return staticPropHashTable;
}
@@ -184,7 +181,7 @@
}
const HashTable* staticPropHashTable;
- typedef const HashTable* (*ClassPropHashTableGetterFunction)(ExecState*);
+ typedef const HashTable& (*ClassPropHashTableGetterFunction)(ExecState*);
const ClassPropHashTableGetterFunction classPropHashTableGetterFunction;
MethodTable methodTable;
Modified: trunk/Source/_javascript_Core/runtime/Lookup.h (155218 => 155219)
--- trunk/Source/_javascript_Core/runtime/Lookup.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/runtime/Lookup.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -241,9 +241,9 @@
* unknown property).
*/
template <class ThisImp, class ParentImp>
- inline bool getStaticPropertySlot(ExecState* exec, const HashTable* table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
+ inline bool getStaticPropertySlot(ExecState* exec, const HashTable& table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
{
- const HashEntry* entry = table->entry(exec, propertyName);
+ const HashEntry* entry = table.entry(exec, propertyName);
if (!entry) // not found, forward to parent
return ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot);
@@ -261,12 +261,12 @@
* a dummy getValueProperty.
*/
template <class ParentImp>
- inline bool getStaticFunctionSlot(ExecState* exec, const HashTable* table, JSObject* thisObj, PropertyName propertyName, PropertySlot& slot)
+ inline bool getStaticFunctionSlot(ExecState* exec, const HashTable& table, JSObject* thisObj, PropertyName propertyName, PropertySlot& slot)
{
if (ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot))
return true;
- const HashEntry* entry = table->entry(exec, propertyName);
+ const HashEntry* entry = table.entry(exec, propertyName);
if (!entry)
return false;
@@ -278,9 +278,9 @@
* Using this instead of getStaticPropertySlot removes the need for a FuncImp class.
*/
template <class ThisImp, class ParentImp>
- inline bool getStaticValueSlot(ExecState* exec, const HashTable* table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
+ inline bool getStaticValueSlot(ExecState* exec, const HashTable& table, ThisImp* thisObj, PropertyName propertyName, PropertySlot& slot)
{
- const HashEntry* entry = table->entry(exec, propertyName);
+ const HashEntry* entry = table.entry(exec, propertyName);
if (!entry) // not found, forward to parent
return ParentImp::getOwnPropertySlot(thisObj, exec, propertyName, slot);
@@ -309,9 +309,9 @@
* is found it sets the value and returns true, else it returns false.
*/
template <class ThisImp>
- inline bool lookupPut(ExecState* exec, PropertyName propertyName, JSValue value, const HashTable* table, ThisImp* thisObj, bool shouldThrow = false)
+ inline bool lookupPut(ExecState* exec, PropertyName propertyName, JSValue value, const HashTable& table, ThisImp* thisObj, bool shouldThrow = false)
{
- const HashEntry* entry = table->entry(exec, propertyName);
+ const HashEntry* entry = table.entry(exec, propertyName);
if (!entry)
return false;
@@ -327,7 +327,7 @@
* then it calls put() on the ParentImp class.
*/
template <class ThisImp, class ParentImp>
- inline void lookupPut(ExecState* exec, PropertyName propertyName, JSValue value, const HashTable* table, ThisImp* thisObj, PutPropertySlot& slot)
+ inline void lookupPut(ExecState* exec, PropertyName propertyName, JSValue value, const HashTable& table, ThisImp* thisObj, PutPropertySlot& slot)
{
if (!lookupPut<ThisImp>(exec, propertyName, value, table, thisObj, slot.isStrictMode()))
ParentImp::put(thisObj, exec, propertyName, value, slot); // not found: forward to parent
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (155218 => 155219)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2013-09-06 22:32:08 UTC (rev 155219)
@@ -155,27 +155,27 @@
, vmType(vmType)
, clientData(0)
, topCallFrame(CallFrame::noCaller()->removeHostCallFrameFlag())
- , arrayConstructorTable(fastNew<HashTable>(JSC::arrayConstructorTable))
- , arrayPrototypeTable(fastNew<HashTable>(JSC::arrayPrototypeTable))
- , booleanPrototypeTable(fastNew<HashTable>(JSC::booleanPrototypeTable))
- , dataViewTable(fastNew<HashTable>(JSC::dataViewTable))
- , dateTable(fastNew<HashTable>(JSC::dateTable))
- , dateConstructorTable(fastNew<HashTable>(JSC::dateConstructorTable))
- , errorPrototypeTable(fastNew<HashTable>(JSC::errorPrototypeTable))
- , globalObjectTable(fastNew<HashTable>(JSC::globalObjectTable))
- , jsonTable(fastNew<HashTable>(JSC::jsonTable))
- , numberConstructorTable(fastNew<HashTable>(JSC::numberConstructorTable))
- , numberPrototypeTable(fastNew<HashTable>(JSC::numberPrototypeTable))
- , objectConstructorTable(fastNew<HashTable>(JSC::objectConstructorTable))
- , privateNamePrototypeTable(fastNew<HashTable>(JSC::privateNamePrototypeTable))
- , regExpTable(fastNew<HashTable>(JSC::regExpTable))
- , regExpConstructorTable(fastNew<HashTable>(JSC::regExpConstructorTable))
- , regExpPrototypeTable(fastNew<HashTable>(JSC::regExpPrototypeTable))
- , stringConstructorTable(fastNew<HashTable>(JSC::stringConstructorTable))
+ , arrayConstructorTable(adoptPtr(new HashTable(JSC::arrayConstructorTable)))
+ , arrayPrototypeTable(adoptPtr(new HashTable(JSC::arrayPrototypeTable)))
+ , booleanPrototypeTable(adoptPtr(new HashTable(JSC::booleanPrototypeTable)))
+ , dataViewTable(adoptPtr(new HashTable(JSC::dataViewTable)))
+ , dateTable(adoptPtr(new HashTable(JSC::dateTable)))
+ , dateConstructorTable(adoptPtr(new HashTable(JSC::dateConstructorTable)))
+ , errorPrototypeTable(adoptPtr(new HashTable(JSC::errorPrototypeTable)))
+ , globalObjectTable(adoptPtr(new HashTable(JSC::globalObjectTable)))
+ , jsonTable(adoptPtr(new HashTable(JSC::jsonTable)))
+ , numberConstructorTable(adoptPtr(new HashTable(JSC::numberConstructorTable)))
+ , numberPrototypeTable(adoptPtr(new HashTable(JSC::numberPrototypeTable)))
+ , objectConstructorTable(adoptPtr(new HashTable(JSC::objectConstructorTable)))
+ , privateNamePrototypeTable(adoptPtr(new HashTable(JSC::privateNamePrototypeTable)))
+ , regExpTable(adoptPtr(new HashTable(JSC::regExpTable)))
+ , regExpConstructorTable(adoptPtr(new HashTable(JSC::regExpConstructorTable)))
+ , regExpPrototypeTable(adoptPtr(new HashTable(JSC::regExpPrototypeTable)))
+ , stringConstructorTable(adoptPtr(new HashTable(JSC::stringConstructorTable)))
#if ENABLE(PROMISES)
- , promisePrototypeTable(fastNew<HashTable>(JSC::promisePrototypeTable))
- , promiseConstructorTable(fastNew<HashTable>(JSC::promiseConstructorTable))
- , promiseResolverPrototypeTable(fastNew<HashTable>(JSC::promiseResolverPrototypeTable))
+ , promisePrototypeTable(adoptPtr(new HashTable(JSC::promisePrototypeTable)))
+ , promiseConstructorTable(adoptPtr(new HashTable(JSC::promiseConstructorTable)))
+ , promiseResolverPrototypeTable(adoptPtr(new HashTable(JSC::promiseResolverPrototypeTable)))
#endif
, identifierTable(vmType == Default ? wtfThreadData().currentIdentifierTable() : createIdentifierTable())
, propertyNames(new CommonIdentifiers(this))
@@ -332,29 +332,6 @@
promiseResolverPrototypeTable->deleteTable();
#endif
- fastDelete(const_cast<HashTable*>(arrayConstructorTable));
- fastDelete(const_cast<HashTable*>(arrayPrototypeTable));
- fastDelete(const_cast<HashTable*>(booleanPrototypeTable));
- fastDelete(const_cast<HashTable*>(dataViewTable));
- fastDelete(const_cast<HashTable*>(dateTable));
- fastDelete(const_cast<HashTable*>(dateConstructorTable));
- fastDelete(const_cast<HashTable*>(errorPrototypeTable));
- fastDelete(const_cast<HashTable*>(globalObjectTable));
- fastDelete(const_cast<HashTable*>(jsonTable));
- fastDelete(const_cast<HashTable*>(numberConstructorTable));
- fastDelete(const_cast<HashTable*>(numberPrototypeTable));
- fastDelete(const_cast<HashTable*>(objectConstructorTable));
- fastDelete(const_cast<HashTable*>(privateNamePrototypeTable));
- fastDelete(const_cast<HashTable*>(regExpTable));
- fastDelete(const_cast<HashTable*>(regExpConstructorTable));
- fastDelete(const_cast<HashTable*>(regExpPrototypeTable));
- fastDelete(const_cast<HashTable*>(stringConstructorTable));
-#if ENABLE(PROMISES)
- fastDelete(const_cast<HashTable*>(promisePrototypeTable));
- fastDelete(const_cast<HashTable*>(promiseConstructorTable));
- fastDelete(const_cast<HashTable*>(promiseResolverPrototypeTable));
-#endif
-
delete emptyList;
delete propertyNames;
Modified: trunk/Source/_javascript_Core/runtime/VM.h (155218 => 155219)
--- trunk/Source/_javascript_Core/runtime/VM.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -222,27 +222,27 @@
ExecState* topCallFrame;
Watchdog watchdog;
- const HashTable* arrayConstructorTable;
- const HashTable* arrayPrototypeTable;
- const HashTable* booleanPrototypeTable;
- const HashTable* dataViewTable;
- const HashTable* dateTable;
- const HashTable* dateConstructorTable;
- const HashTable* errorPrototypeTable;
- const HashTable* globalObjectTable;
- const HashTable* jsonTable;
- const HashTable* numberConstructorTable;
- const HashTable* numberPrototypeTable;
- const HashTable* objectConstructorTable;
- const HashTable* privateNamePrototypeTable;
- const HashTable* regExpTable;
- const HashTable* regExpConstructorTable;
- const HashTable* regExpPrototypeTable;
- const HashTable* stringConstructorTable;
+ const OwnPtr<const HashTable> arrayConstructorTable;
+ const OwnPtr<const HashTable> arrayPrototypeTable;
+ const OwnPtr<const HashTable> booleanPrototypeTable;
+ const OwnPtr<const HashTable> dataViewTable;
+ const OwnPtr<const HashTable> dateTable;
+ const OwnPtr<const HashTable> dateConstructorTable;
+ const OwnPtr<const HashTable> errorPrototypeTable;
+ const OwnPtr<const HashTable> globalObjectTable;
+ const OwnPtr<const HashTable> jsonTable;
+ const OwnPtr<const HashTable> numberConstructorTable;
+ const OwnPtr<const HashTable> numberPrototypeTable;
+ const OwnPtr<const HashTable> objectConstructorTable;
+ const OwnPtr<const HashTable> privateNamePrototypeTable;
+ const OwnPtr<const HashTable> regExpTable;
+ const OwnPtr<const HashTable> regExpConstructorTable;
+ const OwnPtr<const HashTable> regExpPrototypeTable;
+ const OwnPtr<const HashTable> stringConstructorTable;
#if ENABLE(PROMISES)
- const HashTable* promisePrototypeTable;
- const HashTable* promiseConstructorTable;
- const HashTable* promiseResolverPrototypeTable;
+ const OwnPtr<const HashTable> promisePrototypeTable;
+ const OwnPtr<const HashTable> promiseConstructorTable;
+ const OwnPtr<const HashTable> promiseResolverPrototypeTable;
#endif
Strong<Structure> structureStructure;
Modified: trunk/Source/WebCore/ChangeLog (155218 => 155219)
--- trunk/Source/WebCore/ChangeLog 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/ChangeLog 2013-09-06 22:32:08 UTC (rev 155219)
@@ -1,3 +1,32 @@
+2013-09-06 Anders Carlsson <[email protected]>
+
+ Stop using fastNew/fastDelete in _javascript_Core
+ https://bugs.webkit.org/show_bug.cgi?id=120898
+
+ Reviewed by Oliver Hunt.
+
+ Update for changes to _javascript_Core.
+
+ * bindings/js/DOMObjectHashTableMap.h:
+ (WebCore::DOMObjectHashTableMap::get):
+ * bindings/js/JSDOMBinding.cpp:
+ (WebCore::getHashTableForGlobalData):
+ * bindings/js/JSDOMBinding.h:
+ * bindings/js/JSDOMWindowCustom.cpp:
+ (WebCore::JSDOMWindow::put):
+ * bindings/js/JSPluginElementFunctions.h:
+ (WebCore::pluginElementCustomGetOwnPropertySlot):
+ * bindings/js/JSStorageCustom.cpp:
+ (WebCore::JSStorage::deleteProperty):
+ (WebCore::JSStorage::putDelegate):
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (hashTableAccessor):
+ (prototypeHashTableAccessor):
+ (constructorHashTableAccessor):
+ (GenerateGetOwnPropertySlotBody):
+ (GenerateImplementation):
+ (GenerateConstructorHelperMethods):
+
2013-09-06 Andreas Kling <[email protected]>
Include Frame.h in fewer places.
Modified: trunk/Source/WebCore/bindings/js/DOMObjectHashTableMap.h (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/DOMObjectHashTableMap.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/DOMObjectHashTableMap.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -42,12 +42,12 @@
iter->value.deleteTable();
}
- const JSC::HashTable* get(const JSC::HashTable* staticTable)
+ const JSC::HashTable& get(const JSC::HashTable& staticTable)
{
- HashMap<const JSC::HashTable*, JSC::HashTable>::iterator iter = m_map.find(staticTable);
+ HashMap<const JSC::HashTable*, JSC::HashTable>::iterator iter = m_map.find(&staticTable);
if (iter != m_map.end())
- return &iter->value;
- return &m_map.set(staticTable, staticTable->copy()).iterator->value;
+ return iter->value;
+ return m_map.set(&staticTable, staticTable.copy()).iterator->value;
}
private:
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp 2013-09-06 22:32:08 UTC (rev 155219)
@@ -48,7 +48,7 @@
STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorObject);
STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(DOMConstructorWithDocument);
-const JSC::HashTable* getHashTableForGlobalData(VM& vm, const JSC::HashTable* staticTable)
+const JSC::HashTable& getHashTableForGlobalData(VM& vm, const JSC::HashTable& staticTable)
{
return DOMObjectHashTableMap::mapFor(vm).get(staticTable);
}
Modified: trunk/Source/WebCore/bindings/js/JSDOMBinding.h (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/JSDOMBinding.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -257,7 +257,7 @@
return index >= exec->argumentCount() ? JSC::JSValue() : exec->argument(index);
}
- const JSC::HashTable* getHashTableForGlobalData(JSC::VM&, const JSC::HashTable* staticTable);
+ const JSC::HashTable& getHashTableForGlobalData(JSC::VM&, const JSC::HashTable& staticTable);
void reportException(JSC::ExecState*, JSC::JSValue exception, CachedScript* = 0);
void reportCurrentException(JSC::ExecState*);
Modified: trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp 2013-09-06 22:32:08 UTC (rev 155219)
@@ -344,7 +344,7 @@
return;
}
- if (lookupPut<JSDOMWindow>(exec, propertyName, value, s_info.propHashTable(exec), thisObject))
+ if (lookupPut<JSDOMWindow>(exec, propertyName, value, *s_info.propHashTable(exec), thisObject))
return;
if (BindingSecurity::shouldAllowAccessToDOMWindow(exec, thisObject->impl()))
Modified: trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/JSPluginElementFunctions.h 2013-09-06 22:32:08 UTC (rev 155219)
@@ -46,7 +46,7 @@
template <class Type, class Base> bool pluginElementCustomGetOwnPropertySlot(JSC::ExecState* exec, JSC::PropertyName propertyName, JSC::PropertySlot& slot, Type* element)
{
if (!element->globalObject()->world()->isNormal()) {
- if (JSC::getStaticValueSlot<Type, Base>(exec, Type::info()->staticPropHashTable, element, propertyName, slot))
+ if (JSC::getStaticValueSlot<Type, Base>(exec, *Type::info()->staticPropHashTable, element, propertyName, slot))
return true;
JSC::JSValue proto = element->prototype();
Modified: trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp (155218 => 155219)
--- trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/js/JSStorageCustom.cpp 2013-09-06 22:32:08 UTC (rev 155219)
@@ -63,7 +63,7 @@
// Since hasProperty() would end up calling canGetItemsForName() and be fooled, we need to check
// the native property slots manually.
PropertySlot slot(thisObject);
- if (getStaticValueSlot<JSStorage, Base>(exec, s_info.propHashTable(exec), thisObject, propertyName, slot))
+ if (getStaticValueSlot<JSStorage, Base>(exec, *s_info.propHashTable(exec), thisObject, propertyName, slot))
return false;
JSValue prototype = thisObject->prototype();
@@ -105,7 +105,7 @@
// Since hasProperty() would end up calling canGetItemsForName() and be fooled, we need to check
// the native property slots manually.
PropertySlot slot(this);
- if (getStaticValueSlot<JSStorage, Base>(exec, s_info.propHashTable(exec), this, propertyName, slot))
+ if (getStaticValueSlot<JSStorage, Base>(exec, *s_info.propHashTable(exec), this, propertyName, slot))
return false;
JSValue prototype = this->prototype();
Modified: trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm (155218 => 155219)
--- trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-09-06 22:26:12 UTC (rev 155218)
+++ trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm 2013-09-06 22:32:08 UTC (rev 155219)
@@ -295,7 +295,7 @@
if ($noStaticTables) {
return "get${className}Table(exec)";
} else {
- return "&${className}Table";
+ return "${className}Table";
}
}
@@ -306,7 +306,7 @@
if ($noStaticTables) {
return "get${className}PrototypeTable(exec)";
} else {
- return "&${className}PrototypeTable";
+ return "${className}PrototypeTable";
}
}
@@ -317,7 +317,7 @@
if ($noStaticTables) {
return "get${constructorClassName}Table(exec)";
} else {
- return "&${constructorClassName}Table";
+ return "${constructorClassName}Table";
}
}
@@ -420,7 +420,7 @@
if ($hasAttributes) {
if ($inlined) {
die "Cannot inline if NoStaticTables is set." if ($interface->extendedAttributes->{"JSNoStaticTables"});
- push(@getOwnPropertySlotImpl, " return ${namespaceMaybe}getStaticValueSlot<$className, Base>(exec, info()->staticPropHashTable, thisObject, propertyName, slot);\n");
+ push(@getOwnPropertySlotImpl, " return ${namespaceMaybe}getStaticValueSlot<$className, Base>(exec, *info()->staticPropHashTable, thisObject, propertyName, slot);\n");
} else {
push(@getOwnPropertySlotImpl, " return ${namespaceMaybe}getStaticValueSlot<$className, Base>(exec, " . hashTableAccessor($interface->extendedAttributes->{"JSNoStaticTables"}, $className) . ", thisObject, propertyName, slot);\n");
}
@@ -1625,9 +1625,9 @@
\%conditionals);
if ($interface->extendedAttributes->{"JSNoStaticTables"}) {
- push(@implContent, "static const HashTable* get${className}PrototypeTable(ExecState* exec)\n");
+ push(@implContent, "static const HashTable& get${className}PrototypeTable(ExecState* exec)\n");
push(@implContent, "{\n");
- push(@implContent, " return getHashTableForGlobalData(exec->vm(), &${className}PrototypeTable);\n");
+ push(@implContent, " return getHashTableForGlobalData(exec->vm(), ${className}PrototypeTable);\n");
push(@implContent, "}\n\n");
push(@implContent, "const ClassInfo ${className}Prototype::s_info = { \"${visibleInterfaceName}Prototype\", &Base::s_info, 0, get${className}PrototypeTable, CREATE_METHOD_TABLE(${className}Prototype) };\n\n");
} else {
@@ -1669,9 +1669,9 @@
# - Initialize static ClassInfo object
if ($numAttributes > 0 && $interface->extendedAttributes->{"JSNoStaticTables"}) {
- push(@implContent, "static const HashTable* get${className}Table(ExecState* exec)\n");
+ push(@implContent, "static const HashTable& get${className}Table(ExecState* exec)\n");
push(@implContent, "{\n");
- push(@implContent, " return getHashTableForGlobalData(exec->vm(), &${className}Table);\n");
+ push(@implContent, " return getHashTableForGlobalData(exec->vm(), ${className}Table);\n");
push(@implContent, "}\n\n");
}
@@ -4060,9 +4060,9 @@
push(@$outputArray, "}\n\n");
} else {
if ($interface->extendedAttributes->{"JSNoStaticTables"}) {
- push(@$outputArray, "static const HashTable* get${constructorClassName}Table(ExecState* exec)\n");
+ push(@$outputArray, "static const HashTable& get${constructorClassName}Table(ExecState* exec)\n");
push(@$outputArray, "{\n");
- push(@$outputArray, " return getHashTableForGlobalData(exec->vm(), &${constructorClassName}Table);\n");
+ push(@$outputArray, " return getHashTableForGlobalData(exec->vm(), ${constructorClassName}Table);\n");
push(@$outputArray, "}\n\n");
push(@$outputArray, "const ClassInfo ${constructorClassName}::s_info = { \"${visibleInterfaceName}Constructor\", &Base::s_info, 0, get${constructorClassName}Table, CREATE_METHOD_TABLE($constructorClassName) };\n\n");
} else {