mirror of
https://github.com/gorhill/uBlock.git
synced 2025-01-31 12:11:36 +01:00
Fix deserialization of ArrayBuffer shared by multiple TypedArrays
Deserialization failed to restore proper ArrayBuffer when used by multiple TypedArrays. This didn't affect uBO since this specific code path was never taken.
This commit is contained in:
parent
4015e7f772
commit
c92a518218
@ -851,10 +851,11 @@ const _deserialize = ( ) => {
|
||||
case I_DATAVIEW: {
|
||||
const byteOffset = deserializeLargeUint();
|
||||
const length = deserializeLargeUint();
|
||||
const ref = refCounter++;
|
||||
const arrayBuffer = _deserialize();
|
||||
const ctor = toArrayBufferViewConstructor[`${type}`];
|
||||
const out = new ctor(arrayBuffer, byteOffset, length);
|
||||
readRefs.set(refCounter++, out);
|
||||
readRefs.set(ref, out);
|
||||
return out;
|
||||
}
|
||||
default:
|
||||
|
Loading…
x
Reference in New Issue
Block a user