Skip to content

Fix missing closing parentheses under GL_DEBUG - #27517

Merged
sbc100 merged 2 commits into
emscripten-core:mainfrom
kleisauke:fix-invalid-js
Aug 12, 2026
Merged

Fix missing closing parentheses under GL_DEBUG#27517
sbc100 merged 2 commits into
emscripten-core:mainfrom
kleisauke:fix-invalid-js

Conversation

@kleisauke

Copy link
Copy Markdown
Collaborator

No description provided.

@kleisauke

Copy link
Copy Markdown
Collaborator Author

Context: #27503 (comment).

@sbc100

sbc100 commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Is there a test that we can add GL_DEBUG to catch this?

@sbc100 sbc100 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm w/test

@kleisauke

Copy link
Copy Markdown
Collaborator Author

Added a regression test in commit b1e1b9b that previously failed with:

Details
$ ./test/runner browser.test_webgl_preprocessor_variables*
Running 4 tests
Using 2 parallel test processes
...
======================================================================
FAIL: test_webgl_preprocessor_variables_webgl2_extensions (test_browser.browser.test_webgl_preprocessor_variables_webgl2_extensions)
----------------------------------------------------------------------
...

Stdout:

error: /home/kleisauke/emscripten/src/lib/libwebgl.js: failure to execute JS library "/home/kleisauke/emscripten/src/lib/libwebgl.js":
error: /home/kleisauke/emscripten/src/lib/libwebgl.js: use -sVERBOSE to save preprocessed JS
Internal compiler error JS compiler
Please create a bug report at https://github.com/emscripten-core/emscripten/issues/
with a log of the build and the input files used to run. Exception message: "/home/kleisauke/emscripten/src/lib/libwebgl.preprocessed.js:1787
    dbg(`Shader source after preprocessing: ${source}`;
                                                    ^^

SyntaxError: missing ) after argument list
...

======================================================================
FAIL: test_webgl_preprocessor_variables_webgl1_extensions (test_browser.browser.test_webgl_preprocessor_variables_webgl1_extensions)
----------------------------------------------------------------------
...

Stdout:

error: /home/kleisauke/emscripten/src/lib/libwebgl.js: failure to execute JS library "/home/kleisauke/emscripten/src/lib/libwebgl.js":
error: /home/kleisauke/emscripten/src/lib/libwebgl.js: use -sVERBOSE to save preprocessed JS
Internal compiler error JS compiler
Please create a bug report at https://github.com/emscripten-core/emscripten/issues/
with a log of the build and the input files used to run. Exception message: "/home/kleisauke/emscripten/src/lib/libwebgl.preprocessed.js:1570
    dbg(`Shader source after preprocessing: ${source}`;
                                                    ^^

SyntaxError: missing ) after argument list
...

----------------------------------------------------------------------
Ran 4 tests in 1.916s

FAILED (failures=2)
Total core time: 2.622s. Wallclock time: 1.916s. Parallelization: 1.37x.

@sbc100
sbc100 merged commit 9d9c257 into emscripten-core:main Aug 12, 2026
41 checks passed
@kleisauke
kleisauke deleted the fix-invalid-js branch August 12, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants