ByteArray.toString stops working correctly after a while.
Consider for example:
const ByteArray = imports.byteArray;
function foo() {
return ByteArray.fromArray([104, 101, 108, 108, 111, 32, 116, 104, 101, 114, 101]).toString();
}
for (var i=0; i != 400; ++i) {
log(foo());
}
Expected output:
JS LOG: hello there
...
JS LOG: hello there
Actual output:
JS LOG: hello there
...
JS LOG: hello there
JS LOG: [object ByteArray]
....
JS LOG: [object ByteArray]
I can reproduce this on both gjs 1.50.2 and freshly built gjs (with jhbuild).