[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kjs
From:       Maks Orlovich <maksim () kde ! org>
Date:       2010-06-05 19:23:38
Message-ID: 20100605192338.147C1AC8CA () svn ! kde ! org
[Download RAW message or body]

SVN commit 1134932 by orlovich:

Properly keep attributes when239957 replacing a hashtable property with normal one.
Fixes the actual website in #239957
(previous fix just made it not crash)
BUG:239957


 M  +5 -1      object.cpp  


--- trunk/KDE/kdelibs/kjs/object.cpp #1134931:1134932
@@ -182,14 +182,18 @@
   if (checkRO) {
     // Check for static properties that are ReadOnly; the property map will check \
                the dynamic properties.
     // We don't have to worry about setters being read-only as they can't be added \
with such an attribute. +    // We also need to inherit any attributes we have from \
the entry  const HashEntry* entry = findPropertyHashEntry(propertyName);
-    if (entry && entry->attr & ReadOnly) {
+    if (entry) {
+      if (entry->attr & ReadOnly) {
 #ifdef KJS_VERBOSE
       fprintf( stderr, "WARNING: static property %s is ReadOnly\n", \
propertyName.ascii() );  #endif
       return;
     }
+      attr = entry->attr;
   }
+  }
 
   // Check if there are any setters or getters in the prototype chain
   JSObject *obj = this;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic