• barraclough@apple.com's avatar
    Generalize JSGlobalThis as JSProxy · 4aef7247
    barraclough@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=97716
    
    Reviewed by Oliver Hunt.
    
    ../JavaScriptCore: 
    
    Generalize JSGlobalThis as JSProxy and move proxying functionality up from the window shell into JSProxy.
    
    * CMakeLists.txt:
    * GNUmakefile.list.am:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    * Target.pri:
    * runtime/JSGlobalObject.cpp:
    (JSC::JSGlobalObject::toThisObject):
        - Hoist toThisObject from WebCore.
    (JSC):
    * runtime/JSGlobalObject.h:
        - removed include.
    (JSC::JSGlobalObject::finishCreation):
        - JSGlobalThis -> JSObject
    (JSGlobalObject):
        - Hoist toThisObject from WebCore.
    * runtime/JSGlobalThis.cpp: Removed.
    * runtime/JSGlobalThis.h: Removed.
    * runtime/JSObject.cpp:
        - removed include.
    * runtime/JSObject.h:
    (JSObject):
    (JSC::JSObject::isProxy):
        - isGlobalThis -> isProxy
        - GlobalThisType -> ProxyType
    * runtime/JSProxy.cpp: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.cpp.
    (JSC):
    (JSC::JSProxy::visitChildren):
    (JSC::JSProxy::setTarget):
    (JSC::JSProxy::className):
    (JSC::JSProxy::getOwnPropertySlot):
    (JSC::JSProxy::getOwnPropertySlotByIndex):
    (JSC::JSProxy::getOwnPropertyDescriptor):
    (JSC::JSProxy::put):
    (JSC::JSProxy::putByIndex):
    (JSC::JSProxy::putDirectVirtual):
    (JSC::JSProxy::defineOwnProperty):
    (JSC::JSProxy::deleteProperty):
    (JSC::JSProxy::deletePropertyByIndex):
    (JSC::JSProxy::getPropertyNames):
    (JSC::JSProxy::getOwnPropertyNames):
        - Class cretaed from JSGlobalThis, JSDOMWindowShell.
    * runtime/JSProxy.h: Copied from Source/JavaScriptCore/runtime/JSGlobalThis.h.
    (JSC::JSProxy::create):
    (JSC::JSProxy::createStructure):
    (JSProxy):
    (JSC::JSProxy::target):
    (JSC::JSProxy::JSProxy):
        - Class cretaed from JSGlobalThis, JSDOMWindowShell.
    * runtime/JSType.h:
        - GlobalThisType -> ProxyType
    
    ../WebCore: 
    
    This patch moves window shell functionality up to JSC::JSProxy.
    
    * ForwardingHeaders/runtime/JSGlobalThis.h: Removed.
    * ForwardingHeaders/runtime/JSProxy.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSGlobalThis.h.
    * bindings/js/JSDOMGlobalObject.cpp:
    (WebCore::JSDOMGlobalObject::finishCreation):
        - JSGlobalThis -> JSObject
    * bindings/js/JSDOMGlobalObject.h:
    (JSDOMGlobalObject):
        - JSGlobalThis -> JSObject
    * bindings/js/JSDOMWindowBase.cpp:
    (WebCore):
        - Hoist toThisObject up into JSC.
    * bindings/js/JSDOMWindowBase.h:
    (JSDOMWindowBase):
        - Hoist toThisObject up into JSC.
    * bindings/js/JSDOMWindowShell.cpp:
    (WebCore):
        - JSGlobalThis -> JSProxy
        - moved JSObject callbacks to JSProxy
    * bindings/js/JSDOMWindowShell.h:
    (JSDOMWindowShell):
        - JSGlobalThis -> JSProxy
        - moved JSObject callbacks to JSProxy
    (WebCore::JSDOMWindowShell::window):
        - unwrappedObject() -> target()
    (WebCore::JSDOMWindowShell::setWindow):
        - setUnwrappedObject() -> setTarget()
    (WebCore::JSDOMWindowShell::createStructure):
        - GlobalThisType -> ProxyType
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@129685 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    4aef7247
JavaScriptCore.vcproj 45.6 KB