contextify: use offset/length from Uint8Array
Do not blindly take data from underlying ArrayBuffer
, use
ByteOffset
/ByteLength
of Uint8Array
itself.
Additionally, fix tests that weren't actually properly running because of V8's internal code cache. The code should be different, otherwise the cached data won't be used at all.
Fix: #4939 (closed)
R = @nodejs/v8 or @trevnorris