Changeset 217887 in webkit for trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
- Timestamp:
- Jun 7, 2017, 9:54:05 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp
r217840 r217887 705 705 if (base->structure(vm)->id() == enumerator->cachedStructureID()) 706 706 RETURN(jsBoolean(true)); 707 RETURN(jsBoolean(base->hasPropertyGeneric(exec, asString(property.asCell())->toIdentifier(exec), PropertySlot::InternalMethodType::GetOwnProperty))); 707 JSString* string = asString(property); 708 auto propertyName = string->toIdentifier(exec); 709 CHECK_EXCEPTION(); 710 RETURN(jsBoolean(base->hasPropertyGeneric(exec, propertyName, PropertySlot::InternalMethodType::GetOwnProperty))); 708 711 } 709 712 … … 714 717 CHECK_EXCEPTION(); 715 718 JSValue property = OP(3).jsValue(); 716 bool result; 717 if (property.isString()) 718 result = base->hasPropertyGeneric(exec, asString(property.asCell())->toIdentifier(exec), PropertySlot::InternalMethodType::GetOwnProperty); 719 else { 720 ASSERT(property.isUInt32()); 721 result = base->hasPropertyGeneric(exec, property.asUInt32(), PropertySlot::InternalMethodType::GetOwnProperty); 722 } 723 RETURN(jsBoolean(result)); 719 JSString* string = asString(property); 720 auto propertyName = string->toIdentifier(exec); 721 CHECK_EXCEPTION(); 722 RETURN(jsBoolean(base->hasPropertyGeneric(exec, propertyName, PropertySlot::InternalMethodType::GetOwnProperty))); 724 723 } 725 724 … … 729 728 JSValue baseValue = OP_C(2).jsValue(); 730 729 JSValue property = OP(3).jsValue(); 731 ASSERT(property.isString()); 732 RETURN(baseValue.get(exec, asString(property)->toIdentifier(exec))); 730 JSString* string = asString(property); 731 auto propertyName = string->toIdentifier(exec); 732 CHECK_EXCEPTION(); 733 RETURN(baseValue.get(exec, propertyName)); 733 734 } 734 735
Note:
See TracChangeset
for help on using the changeset viewer.