mirror of
https://github.com/denoland/deno.git
synced 2024-12-23 07:44:48 -05:00
Fix: take control buffer offset/length into account again (#3769)
This commit is contained in:
parent
9f1e4237a5
commit
a6a7253df9
1 changed files with 4 additions and 1 deletions
|
@ -396,8 +396,11 @@ fn send(
|
|||
|
||||
let control = match v8::Local::<v8::ArrayBufferView>::try_from(args.get(1)) {
|
||||
Ok(view) => {
|
||||
let byte_offset = view.byte_offset();
|
||||
let byte_length = view.byte_length();
|
||||
let backing_store = view.buffer().unwrap().get_backing_store();
|
||||
unsafe { &**backing_store.get() }
|
||||
let buf = unsafe { &**backing_store.get() };
|
||||
&buf[byte_offset..byte_offset + byte_length]
|
||||
}
|
||||
Err(..) => &[],
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue