mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-17 19:19:47 +00:00
Enable address sanitizer
This commit is contained in:
@@ -12,5 +12,6 @@ export async function decode(data: ArrayBuffer): Promise<ImageData> {
|
||||
if (!result) {
|
||||
throw new Error('Decoding error');
|
||||
}
|
||||
module.doLeakCheck();
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ export async function encode(data: ImageData, options: EncodeOptions): Promise<A
|
||||
if (!result) {
|
||||
throw new Error('Encoding error');
|
||||
}
|
||||
module.doLeakCheck();
|
||||
|
||||
// wasm can’t run on SharedArrayBuffers, so we hard-cast to ArrayBuffer.
|
||||
return result.buffer as ArrayBuffer;
|
||||
|
||||
Reference in New Issue
Block a user