Changeset 2882 in webkit for trunk/JavaScriptCore
- Timestamp:
- Nov 26, 2002, 3:34:56 PM (23 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r2881 r2882 1 2002-11-26 Darin Adler <[email protected]> 2 3 * kjs/property_map.cpp: 4 (PropertyMap::save): Look at the attributes the same way in the single hash entry 5 case as in the actual hash table case. Change the rule for which attributes to save 6 to "attributes that don't have the ReadOnly, DontEnum, or Function bit set". 7 Also fix bug where saving an empty property map would leave the count set to the old value. 8 1 9 2002-11-26 Richard Williamson <[email protected]> 2 10 -
trunk/JavaScriptCore/ChangeLog-2002-12-03
r2881 r2882 1 2002-11-26 Darin Adler <[email protected]> 2 3 * kjs/property_map.cpp: 4 (PropertyMap::save): Look at the attributes the same way in the single hash entry 5 case as in the actual hash table case. Change the rule for which attributes to save 6 to "attributes that don't have the ReadOnly, DontEnum, or Function bit set". 7 Also fix bug where saving an empty property map would leave the count set to the old value. 8 1 9 2002-11-26 Richard Williamson <[email protected]> 2 10 -
trunk/JavaScriptCore/ChangeLog-2003-10-25
r2881 r2882 1 2002-11-26 Darin Adler <[email protected]> 2 3 * kjs/property_map.cpp: 4 (PropertyMap::save): Look at the attributes the same way in the single hash entry 5 case as in the actual hash table case. Change the rule for which attributes to save 6 to "attributes that don't have the ReadOnly, DontEnum, or Function bit set". 7 Also fix bug where saving an empty property map would leave the count set to the old value. 8 1 9 2002-11-26 Richard Williamson <[email protected]> 2 10 -
trunk/JavaScriptCore/kjs/property_map.cpp
r2881 r2882 25 25 #include "reference_list.h" 26 26 27 #define DEBUG_PROPERTIES 0 27 28 #define DO_CONSISTENCY_CHECK 0 28 29 #define DUMP_STATISTICS 0 … … 62 63 PropertyMapHashTableEntry entries[1]; 63 64 }; 64 65 65 66 class SavedProperty { 66 67 public: … … 74 75 SavedProperties::~SavedProperties() 75 76 { 76 if (_properties){ 77 delete [] _properties; 78 } 77 delete [] _properties; 79 78 } 80 79 … … 188 187 } 189 188 190 #if defDEBUG_PROPERTIES189 #if DEBUG_PROPERTIES 191 190 static void printAttributes(int attributes) 192 191 { … … 212 211 UString::Rep *rep = name._ustring.rep; 213 212 214 #if defDEBUG_PROPERTIES213 #if DEBUG_PROPERTIES 215 214 printf ("adding property %s, attributes = 0x%08x (", name.ascii(), attributes); 216 215 printAttributes(attributes); … … 440 439 if (!_table) { 441 440 #if USE_SINGLE_ENTRY 442 if (_singleEntry.key )441 if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function))) 443 442 ++count; 444 443 #endif 445 444 } else { 446 445 for (int i = 0; i != _table->size; ++i) 447 if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal))) 448 //if (_table->entries[i].key) 446 if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | DontEnum | Function))) 449 447 ++count; 450 448 } 451 449 452 450 delete [] p._properties; 451 452 p._count = count; 453 453 454 if (count == 0) { 454 455 p._properties = 0; … … 457 458 458 459 p._properties = new SavedProperty [count]; 459 p._count = count;460 460 461 461 SavedProperty *prop = p._properties; … … 463 463 if (!_table) { 464 464 #if USE_SINGLE_ENTRY 465 if (_singleEntry.key ) {465 if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function))) { 466 466 prop->key = Identifier(_singleEntry.key); 467 467 prop->value = Value(_singleEntry.value); 468 prop->attributes = _singleEntry.attributes; 468 469 ++prop; 469 470 } … … 471 472 } else { 472 473 for (int i = 0; i != _table->size; ++i) { 473 if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal))) { 474 //if (_table->entries[i].key) { 474 if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | DontEnum | Function))) { 475 475 prop->key = Identifier(_table->entries[i].key); 476 476 prop->value = Value(_table->entries[i].value); … … 484 484 void PropertyMap::restore(const SavedProperties &p) 485 485 { 486 for (int i = 0; i != p._count; ++i) {486 for (int i = 0; i != p._count; ++i) 487 487 put(p._properties[i].key, p._properties[i].value.imp(), p._properties[i].attributes); 488 }489 488 } 490 489
Note:
See TracChangeset
for help on using the changeset viewer.