Changeset 36726 in webkit for trunk/JavaScriptCore/kjs/ArrayConstructor.cpp
- Timestamp:
- Sep 20, 2008, 7:29:12 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/ArrayConstructor.cpp
r36263 r36726 26 26 27 27 #include "ArrayPrototype.h" 28 #include "FunctionPrototype.h"29 28 #include "JSArray.h" 30 29 #include "lookup.h" … … 34 33 ASSERT_CLASS_FITS_IN_CELL(ArrayConstructor); 35 34 36 ArrayConstructor::ArrayConstructor(ExecState* exec, FunctionPrototype* functionPrototype, ArrayPrototype* arrayPrototype)37 : InternalFunction(exec, functionPrototype, Identifier(exec, arrayPrototype->classInfo()->className))35 ArrayConstructor::ArrayConstructor(ExecState* exec, PassRefPtr<StructureID> structure, ArrayPrototype* arrayPrototype) 36 : InternalFunction(exec, structure, Identifier(exec, arrayPrototype->classInfo()->className)) 38 37 { 39 38 // ECMA 15.4.3.1 Array.prototype … … 51 50 if (n != args.at(exec, 0)->toNumber(exec)) 52 51 return throwError(exec, RangeError, "Array size is not a small enough positive integer."); 53 return new (exec) JSArray(exec->lexicalGlobalObject()->array Prototype(), n);52 return new (exec) JSArray(exec->lexicalGlobalObject()->arrayStructure(), n); 54 53 } 55 54 56 55 // otherwise the array is constructed with the arguments in it 57 return new (exec) JSArray(exec, exec->lexicalGlobalObject()->array Prototype(), args);56 return new (exec) JSArray(exec, exec->lexicalGlobalObject()->arrayStructure(), args); 58 57 } 59 58
Note:
See TracChangeset
for help on using the changeset viewer.