From 76e37dbecae842b0abac76a90ba67a5b059edcfd Mon Sep 17 00:00:00 2001 From: Mihail Stoykov Date: Thu, 3 Aug 2023 10:22:27 +0300 Subject: [PATCH] Speed up getting SharedArray items out --- js/modules/k6/data/share.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/modules/k6/data/share.go b/js/modules/k6/data/share.go index 828726cc38f..2d8345a0234 100644 --- a/js/modules/k6/data/share.go +++ b/js/modules/k6/data/share.go @@ -75,7 +75,7 @@ func (s wrappedSharedArray) deepFreeze(rt *goja.Runtime, val goja.Value) error { if o == nil { return nil } - for _, key := range o.Keys() { + for _, key := range o.Prototype().Keys() { prop := o.Get(key) if prop != nil { // isFrozen returns true for all non objects so it we don't need to check that