Ignore:
Timestamp:
Jan 29, 2010, 11:46:57 AM (15 years ago)
Author:
[email protected]
Message:

2010-01-29 Oliver Hunt <[email protected]>

Reviewed by Darin Adler.

JSC is failing to propagate anonymous slot count on some transitions
https://bugs.webkit.org/show_bug.cgi?id=34321

Remove the unsafe two argument Structure::create method, and correct
the uses of it to propagate the anonymous slot count.

  • runtime/JSObject.h: (JSC::JSObject::setStructure):
  • runtime/Structure.cpp: (JSC::Structure::addPropertyTransition): (JSC::Structure::changePrototypeTransition): (JSC::Structure::despecifyFunctionTransition): (JSC::Structure::getterSetterTransition): (JSC::Structure::toDictionaryTransition):
  • runtime/Structure.h:

2010-01-29 Oliver Hunt <[email protected]>

Reviewed by Darin Adler.

JSC is failing to propagate anonymous slot count on some transitions
https://bugs.webkit.org/show_bug.cgi?id=34321

Add a test for modification of a type with anonymous slots.

  • fast/dom/Window/anonymous-slot-with-changes-expected.txt: Added.
  • fast/dom/Window/anonymous-slot-with-changes.html: Added.

2010-01-29 Oliver Hunt <[email protected]>

Reviewed by Darin Adler.

JSC is failing to propagate anonymous slot count on some transitions
https://bugs.webkit.org/show_bug.cgi?id=34321

Make code generator add assertions for anonymous slot count.

Test: fast/dom/Window/anonymous-slot-with-changes.html

  • bindings/scripts/CodeGeneratorJS.pm:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Structure.cpp

    r54022 r54073  
    367367    }
    368368
    369     RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo());
     369    RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo(), structure->anonymousSlotCount());
    370370
    371371    transition->m_cachedPrototypeChain = structure->m_cachedPrototypeChain;
     
    416416PassRefPtr<Structure> Structure::changePrototypeTransition(Structure* structure, JSValue prototype)
    417417{
    418     RefPtr<Structure> transition = create(prototype, structure->typeInfo());
     418    RefPtr<Structure> transition = create(prototype, structure->typeInfo(), structure->anonymousSlotCount());
    419419
    420420    transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
     
    435435{
    436436    ASSERT(structure->m_specificFunctionThrashCount < maxSpecificFunctionThrashCount);
    437     RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo());
     437    RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo(), structure->anonymousSlotCount());
    438438
    439439    transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
     
    460460PassRefPtr<Structure> Structure::getterSetterTransition(Structure* structure)
    461461{
    462     RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo());
     462    RefPtr<Structure> transition = create(structure->storedPrototype(), structure->typeInfo(), structure->anonymousSlotCount());
    463463    transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
    464464    transition->m_hasGetterSetterProperties = transition->m_hasGetterSetterProperties;
     
    479479    ASSERT(!structure->isUncacheableDictionary());
    480480   
    481     RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo());
     481    RefPtr<Structure> transition = create(structure->m_prototype, structure->typeInfo(), structure->anonymousSlotCount());
    482482    transition->m_dictionaryKind = kind;
    483483    transition->m_propertyStorageCapacity = structure->m_propertyStorageCapacity;
Note: See TracChangeset for help on using the changeset viewer.