Changeset 14094 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Apr 27, 2006, 6:00:04 PM (19 years ago)
Author:
ggaren
Message:

JavaScriptCore:

Reviewed by Maciej

  • Minor fixups I discovered while working on the autogenerator.


  • kjs/lookup.cpp: (findEntry): ASSERT that size is not 0, because otherwise we'll % by 0, compute a garbage address, and possibly crash.
  • kjs/lookup.h: (cacheGlobalObject): Don't enumerate cached objects -- ideally, they would be hidden entirely.

LayoutTests:

  • Updated to remove diff shmutz:
  • fast/dom/Window/window-special-properties-expected.txt:
  • fast/dom/Window/window-special-properties.html:
  • Test for global window properties like window.HTMLDocument:


  • fast/dom/global-constructors-expected.txt: Added.
  • fast/dom/global-constructors.html: Added.

WebCore:

Reviewed by Maciej.

  • Added global constructor autogeneration for the following, many of which are required by *.live.com: Node, Element, Range, CSSRule, CSSValue, CSSPrimitiveValue, CSSStyleDeclaration, Event, MutationEvent, NodeFilter

It works like so:


  • The autogenerator knows about the "Constructor" data type, which gets special treatment because it exists purely in the bindings. It also knows about the "GenerateConstructor" interface attribute, which does just that.
  • The window interface has many Constructor attributes
  • The hash table generator swizzles empty tables to tables with one empty bucket, to prevent crashes in Lookup::findEntry. (The old generator used to work this way, too.)
  • Window object property lookup gets special treatment to allow shadowing of its built-in global constructor properties. We'll need to expand this mechanism in the future and make it more flexible, but it works for now.


  • DerivedSources.make:
  • WebCore.vcproj/WebCore/WebCore.vcproj:
  • WebCore.xcodeproj/project.pbxproj:
  • bindings/js/kjs_css.cpp: (KJS::toJS):
  • bindings/js/kjs_css.h:
  • bindings/js/kjs_window.cpp: Removed 'namedFrameGetter' and its use because they were bogus; added FIXME describing what they were attempting to do. (KJS::Window::getValueProperty): (KJS::Window::getOverridePropertySlot): (KJS::Window::getOwnPropertySlot):
  • bindings/js/kjs_window.h: (KJS::Window::):
  • bindings/scripts/CodeGeneratorJS.pm:
  • css/CSSPrimitiveValue.idl:
  • css/CSSRule.idl:
  • css/CSSStyleDeclaration.idl: Added.
  • css/CSSValue.idl:
  • dom/Document.idl:
  • dom/Element.idl:
  • dom/Event.idl:
  • dom/MutationEvent.idl:
  • dom/Node.idl:
  • dom/NodeFilter.idl:
  • dom/Range.idl:
  • page/DOMWindow.idl:
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r14052 r14094  
     12006-04-27  Geoffrey Garen  <[email protected]>
     2
     3        Reviewed by Maciej
     4
     5        - Minor fixups I discovered while working on the autogenerator.
     6       
     7        * kjs/lookup.cpp:
     8        (findEntry): ASSERT that size is not 0, because otherwise we'll % by 0,
     9        compute a garbage address, and possibly crash.
     10        * kjs/lookup.h:
     11        (cacheGlobalObject): Don't enumerate cached objects -- ideally, they
     12        would be hidden entirely.
     13
    1142006-04-21  Kevin M. Ollivier  <[email protected]>
    215
  • trunk/JavaScriptCore/kjs/lookup.cpp

    r13089 r14094  
    2626
    2727#include "lookup.h"
     28#include <kxmlcore/Assertions.h>
    2829
    2930using namespace KJS;
     
    4748  }
    4849#endif
     50  ASSERT(table->hashSize != 0);
     51   
    4952  hash %= table->hashSize;
    5053
  • trunk/JavaScriptCore/kjs/lookup.h

    r13150 r14094  
    278278  }
    279279  KJS::JSObject *newObject = new ClassCtor(exec);
    280   globalObject->put(exec, propertyName, newObject, KJS::Internal);
     280  globalObject->put(exec, propertyName, newObject, KJS::Internal | KJS::DontEnum);
    281281  return newObject;
    282282}
Note: See TracChangeset for help on using the changeset viewer.