fix: ensure WebGL→WASM fallback catches synchronous throws#86
Merged
devlux76 merged 2 commits intorefactor/lib-ui-structurefrom Mar 14, 2026
Merged
fix: ensure WebGL→WASM fallback catches synchronous throws#86devlux76 merged 2 commits intorefactor/lib-ui-structurefrom
devlux76 merged 2 commits intorefactor/lib-ui-structurefrom
Conversation
…us throws for WASM fallback Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [WIP] Address feedback from review on core engine and harness refactor
fix: ensure WebGL→WASM fallback catches synchronous throws
Mar 14, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the WebGL→WASM fallback in createVectorBackend so that a synchronous throw from WebGlVectorBackend.create() is properly caught and triggers the WASM fallback, rather than escaping the promise chain.
Changes:
- Wraps
WebGlVectorBackend.create()inside.then()instead of passing it directly toPromise.resolve(), ensuring synchronous throws become promise rejections.
devlux76
added a commit
that referenced
this pull request
Mar 14, 2026
* refactor: move core engine code into lib/ and runtime harness into ui/ * fix: update test results to reflect failure status and record failed test IDs * fix: add unzip package to Dockerfile dependencies * fix: ensure WebGL→WASM fallback catches synchronous throws (#86) * Initial plan * fix: wrap WebGlVectorBackend.create() in .then() to capture synchronous throws for WASM fallback Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: devlux76 <86517969+devlux76@users.noreply.github.com> --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promise.resolve(WebGlVectorBackend.create())evaluatescreate()synchronously before the promise is constructed — a synchronous throw escapes the promise chain entirely, making the.catch()WASM fallback dead code.Change
Wrap the call in
.then()so any synchronous throw is captured as a rejection:This aligns the WebGL path with how the WebGPU and WebNN paths already handle async creation and fallback.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.