[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

darin darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:09:16 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 13d73dc6ac55a38973492ab2edefaad24ebe74f2
Author: darin <darin at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 26 23:34:56 2002 +0000

            * kjs/property_map.cpp:
    	(PropertyMap::save): Look at the attributes the same way in the single hash entry
    	case as in the actual hash table case. Change the rule for which attributes to save
    	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
            Also fix bug where saving an empty property map would leave the count set to the old value.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2882 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index e8b6197..9a4ca3c 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,11 @@
+2002-11-26  Darin Adler  <darin at apple.com>
+
+        * kjs/property_map.cpp:
+	(PropertyMap::save): Look at the attributes the same way in the single hash entry
+	case as in the actual hash table case. Change the rule for which attributes to save
+	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
+        Also fix bug where saving an empty property map would leave the count set to the old value.
+
 2002-11-26  Richard Williamson   <rjw at apple.com>
 
         Remove debugging code.  Could be cause of performance regresssion.
diff --git a/JavaScriptCore/ChangeLog-2002-12-03 b/JavaScriptCore/ChangeLog-2002-12-03
index e8b6197..9a4ca3c 100644
--- a/JavaScriptCore/ChangeLog-2002-12-03
+++ b/JavaScriptCore/ChangeLog-2002-12-03
@@ -1,3 +1,11 @@
+2002-11-26  Darin Adler  <darin at apple.com>
+
+        * kjs/property_map.cpp:
+	(PropertyMap::save): Look at the attributes the same way in the single hash entry
+	case as in the actual hash table case. Change the rule for which attributes to save
+	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
+        Also fix bug where saving an empty property map would leave the count set to the old value.
+
 2002-11-26  Richard Williamson   <rjw at apple.com>
 
         Remove debugging code.  Could be cause of performance regresssion.
diff --git a/JavaScriptCore/ChangeLog-2003-10-25 b/JavaScriptCore/ChangeLog-2003-10-25
index e8b6197..9a4ca3c 100644
--- a/JavaScriptCore/ChangeLog-2003-10-25
+++ b/JavaScriptCore/ChangeLog-2003-10-25
@@ -1,3 +1,11 @@
+2002-11-26  Darin Adler  <darin at apple.com>
+
+        * kjs/property_map.cpp:
+	(PropertyMap::save): Look at the attributes the same way in the single hash entry
+	case as in the actual hash table case. Change the rule for which attributes to save
+	to "attributes that don't have the ReadOnly, DontEnum, or Function bit set".
+        Also fix bug where saving an empty property map would leave the count set to the old value.
+
 2002-11-26  Richard Williamson   <rjw at apple.com>
 
         Remove debugging code.  Could be cause of performance regresssion.
diff --git a/JavaScriptCore/kjs/property_map.cpp b/JavaScriptCore/kjs/property_map.cpp
index dcbda14..ef9bae2 100644
--- a/JavaScriptCore/kjs/property_map.cpp
+++ b/JavaScriptCore/kjs/property_map.cpp
@@ -24,6 +24,7 @@
 #include "object.h"
 #include "reference_list.h"
 
+#define DEBUG_PROPERTIES 0
 #define DO_CONSISTENCY_CHECK 0
 #define DUMP_STATISTICS 0
 #define USE_SINGLE_ENTRY 1
@@ -61,7 +62,7 @@ struct PropertyMapHashTable
     int keyCount;
     PropertyMapHashTableEntry entries[1];
 };
-    
+
 class SavedProperty {
 public:
     Identifier key;
@@ -73,9 +74,7 @@ SavedProperties::SavedProperties() : _count(0), _properties(0) { }
 
 SavedProperties::~SavedProperties()
 {
-    if (_properties){
-        delete [] _properties;
-    }
+    delete [] _properties;
 }
 
 // Algorithm concepts from Algorithms in C++, Sedgewick.
@@ -187,7 +186,7 @@ ValueImp *PropertyMap::get(const Identifier &name) const
     return 0;
 }
 
-#ifdef DEBUG_PROPERTIES
+#if DEBUG_PROPERTIES
 static void printAttributes(int attributes)
 {
     if (attributes == 0)
@@ -211,7 +210,7 @@ void PropertyMap::put(const Identifier &name, ValueImp *value, int attributes)
 
     UString::Rep *rep = name._ustring.rep;
     
-#ifdef DEBUG_PROPERTIES
+#if DEBUG_PROPERTIES
     printf ("adding property %s, attributes = 0x%08x (", name.ascii(), attributes);
     printAttributes(attributes);
     printf (")\n");
@@ -439,39 +438,40 @@ void PropertyMap::save(SavedProperties &p) const
 
     if (!_table) {
 #if USE_SINGLE_ENTRY
-        if (_singleEntry.key)
+        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function)))
             ++count;
 #endif
     } else {
         for (int i = 0; i != _table->size; ++i)
-            if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal)))
-            //if (_table->entries[i].key)
+            if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | DontEnum | Function)))
                 ++count;
     }
 
     delete [] p._properties;
+
+    p._count = count;
+
     if (count == 0) {
         p._properties = 0;
         return;
     }
     
     p._properties = new SavedProperty [count];
-    p._count = count;
     
     SavedProperty *prop = p._properties;
     
     if (!_table) {
 #if USE_SINGLE_ENTRY
-        if (_singleEntry.key) {
+        if (_singleEntry.key && !(_singleEntry.attributes & (ReadOnly | DontEnum | Function))) {
             prop->key = Identifier(_singleEntry.key);
             prop->value = Value(_singleEntry.value);
+            prop->attributes = _singleEntry.attributes;
             ++prop;
         }
 #endif
     } else {
         for (int i = 0; i != _table->size; ++i) {
-            if (_table->entries[i].key && (_table->entries[i].attributes == 0 || _table->entries[i].attributes == (DontDelete | Internal))) {
-            //if (_table->entries[i].key) {
+            if (_table->entries[i].key && !(_table->entries[i].attributes & (ReadOnly | DontEnum | Function))) {
                 prop->key = Identifier(_table->entries[i].key);
                 prop->value = Value(_table->entries[i].value);
                 prop->attributes = _table->entries[i].attributes;
@@ -483,9 +483,8 @@ void PropertyMap::save(SavedProperties &p) const
 
 void PropertyMap::restore(const SavedProperties &p)
 {
-    for (int i = 0; i != p._count; ++i){
+    for (int i = 0; i != p._count; ++i)
         put(p._properties[i].key, p._properties[i].value.imp(), p._properties[i].attributes);
-    }
 }
 
 #if DO_CONSISTENCY_CHECK

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list