Skip to content

Bump UrlLib pin to include client-side-failure fixes#168

Merged
bkaradzic-microsoft merged 1 commit into
BabylonJS:mainfrom
bkaradzic-microsoft:bump-urllib-pin
May 14, 2026
Merged

Bump UrlLib pin to include client-side-failure fixes#168
bkaradzic-microsoft merged 1 commit into
BabylonJS:mainfrom
bkaradzic-microsoft:bump-urllib-pin

Conversation

@bkaradzic-microsoft
Copy link
Copy Markdown
Contributor

Picks up UrlLib #28 so consumers (including BabylonNative) get the client-side-failure fixes:

  • ImplBase::ResetForOpen() clears m_statusCode, m_responseUrl, m_responseString, m_headers between Open() calls on all 5 platforms (Win32, UWP, Unix, Apple, Android).
  • Unix PerformAsync no longer lets curl_check exceptions escape std::thread -> std::terminate; falls back to status=0 + loadend like Win32/UWP.
  • Apple Open no longer throws synchronously when [NSBundle pathForResource:] returns nil for missing local files; sets m_url = nil and lets the existing SendAsync branch return status=0.

This is a pin-bump only: no source changes in JsRuntimeHost itself.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

Copilot AI review requested due to automatic review settings May 14, 2026 17:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps the UrlLib dependency pin in CMakeLists.txt to a newer commit that includes client-side-failure fixes (state reset between Open() calls, safer Unix PerformAsync exception handling, and non-throwing Apple Open for missing local files). It is a pin-bump only with no source changes in JsRuntimeHost itself.

Changes:

  • Update the UrlLib GIT_TAG in FetchContent_Declare to commit 4452b7eded1e315a5f329c390db71ec863d3e3e8.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@bkaradzic-microsoft
Copy link
Copy Markdown
Contributor Author

UWP failures here (4 jobs) are a bug in #28 that wasn't caught by UrlLib's own CI: Open() calls m_fileResponseBuffer.clear() unconditionally, but the member is only declared on Win32 desktop. Fix is one #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) guard: UrlLib #29. Once that lands I'll bump this PR's pin to its merge commit.

bkaradzic-microsoft added a commit to BabylonJS/UrlLib that referenced this pull request May 14, 2026
…ON_DESKTOP (#29)

Follow-up to #28: the unconditional `m_fileResponseBuffer.clear()` call
added to `Open()` in `UrlRequest_Windows_Shared.h` references a member
that only exists on Win32 desktop. UWP builds fail with:

```
UrlRequest_Windows_Shared.h(51,13): error C2065: 'm_fileResponseBuffer': undeclared identifier
  (compiling source file '../../_deps/urllib-src/Source/UrlRequest_UWP.cpp')
```

Spotted by [JsRuntimeHost
#168](BabylonJS/JsRuntimeHost#168) CI (4 UWP
build jobs failing: `UWP_x64_Chakra`, `UWP_x64_JSI`, `UWP_x64_V8`,
`UWP_arm64_JSI`).

The member declaration at line 150 of the same header is already gated
by `#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)`. The fix is
to apply the same guard around the `clear()` call so it only fires on
desktop.

After this, `JsRuntimeHost #168` (UrlLib pin bump) goes green on UWP.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Picks up:
- UrlLib BabylonJS#28: client-side-failure fixes (Unix worker thread no longer terminates on missing local files; Apple Open no longer throws synchronously on missing app:/// paths) plus per-request response state reset hoisted to ImplBase::ResetForOpen().
- UrlLib BabylonJS#29: UWP build fix (guard the new m_fileResponseBuffer.clear() call with WINAPI_PARTITION_DESKTOP).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bkaradzic-microsoft bkaradzic-microsoft merged commit 1e9b17e into BabylonJS:main May 14, 2026
44 of 45 checks passed
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.

3 participants