Changeset 27222 in webkit for trunk/JavaScriptCore/kjs/string_object.cpp
- Timestamp:
- Oct 29, 2007, 2:14:08 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/string_object.cpp
r27218 r27222 444 444 // toString and valueOf are no generic function. 445 445 if (id == ToString || id == ValueOf) { 446 if (!thisObj || !thisObj->inherits(&StringInstance::info))446 if (!thisObj->inherits(&StringInstance::info)) 447 447 return throwError(exec, TypeError); 448 448 … … 455 455 double d = 0.0; 456 456 457 UString s = thisObj->toString(exec); 457 // This optimizes the common case that thisObj is a StringInstance 458 UString s = thisObj->inherits(&StringInstance::info) ? static_cast<StringInstance*>(thisObj)->internalValue()->value() : thisObj->toString(exec); 458 459 459 460 int len = s.size();
Note:
See TracChangeset
for help on using the changeset viewer.