Skip to content

[browser][bindings] "Object '...' is not a typed array" in js_typed_array_to_array. #46624

@kjpou1

Description

@kjpou1
public static int TestSum(SharedArrayBuffer sharedArrayBuffer)
{
    Int32Array array = new Int32Array(sharedArrayBuffer);
    Span<int> nativeArray = array; // error                        
    
    int sum = 0;
    for (int i = 0; i < nativeArray.Length; i++)
    {
        sum += nativeArray[i];
    }

    return sum;
}

Fails with "Object '...' is not a typed array" in js_typed_array_to_array.

Originally reported here: #46016

This can reliably be reproduced and changes will be coming soon.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions