Changeset 35291 in webkit for trunk/JavaScriptCore/kjs/ArrayConstructor.cpp
- Timestamp:
- Jul 22, 2008, 10:10:05 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ArrayConstructor.cpp
r35242 r35291 45 45 { 46 46 // a single numeric argument denotes the array size (!) 47 if (args.size() == 1 && args [0]->isNumber()) {48 uint32_t n = args [0]->toUInt32(exec);49 if (n != args [0]->toNumber(exec))47 if (args.size() == 1 && args.at(exec, 0)->isNumber()) { 48 uint32_t n = args.at(exec, 0)->toUInt32(exec); 49 if (n != args.at(exec, 0)->toNumber(exec)) 50 50 return throwError(exec, RangeError, "Array size is not a small enough positive integer."); 51 51 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayPrototype(), n); … … 53 53 54 54 // otherwise the array is constructed with the arguments in it 55 return new (exec) JSArray(exec ->lexicalGlobalObject()->arrayPrototype(), args);55 return new (exec) JSArray(exec, exec->lexicalGlobalObject()->arrayPrototype(), args); 56 56 } 57 57
Note:
See TracChangeset
for help on using the changeset viewer.