From 73ebb91029948e62b3a4cea9ccc8db2dd87162b5 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 24 Jan 2025 14:55:01 -0800 Subject: [PATCH] Remove redundant check for SUPPORT_BASE64_EMBEDDING in getWasmBinary. NFC (#23491) This block of code is withing `!SINGLE_FILE` but `SUPPORT_BASE64_EMBEDDING` is only ever defined when `SINGLE_FILE` is enabled. In the past I think `SUPPORT_BASE64_EMBEDDING` may have been defined under more circumstances? The codesize changes are just white-space only changes in the un-optimized output. --- src/preamble.js | 6 +----- test/other/test_unoptimized_code_size.js.size | 2 +- test/other/test_unoptimized_code_size_no_asserts.js.size | 2 +- test/other/test_unoptimized_code_size_strict.js.size | 2 +- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/preamble.js b/src/preamble.js index 07ca2915f5931..fb62ee4b609ae 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -627,11 +627,7 @@ function getBinarySync(file) { async function getWasmBinary(binaryFile) { #if !SINGLE_FILE // If we don't have the binary yet, load it asynchronously using readAsync. - if (!wasmBinary -#if SUPPORT_BASE64_EMBEDDING - || isDataURI(binaryFile) -#endif - ) { + if (!wasmBinary) { // Fetch the binary using readAsync try { var response = await readAsync(binaryFile); diff --git a/test/other/test_unoptimized_code_size.js.size b/test/other/test_unoptimized_code_size.js.size index a9abb660fbe9c..3922a28d5c755 100644 --- a/test/other/test_unoptimized_code_size.js.size +++ b/test/other/test_unoptimized_code_size.js.size @@ -1 +1 @@ -52739 +52732 diff --git a/test/other/test_unoptimized_code_size_no_asserts.js.size b/test/other/test_unoptimized_code_size_no_asserts.js.size index 918c9c91947b0..77da3da6997d3 100644 --- a/test/other/test_unoptimized_code_size_no_asserts.js.size +++ b/test/other/test_unoptimized_code_size_no_asserts.js.size @@ -1 +1 @@ -28487 +28480 diff --git a/test/other/test_unoptimized_code_size_strict.js.size b/test/other/test_unoptimized_code_size_strict.js.size index 8a03cbf8f27f0..1f670c115679b 100644 --- a/test/other/test_unoptimized_code_size_strict.js.size +++ b/test/other/test_unoptimized_code_size_strict.js.size @@ -1 +1 @@ -51522 +51515