JavaScriptCore:
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2008 02:10:23 +0000 (02:10 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 May 2008 02:10:23 +0000 (02:10 +0000)
commit29f56a876f3804ba9f56541a9fa102cb79b9d3f5
tree2988db94bbefeb8b3fbc2ca15fc535669c29e4f3
parentfbb4e7bdbe4402d0eb7dd3c9d3d5ff291de14dd7
JavaScriptCore:

2008-05-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders.

        - make addStaticGlobals protected instead of private so subclasses can use it

        * JavaScriptCore.exp:
        * kjs/JSGlobalObject.h:

WebCore:

2008-05-25  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders.

        - bind the window's "document" and "window" properties to static slots
        1.7% speedup on Acid3 test 26

        Only the "document" part matters for Acid3, but since I was doing
        this anyway, "window" also seemed like a good one to optimize.

        * bindings/js/JSDOMWindowBase.cpp:
        (WebCore::JSDOMWindowBase::JSDOMWindowBase): Allocate variable
        slots for document and window; but just put null in the document
        slot for now.
        (WebCore::JSDOMWindowBase::updateDocument): Fill in the document
        slot.
        (WebCore::JSDOMWindowBase::~JSDOMWindowBase): Make our shell stop
        tracking us.
        * bindings/js/JSDOMWindowBase.h:
        * bindings/js/JSDOMWindowShell.cpp:
        (WebCore::JSDOMWindowShell::JSDOMWindowShell): Allocate HashSet
        for our still-not-dead inner windows.
        (WebCore::JSDOMWindowShell::updateDocument): Update all our
        inner windows ever (to make sure the update to the document
        property shows up everywhere).
        * bindings/js/JSDOMWindowShell.h:
        (WebCore::JSDOMWindowShell::setWindow): Update our hash.
        (WebCore::JSDOMWindowShell::clearFormerWindow): Ditto.
        * bindings/js/JSDocumentCustom.cpp:
        (WebCore::toJS): Don't set self as a property map property of
        the window, this is no longer necessary.
        * bindings/js/kjs_proxy.cpp:
        (WebCore::KJSProxy::initScript): Update document for the
        newly created window.
        * bindings/js/kjs_proxy.h:
        * page/Frame.cpp:
        (WebCore::Frame::setDocument): If the document is not null,
        update our window.

LayoutTests:

2008-05-26  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Anders.

        - update test result for document/window being allocated to var slots

        * http/tests/security/cross-frame-access-put-expected.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@34143 268f45cc-cd09-0410-ab3c-d52691b4dbfc
14 files changed:
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/kjs/JSGlobalObject.h
LayoutTests/ChangeLog
LayoutTests/http/tests/security/cross-frame-access-put-expected.txt
WebCore/ChangeLog
WebCore/bindings/js/JSDOMWindowBase.cpp
WebCore/bindings/js/JSDOMWindowBase.h
WebCore/bindings/js/JSDOMWindowShell.cpp
WebCore/bindings/js/JSDOMWindowShell.h
WebCore/bindings/js/JSDocumentCustom.cpp
WebCore/bindings/js/kjs_proxy.cpp
WebCore/bindings/js/kjs_proxy.h
WebCore/page/Frame.cpp