Changeset 52026 in webkit for trunk/JavaScriptCore/runtime/Operations.cpp
- Timestamp:
- Dec 11, 2009, 2:57:39 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/runtime/Operations.cpp
r51978 r52026 55 55 JSValue p2 = v2.toPrimitive(callFrame); 56 56 57 if (p1.isString() || p2.isString()) { 58 RefPtr<UString::Rep> value = concatenate(p1.toString(callFrame).rep(), p2.toString(callFrame).rep()); 59 if (!value) 60 return throwOutOfMemoryError(callFrame); 61 return jsString(callFrame, value.release()); 57 if (p1.isString()) { 58 return p2.isString() 59 ? jsString(callFrame, asString(p1), asString(p2)) 60 : jsString(callFrame, asString(p1), p2.toString(callFrame)); 62 61 } 62 if (p2.isString()) 63 return jsString(callFrame, p1.toString(callFrame), asString(p2)); 63 64 64 65 return jsNumber(callFrame, p1.toNumber(callFrame) + p2.toNumber(callFrame));
Note:
See TracChangeset
for help on using the changeset viewer.