Changeset 97002 in webkit for trunk/Source/JavaScriptCore/runtime/JSObject.cpp
- Timestamp:
- Oct 7, 2011, 11:37:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r96996 r97002 243 243 } 244 244 245 bool JSObject::deleteProperty(ExecState* exec, const Identifier& propertyName) 246 { 247 return deleteProperty(this, exec, propertyName); 248 } 249 245 250 // ECMA 8.6.2.5 246 bool JSObject::deleteProperty(ExecState* exec, const Identifier& propertyName) 247 { 251 bool JSObject::deleteProperty(JSCell* cell, ExecState* exec, const Identifier& propertyName) 252 { 253 JSObject* thisObject = static_cast<JSObject*>(cell); 248 254 unsigned attributes; 249 255 JSCell* specificValue; 250 if ( structure()->get(exec->globalData(), propertyName, attributes, specificValue) != WTF::notFound) {256 if (thisObject->structure()->get(exec->globalData(), propertyName, attributes, specificValue) != WTF::notFound) { 251 257 if ((attributes & DontDelete)) 252 258 return false; 253 removeDirect(exec->globalData(), propertyName);259 thisObject->removeDirect(exec->globalData(), propertyName); 254 260 return true; 255 261 } 256 262 257 263 // Look in the static hashtable of properties 258 const HashEntry* entry = findPropertyHashEntry(exec, propertyName);264 const HashEntry* entry = thisObject->findPropertyHashEntry(exec, propertyName); 259 265 if (entry && entry->attributes() & DontDelete) 260 266 return false; // this builtin property can't be deleted … … 272 278 bool JSObject::deleteProperty(ExecState* exec, unsigned propertyName) 273 279 { 274 return deleteProperty(exec, Identifier::from(exec, propertyName)); 280 return deleteProperty(this, exec, propertyName); 281 } 282 283 bool JSObject::deleteProperty(JSCell* cell, ExecState* exec, unsigned propertyName) 284 { 285 return static_cast<JSObject*>(cell)->deleteProperty(exec, Identifier::from(exec, propertyName)); 275 286 } 276 287
Note:
See TracChangeset
for help on using the changeset viewer.