[WebNN] Fix DCHECK(!isShared())
failure of reading MLTensor
There is a DCHECK(!isShared())
failure when trying to read MLTensor
to a shared array buffer. This CL uses ByteSpanMaybeShared()
instead
of ByteSpan()
for both DOMArrayBufferBase
and DOMArrayBufferView
to read MLTensor on blink side to fix this issue, and also expands the
existing tests to verify this fix.
Bug: 373168867
Change-Id: Id5f68bd0479d9d870550a2b091ef8affdb690c83
Cq-Include-Trybots: luci.chromium.try:win11-blink-rel, mac14.arm64-blink-rel, mac14-blink-rel, mac15.arm64-blink-rel, mac15-blink-rel, linux-blink-rel
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5936137
Reviewed-by: ningxin hu ningxin.hu@intel.com
Commit-Queue: Mingming1 Xu mingming1.xu@intel.com
Reviewed-by: Reilly Grant reillyg@chromium.org
Cr-Commit-Position: refs/heads/main@{#1375715}