Skip to content
  • weinig@apple.com's avatar
    Remove need for virtual JSObject::unwrappedObject · 76fa2755
    weinig@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=71034
    
    Reviewed by Geoffrey Garen.
    
    ../JavaScriptCore: 
    
    * JavaScriptCore.exp:
    Update exports.
    
    * CMakeLists.txt:
    * GNUmakefile.list.am:
    * JavaScriptCore.exp:
    * JavaScriptCore.gypi:
    * JavaScriptCore.pro:
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj:
    * JavaScriptCore.xcodeproj/project.pbxproj:
    Add JSGlobalThis.cpp.
    
    * runtime/JSGlobalThis.cpp: Added.
    (JSC::JSGlobalThis::visitChildren):
    (JSC::JSGlobalThis::unwrappedObject):
    * runtime/JSGlobalThis.h:
    (JSC::JSGlobalThis::createStructure):
    Move underlying object from JSDOMWindowShell down to JSGlobalThis
    and corresponding visitChildren method.
    
    * runtime/JSObject.cpp:
    (JSC::JSObject::unwrappedObject):
    Change unwrappedObject from virtual, to just needing an if check.
    
    * runtime/JSObject.h:
    (JSC::JSObject::isGlobalThis):
    * runtime/JSType.h:
    Add isGlobalThis predicate and type.
    
    ../WebCore: 
    
    Move the member containing the global object from the JSDOMWindowShell
    down to the JSGlobalThis class, and update JSDOMWindowShell to go through
    an inline helper (which just casts) to get the window.
    
    * bindings/js/JSDOMWindowShell.cpp:
    (WebCore::JSDOMWindowShell::setWindow):
    (WebCore::JSDOMWindowShell::className):
    (WebCore::JSDOMWindowShell::getOwnPropertySlot):
    (WebCore::JSDOMWindowShell::getOwnPropertyDescriptor):
    (WebCore::JSDOMWindowShell::put):
    (WebCore::JSDOMWindowShell::putWithAttributes):
    (WebCore::JSDOMWindowShell::defineOwnProperty):
    (WebCore::JSDOMWindowShell::deleteProperty):
    (WebCore::JSDOMWindowShell::getPropertyNames):
    (WebCore::JSDOMWindowShell::getOwnPropertyNames):
    (WebCore::JSDOMWindowShell::defineGetter):
    (WebCore::JSDOMWindowShell::defineSetter):
    (WebCore::JSDOMWindowShell::lookupGetter):
    (WebCore::JSDOMWindowShell::lookupSetter):
    (WebCore::JSDOMWindowShell::impl):
    * bindings/js/JSDOMWindowShell.h:
    (WebCore::JSDOMWindowShell::window):
    (WebCore::JSDOMWindowShell::setWindow):
    (WebCore::JSDOMWindowShell::createStructure):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98909 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    76fa2755