Changeset 26959 in webkit for trunk/JavaScriptCore/kjs/object.cpp
- Timestamp:
- Oct 24, 2007, 1:21:21 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/object.cpp
r26690 r26959 358 358 JSValue* JSObject::defaultValue(ExecState* exec, JSType hint) const 359 359 { 360 Identifier firstPropertyName;361 Identifier secondPropertyName;362 360 /* Prefer String for Date objects */ 363 361 if ((hint == StringType) || (hint != StringType) && (hint != NumberType) && (_proto == exec->lexicalInterpreter()->builtinDatePrototype())) { 364 firstPropertyName = exec->propertyNames().toString; 365 secondPropertyName = exec->propertyNames().valueOf; 362 if (JSValue* v = tryGetAndCallProperty(exec, this, exec->propertyNames().toString)) 363 return v; 364 if (JSValue* v = tryGetAndCallProperty(exec, this, exec->propertyNames().valueOf)) 365 return v; 366 366 } else { 367 firstPropertyName = exec->propertyNames().valueOf; 368 secondPropertyName = exec->propertyNames().toString; 369 } 370 371 JSValue *v; 372 if ((v = tryGetAndCallProperty(exec, this, firstPropertyName))) 373 return v; 374 if ((v = tryGetAndCallProperty(exec, this, secondPropertyName))) 375 return v; 367 if (JSValue* v = tryGetAndCallProperty(exec, this, exec->propertyNames().valueOf)) 368 return v; 369 if (JSValue* v = tryGetAndCallProperty(exec, this, exec->propertyNames().toString)) 370 return v; 371 } 376 372 377 373 if (exec->hadException())
Note:
See TracChangeset
for help on using the changeset viewer.