Changeset 29459 in webkit for trunk/JavaScriptCore
- Timestamp:
- Jan 14, 2008, 1:12:18 AM (17 years ago)
- Location:
- trunk/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r29458 r29459 1 2008-01-14 Alexey Proskuryakov <[email protected]> 2 3 Reviewed by David Kilzer. 4 5 http://bugs.webkit.org/show_bug.cgi?id=16787 6 array.splice() with 1 element not working 7 8 Test: fast/js/array-splice.html 9 10 * kjs/array_object.cpp: 11 (KJS::ArrayProtoFuncSplice::callAsFunction): Implement this Mozilla extension, and fix 12 some other edge cases. 13 1 14 2008-01-13 Steve Falkenburg <[email protected]> 2 15 -
trunk/JavaScriptCore/kjs/array_object.cpp
r29067 r29459 431 431 JSValue* result = resObj; 432 432 unsigned length = thisObj->get(exec, exec->propertyNames().length)->toUInt32(exec); 433 if (!args.size()) 434 return jsUndefined(); 433 435 int begin = args[0]->toUInt32(exec); 434 436 if (begin < 0) … … 436 438 else 437 439 begin = std::min<int>(begin, length); 438 unsigned int deleteCount = std::min<int>(std::max<int>(args[1]->toUInt32(exec), 0), length - begin); 440 441 unsigned int deleteCount; 442 if (args.size() > 1) 443 deleteCount = std::min<int>(std::max<int>(args[1]->toUInt32(exec), 0), length - begin); 444 else 445 deleteCount = length - begin; 439 446 440 447 for (unsigned int k = 0; k < deleteCount; k++) {
Note:
See TracChangeset
for help on using the changeset viewer.