Ignore:
Timestamp:
May 26, 2008, 7:10:23 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-05-26 Maciej Stachowiak <[email protected]>

Reviewed by Anders.


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

WebCore:

2008-05-25 Maciej Stachowiak <[email protected]>

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 <[email protected]>

Reviewed by Anders.


  • update test result for document/window being allocated to var slots
  • http/tests/security/cross-frame-access-put-expected.txt:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/JSGlobalObject.h

    r34042 r34143  
    265265        static ThreadClassInfoHashTables* threadClassInfoHashTables();
    266266
    267     private:
    268267        void init(JSObject* thisValue);
    269268       
    270269        JSGlobalObjectData* d() const { return static_cast<JSGlobalObjectData*>(JSVariableObject::d); }
    271270
     271    protected:
    272272        struct GlobalPropertyInfo {
    273273            GlobalPropertyInfo(const Identifier& i, JSValue* v, unsigned a)
     
    284284        void addStaticGlobals(GlobalPropertyInfo*, int count);
    285285
     286    private:
    286287        bool checkTimeout();
    287288        void resetTimeoutCheck();
Note: See TracChangeset for help on using the changeset viewer.