Skip to content

Bump JsRuntimeHost to cb988ba - #1848

Merged
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:jsrh-bump-cb988ba
Aug 24, 2026
Merged

Bump JsRuntimeHost to cb988ba#1848
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:jsrh-bump-cb988ba

Conversation

@bkaradzic-microsoft

Copy link
Copy Markdown
Member

Moves the JsRuntimeHost pin from 9271f13 (2026-07-28) to cb988ba, which is current JsRuntimeHost master. That picks up three fixes:

Validation

Windows/x64, RelWithDebInfo, MSVC 14.44 — run against both engines whose N-API ports these fixes touch:

Engine UnitTests Validation sweep Peak
V8 21/21 ran=305 passed=305 failed=0 2598 MB
QuickJS 21/21 ran=305 passed=305 failed=0 1910 MB

To be clear about what this does and does not buy: the bump is behaviour-neutral on this suite. A same-tree V8 baseline on the old pin also measured 305/305 at 2558 MB, so the promise leak is not large enough to surface over 305 tests. The value here is the three correctness fixes, not a measurable win on the current suite.

It does matter at larger scale. On the NativeDawn branch, whose sweep runs 632 tests, the same pin difference is the gap between the sweep completing at ~5.4 GB and aborting partway through at ~12.1 GB.

Picks up three fixes that have landed on JsRuntimeHost master since the
current pin (9271f13, 2026-07-28):

  BabylonJS#223 keep escaped handles alive when their escapable scope closes
  BabylonJS#225 QuickJS: report success from the napi_throw family
  BabylonJS#227 fix V8 N-API leaking every promise ever created

Validated on Windows/x64 RelWithDebInfo against both engines whose N-API
ports these fixes touch:

  V8       UnitTests 21/21, validation sweep ran=305 passed=305, peak 2598 MB
  QuickJS  UnitTests 21/21, validation sweep ran=305 passed=305, peak 1910 MB

The bump is behaviour-neutral on this suite; a same-tree V8 baseline on
the old pin also measured 305/305 at 2558 MB, so the promise leak is not
large enough to show up over 305 tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 88569c10-a7ff-4373-9a58-afa9c68b8c09
Copilot AI lite review requested due to automatic review settings August 24, 2026 18:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the BabylonNative build to pull a newer pinned revision of the external JsRuntimeHost dependency, bringing in upstream correctness fixes (escaped handle lifetime, QuickJS napi_throw* success reporting, and a V8 N-API promise leak fix).

Changes:

  • Bumps the FetchContent_Declare(JsRuntimeHost) GIT_TAG in the top-level CMake configuration from 9271f13... to cb988ba....

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@bghgary bghgary left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[Reviewed by Copilot on behalf of @bghgary]

LGTM

@bkaradzic-microsoft
bkaradzic-microsoft merged commit e748ec4 into BabylonJS:master Aug 24, 2026
34 checks passed
bkaradzic-microsoft pushed a commit to bkaradzic-microsoft/BabylonNative that referenced this pull request Aug 24, 2026
Conflicts resolved in favour of the shotgun branch in every case:

CMakeLists.txt - BabylonJS#1848 bumps JsRuntimeHost to cb988ba. shotgun points at
the bkaradzic-microsoft fork's shotgun branch instead, which already
contains cb988ba as an ancestor, so keeping our pin loses nothing.

Polyfills/Canvas/Source/Context.h - upstream's State struct declares
globalAlpha as double, but Context.cpp assigns static_cast<float>(alpha)
into it and passes it straight to nvgGlobalAlpha(float). shotgun's float
is consistent with both the cast and nanovg's own type.

Polyfills/Canvas/Source/Context.cpp - three hunks, all cases where
upstream carries an earlier revision of work that shotgun has since
superseded:
  - fill/strokeStyle gradients: shotgun uses CanvasGradient::TryUnwrap and
    throws a JS TypeError when the style is neither a colour string nor a
    gradient; upstream's Unwrap dereferences null there.
  - MeasureText: upstream returns synthesised Arial metrics whenever the
    requested family is not loaded. shotgun instead binds the face
    FillText will actually use and measures that, falling back to
    synthesised metrics only when no face is available at all, so the
    metrics describe the font that gets drawn.
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.

4 participants