Changeset 20310 in webkit for trunk/JavaScriptCore/kjs/nodes.cpp
- Timestamp:
- Mar 18, 2007, 10:43:47 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/nodes.cpp
r20291 r20310 446 446 array = static_cast<JSObject*>(element->evaluate(exec)); 447 447 KJS_CHECKEXCEPTIONVALUE 448 length = opt ? array->get(exec, lengthPropertyName)->toInt32(exec) : 0;448 length = opt ? array->get(exec, exec->propertyNames().length)->toInt32(exec) : 0; 449 449 } else { 450 450 JSValue *newArr = exec->lexicalInterpreter()->builtinArray()->construct(exec,List::empty()); … … 454 454 455 455 if (opt) 456 array->put(exec, lengthPropertyName, jsNumber(elision + length), DontEnum | DontDelete);456 array->put(exec, exec->propertyNames().length, jsNumber(elision + length), DontEnum | DontDelete); 457 457 458 458 return array; … … 2370 2370 2371 2371 JSObject *proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty()); 2372 proto->put(exec, constructorPropertyName, func, ReadOnly|DontDelete|DontEnum);2373 func->put(exec, prototypePropertyName, proto, Internal|DontDelete);2372 proto->put(exec, exec->propertyNames().constructor, func, ReadOnly | DontDelete | DontEnum); 2373 func->put(exec, exec->propertyNames().prototype, proto, Internal|DontDelete); 2374 2374 2375 2375 int plen = 0; … … 2377 2377 func->addParameter(p->ident()); 2378 2378 2379 func->put(exec, lengthPropertyName, jsNumber(plen), ReadOnly|DontDelete|DontEnum);2379 func->put(exec, exec->propertyNames().length, jsNumber(plen), ReadOnly|DontDelete|DontEnum); 2380 2380 2381 2381 // ECMA 10.2.2 … … 2416 2416 } 2417 2417 2418 FunctionImp *func = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain());2419 JSObject *proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty());2420 proto->put(exec, constructorPropertyName, func, ReadOnly|DontDelete|DontEnum);2421 func->put(exec, prototypePropertyName, proto, Internal|DontDelete);2418 FunctionImp* func = new DeclaredFunctionImp(exec, ident, body.get(), context->scopeChain()); 2419 JSObject* proto = exec->lexicalInterpreter()->builtinObject()->construct(exec, List::empty()); 2420 proto->put(exec, exec->propertyNames().constructor, func, ReadOnly | DontDelete | DontEnum); 2421 func->put(exec, exec->propertyNames().prototype, proto, Internal | DontDelete); 2422 2422 2423 2423 int plen = 0;
Note:
See TracChangeset
for help on using the changeset viewer.