Skip to content

Jphillips/v8 15.6 compat - #7676

Merged
jp4a50 merged 2 commits into
mainfrom
jphillips/v8-15.6-compat
Oct 9, 2026
Merged

jp4a50 merged 2 commits into
mainfrom
jphillips/v8-15.6-compat

Conversation

@jp4a50

@jp4a50 jp4a50 commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

This supercedes #7570 so we can merge the workerd V8 update independently.

Bump V8 from 15.5.35.7 to 15.6.75 and rebase our V8 patches onto it. Add 0044, which disables metagen instance types in the Bazel build.

Since V8 15.6, new Function() with no arguments passes isCodeLike = false to the code generation callback, and V8 also reports each object argument before converting it to a string. The empty-function allowance in modifyCodeGenCallback therefore now matches on the exact synthesized source alone. setup-test covers new Function(''), which is now allowed, and an object argument, which stays blocked.

Bridge V8 API differences so this branch builds against either V8 version, letting workerd main adopt it before V8 is rolled internally.

Bump V8 from 15.5.35.7 to 15.6.75 and rebase our V8 patches onto
it. Extend 0043 to also disable metagen instance types in the Bazel
build, since V8 15.6 enables them by default.

Since V8 15.6, new Function() with no arguments passes isCodeLike =
false to the code generation callback, and V8 also reports each
object argument before converting it to a string. The empty-function
allowance in modifyCodeGenCallback therefore now matches on the exact
synthesized source alone. setup-test covers new Function(''), which
is now allowed, and an object argument, which stays blocked.

V8 15.6 deprecates FunctionCallbackInfo::Data() in favor of
DataV2(), which returns a v8::Data. Switch our callbacks to
DataV2().As<v8::Value>(), since clang-tidy treats the deprecation
warning as an error.

V8 15.6 also deprecates the V2 continuation-preserved embedder data
accessors, which are now plain aliases. Call the unsuffixed
Get/SetContinuationPreservedEmbedderData() instead.

Standard API audit: V8 15.6.75 enables no new standard API by
default, so this update disables none and needs no compatibility
flag. V8's shipped feature list (src/flags/feature-flags.h) gains
only homomorphic_ic, an internal IC optimization. Wasm
wide_arithmetic moves from pre-staged to staged and stays off. No
flag default changes to enable a feature, and
src/init/bootstrapper.cc and src/builtins/builtins-definitions.h are
unchanged from 15.5.35.7. The only newly installed function,
Sandbox.getMetadata, belongs to V8's sandbox testing API, which
workerd does not enable. Import text shipped before 15.6 and stays
disabled with --nojs-import-text.

Generated by the V8 nightly (ci/v8-nightly).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jp4a50
jp4a50 requested a review from csjh October 9, 2026 14:43
@jp4a50
jp4a50 requested review from a team as code owners October 9, 2026 14:43
@ask-bonk

ask-bonk Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Since last review: 0 resolved, 1 still open, 0 new.

The latest commit only reformats the V8 callback-data bridge in function.h.


Reviewed commit: a3dcd748 · github run

Comment thread src/workerd/jsg/setup.c++
Bridge V8 API differences so this branch builds against either
V8 version, letting workerd main adopt it before V8 is rolled
internally.

- FunctionCallbackInfo::DataV2() does not exist in V8 15.5;
  gate all six call sites behind #if V8_MINOR_VERSION >= 6.
- modifyCodeGenCallback: keep the isCodeLike guard on 15.5
  (where it distinguishes new Function() from eval); use the
  exact source-string match alone on 15.6 (where isCodeLike
  is false for both paths). Fix the comment accordingly.
- Add version-conditional tests for new Function(''), eval of
  the fixed empty-function source, and object arguments.
@jp4a50
jp4a50 force-pushed the jphillips/v8-15.6-compat branch from b14b610 to a3dcd74 Compare October 9, 2026 14:49
@jp4a50
jp4a50 merged commit e3449da into main Oct 9, 2026
45 of 47 checks passed
@jp4a50
jp4a50 deleted the jphillips/v8-15.6-compat branch October 9, 2026 16:09
@jp4a50 jp4a50 mentioned this pull request Oct 9, 2026
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