Changeset 34809 in webkit for trunk/JavaScriptCore/wtf/AVLTree.h


Ignore:
Timestamp:
Jun 26, 2008, 11:37:44 AM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin.

https://bugs.webkit.org/show_bug.cgi?id=19767
REGRESSION: Crash in sort() when visiting http://www.onnyturf.com/subway/

  • kjs/JSArray.cpp: (KJS::AVLTreeAbstractorForArrayCompare::set_balance_factor): Made changing balance factor from -1 to +1 work correctly.
  • wtf/AVLTree.h: (KJS::AVLTreeDefaultBSet::operator[]): Added an assertion that catches this slightly earlier.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/AVLTree.h

    r33973 r34809  
    3333#define KJS_AVL_TREE_H_
    3434
     35#include "Assertions.h"
     36
    3537namespace KJS {
    3638
     
    6466class AVLTreeDefaultBSet {
    6567public:
    66     bool& operator[](unsigned i) { return m_data[i]; }
     68    bool& operator[](unsigned i) { ASSERT(i < maxDepth); return m_data[i]; }
    6769    void set() { for (unsigned i = 0; i < maxDepth; ++i) m_data[i] = true; }
    6870    void reset() { for (unsigned i = 0; i < maxDepth; ++i) m_data[i] = false; }
Note: See TracChangeset for help on using the changeset viewer.