Changeset 27132 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Oct 26, 2007, 4:31:14 PM (18 years ago)
Author:
ggaren
Message:

Suggested by Darin Adler.


Use computedHash(), which is safer than just directly accessing _hash.

  • kjs/lookup.cpp: (KJS::Lookup::findEntry): (KJS::Lookup::find):
Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r27130 r27132  
     12007-10-26  Geoffrey Garen  <[email protected]>
     2
     3        Suggested by Darin Adler.
     4       
     5        Use computedHash(), which is safer than just directly accessing _hash.
     6
     7        * kjs/lookup.cpp:
     8        (KJS::Lookup::findEntry):
     9        (KJS::Lookup::find):
     10
    1112007-10-26  Geoffrey Garen  <[email protected]>
    212
  • trunk/JavaScriptCore/kjs/lookup.cpp

    r26956 r27132  
    6060const HashEntry* Lookup::findEntry(const struct HashTable* table, const Identifier& s)
    6161{
    62   return KJS::findEntry(table, s.ustring().rep()->_hash, s.data(), s.size());
     62  return KJS::findEntry(table, s.ustring().rep()->computedHash(), s.data(), s.size());
    6363}
    6464
     
    7373int Lookup::find(const struct HashTable* table, const Identifier& s)
    7474{
    75   const HashEntry* entry = KJS::findEntry(table, s.ustring().rep()->_hash, s.data(), s.size());
     75  const HashEntry* entry = KJS::findEntry(table, s.ustring().rep()->computedHash(), s.data(), s.size());
    7676  if (entry)
    7777    return entry->value;
Note: See TracChangeset for help on using the changeset viewer.