Skip to content
  • andersca@apple.com's avatar
    Stop using fastNew/fastDelete in JavaScriptCore · f17c511b
    andersca@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=120898
    
    Reviewed by Oliver Hunt.
    
    Source/JavaScriptCore:
    
    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:
    
    Source/WebCore:
    
    Update for changes to JavaScriptCore.
    
    * 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):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155219 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    f17c511b