mirror of https://github.com/golang/go.git
Merge 71147fd7a9 into 49cdf0c42e
This commit is contained in:
commit
73c822743f
|
|
@ -414,7 +414,7 @@ func storeArgs(args []any, argValsDst []Value, argRefsDst []ref) {
|
|||
// It panics if v is not a JavaScript object.
|
||||
func (v Value) Length() int {
|
||||
if vType := v.Type(); !vType.isObject() {
|
||||
panic(&ValueError{"Value.SetIndex", vType})
|
||||
panic(&ValueError{"Value.Length", vType})
|
||||
}
|
||||
r := valueLength(v.ref)
|
||||
runtime.KeepAlive(v)
|
||||
|
|
|
|||
Loading…
Reference in New Issue