Changeset 28980 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Dec 25, 2007, 2:54:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r28884 r28980 227 227 // Assume that a C++ implementation knows what it is doing 228 228 // and let it override the canPut() check. 229 if ((attr == None || attr == DontDelete) && !canPut(exec,propertyName)) { 230 return; 231 } 232 229 bool checkReadOnly = !(attr & (ReadOnly | DontEnum | Internal | Function | GetterSetter)); 233 230 // Check if there are any setters or getters in the prototype chain 234 231 JSObject *obj = this; … … 247 244 248 245 if (hasGettersOrSetters) { 246 if (checkReadOnly && !canPut(exec,propertyName)) { 247 return; 248 } 249 249 250 obj = this; 250 251 while (true) { … … 278 279 } 279 280 280 _prop.put(propertyName, value,attr);281 _prop.put(propertyName, value, attr, checkReadOnly); 281 282 } 282 283 … … 294 295 // Don't look in the prototype here. We can always put an override 295 296 // in the object, even if the prototype has a ReadOnly property. 296 297 if (!getPropertyAttributes(propertyName, attributes)) 297 // Also, there is no need to check the static property table, as this 298 // would have been done by the subclass already. 299 300 if (!_prop.get(propertyName, attributes)) 298 301 return true; 299 else 300 302 303 return !(attributes & ReadOnly); 301 304 } 302 305
Note:
See TracChangeset
for help on using the changeset viewer.