Method
newTemplatedArrayObject
(tmpl *objectTemplate, obj *Object)
Source from the content-addressed store, hash-verified
| 359 | } |
| 360 | |
| 361 | func (r *Runtime) newTemplatedArrayObject(tmpl *objectTemplate, obj *Object) *templatedArrayObject { |
| 362 | if obj == nil { |
| 363 | obj = &Object{runtime: r} |
| 364 | } |
| 365 | o := &templatedArrayObject{ |
| 366 | templatedObject: templatedObject{ |
| 367 | baseObject: baseObject{ |
| 368 | class: classArray, |
| 369 | val: obj, |
| 370 | extensible: true, |
| 371 | }, |
| 372 | tmpl: tmpl, |
| 373 | }, |
| 374 | } |
| 375 | obj.self = o |
| 376 | o.init() |
| 377 | return o |
| 378 | } |
| 379 | |
| 380 | func (a *templatedArrayObject) getLenProp() *valueProperty { |
| 381 | lenProp, _ := a.getOwnPropStr("length").(*valueProperty) |
Tested by
no test coverage detected