Ignore:
Timestamp:
Jun 11, 2008, 12:37:44 PM (17 years ago)
Author:
Darin Adler
Message:

2008-06-11 Darin Adler <Darin Adler>

Reviewed by Alexey.

  • kjs/array_instance.cpp: (KJS::ArrayInstance::checkConsistency): Added. Empty inline version for when consistency checks are turned off. (KJS::ArrayInstance::ArrayInstance): Check consistency after construction. (KJS::ArrayInstance::~ArrayInstance): Check consistency before destruction. (KJS::ArrayInstance::put): Check consistency before and after. (KJS::ArrayInstance::deleteProperty): Ditto. (KJS::ArrayInstance::setLength): Ditto. (KJS::compareByStringPairForQSort): Use typedef for clarity. (KJS::ArrayInstance::sort): Check consistency before and after. Also broke the loop to set up sorting into two separate passes. Added FIXMEs about various exception safety issues. Added code to set m_numValuesInVector after sorting. (KJS::ArrayInstance::compactForSorting): Ditto.
  • kjs/array_instance.h: Added a definition of an enum for the types of consistency check and a declaration of the consistency checking function.
File:
1 edited

Legend:

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

    r34355 r34496  
    22/*
    33 *  Copyright (C) 1999-2000 Harri Porten ([email protected])
    4  *  Copyright (C) 2003, 2007 Apple Inc. All rights reserved.
     4 *  Copyright (C) 2003, 2007, 2008 Apple Inc. All rights reserved.
    55 *
    66 *  This library is free software; you can redistribute it and/or
     
    6565    bool increaseVectorLength(unsigned newLength);
    6666   
    67     unsigned compactForSorting();   
     67    unsigned compactForSorting();
     68
     69    enum ConsistencyCheckType { NormalConsistencyCheck, DestructorConsistencyCheck, SortConsistencyCheck };
     70    void checkConsistency(ConsistencyCheckType = NormalConsistencyCheck);
    6871
    6972    unsigned m_length;
Note: See TracChangeset for help on using the changeset viewer.