From:  Emilio Cobos Álvarez <emilio@crisal.io>
Date:  25 Mar 2019 16:38:24 Hong Kong Time
Newsgroup:  news.mozilla.org/mozilla.dev.tech.js-engine.internals
Subject:  

Re: How to reliably make an ArrayBufferView wrapped?

NNTP-Posting-Host:  63.245.210.105

+dev-tech-js-engine-internals, where relevant people are more likely to
see it :)

On 25/03/2019 09:22, violet.bugreport@gmail.com wrote:
> When solving this bug https://phabricator.services.mozilla.com/D24009. I need to write a test. The bug is basically caused by overlooking the possible wrapper around an ArrayBufferView that is checked by JS_IsArrayBufferViewObject().
> 
> See https://searchfox.org/mozilla-central/source/js/src/vm/ArrayBufferViewObject.cpp#164, the check will return true if canUnwrapAs(), it's possible that the object itself is not an ArrayBufferView.
> 
> In the test, I want to make sure the object is indeed a wrapped one. Is there a reliable way to write JavaScript code to achieve this?
> 
> Thanks!
> _______________________________________________
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>