Changeset 197144 in webkit for trunk/Source/JavaScriptCore/runtime
- Timestamp:
- Feb 25, 2016, 4:15:58 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r196868 r197144 603 603 pc[4].u.arrayProfile->observeStructure(base->structure(vm)); 604 604 ASSERT(property.isUInt32()); 605 RETURN(jsBoolean(base->hasProperty (exec, property.asUInt32())));605 RETURN(jsBoolean(base->hasPropertyGeneric(exec, property.asUInt32(), PropertySlot::InternalMethodType::GetOwnProperty))); 606 606 } 607 607 … … 615 615 if (base->structure(vm)->id() == enumerator->cachedStructureID()) 616 616 RETURN(jsBoolean(true)); 617 RETURN(jsBoolean(base->hasProperty (exec, asString(property.asCell())->toIdentifier(exec))));617 RETURN(jsBoolean(base->hasPropertyGeneric(exec, asString(property.asCell())->toIdentifier(exec), PropertySlot::InternalMethodType::GetOwnProperty))); 618 618 } 619 619 … … 625 625 bool result; 626 626 if (property.isString()) 627 result = base->hasProperty (exec, asString(property.asCell())->toIdentifier(exec));627 result = base->hasPropertyGeneric(exec, asString(property.asCell())->toIdentifier(exec), PropertySlot::InternalMethodType::GetOwnProperty); 628 628 else { 629 629 ASSERT(property.isUInt32()); 630 result = base->hasProperty (exec, property.asUInt32());630 result = base->hasPropertyGeneric(exec, property.asUInt32(), PropertySlot::InternalMethodType::GetOwnProperty); 631 631 } 632 632 RETURN(jsBoolean(result)); -
trunk/Source/JavaScriptCore/runtime/JSObject.cpp
r197136 r197144 1281 1281 bool JSObject::hasProperty(ExecState* exec, PropertyName propertyName) const 1282 1282 { 1283 PropertySlot slot(this, PropertySlot::InternalMethodType::HasProperty); 1283 return hasPropertyGeneric(exec, propertyName, PropertySlot::InternalMethodType::HasProperty); 1284 } 1285 1286 bool JSObject::hasProperty(ExecState* exec, unsigned propertyName) const 1287 { 1288 return hasPropertyGeneric(exec, propertyName, PropertySlot::InternalMethodType::HasProperty); 1289 } 1290 1291 bool JSObject::hasPropertyGeneric(ExecState* exec, PropertyName propertyName, PropertySlot::InternalMethodType internalMethodType) const 1292 { 1293 PropertySlot slot(this, internalMethodType); 1284 1294 return const_cast<JSObject*>(this)->getPropertySlot(exec, propertyName, slot); 1285 1295 } 1286 1296 1287 bool JSObject::hasProperty (ExecState* exec, unsigned propertyName) const1288 { 1289 PropertySlot slot(this, PropertySlot::InternalMethodType::HasProperty);1297 bool JSObject::hasPropertyGeneric(ExecState* exec, unsigned propertyName, PropertySlot::InternalMethodType internalMethodType) const 1298 { 1299 PropertySlot slot(this, internalMethodType); 1290 1300 return const_cast<JSObject*>(this)->getPropertySlot(exec, propertyName, slot); 1291 1301 } -
trunk/Source/JavaScriptCore/runtime/JSObject.h
r197136 r197144 479 479 JS_EXPORT_PRIVATE bool hasProperty(ExecState*, PropertyName) const; 480 480 JS_EXPORT_PRIVATE bool hasProperty(ExecState*, unsigned propertyName) const; 481 bool hasPropertyGeneric(ExecState*, PropertyName, PropertySlot::InternalMethodType) const; 482 bool hasPropertyGeneric(ExecState*, unsigned propertyName, PropertySlot::InternalMethodType) const; 481 483 bool hasOwnProperty(ExecState*, PropertyName) const; 482 484 bool hasOwnProperty(ExecState*, unsigned) const;
Note:
See TracChangeset
for help on using the changeset viewer.