Skip to content

Commit

Permalink
Remove redundant check for SUPPORT_BASE64_EMBEDDING in getWasmBinary.…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
sbc100 authored Jan 24, 2025
1 parent 6870ed4 commit 73ebb91
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 1 addition & 5 deletions src/preamble.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
52739
52732
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size_no_asserts.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
28487
28480
2 changes: 1 addition & 1 deletion test/other/test_unoptimized_code_size_strict.js.size
Original file line number Diff line number Diff line change
@@ -1 +1 @@
51522
51515

0 comments on commit 73ebb91

Please sign in to comment.