Skip to content

Upgrade WebKit to 5b194ac887f2 - #26352

Closed
robobun wants to merge 2 commits into
mainfrom
claude/webkit-upgrade-5b194ac887f2
Closed

robobun wants to merge 2 commits into
mainfrom
claude/webkit-upgrade-5b194ac887f2

Conversation

@robobun

@robobun robobun commented Jan 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Upgrade WebKit to latest upstream (5b194ac887f29e2a222e2b3fd97e1378ba4f0298)
  • Fix build issues for local WebKit builds

WebKit Changes Summary

Notable Changes

  • bmalloc -> mimalloc migration: Major allocator change in upstream (disabled for Bun since we use our own mimalloc)
  • B3 compiler: Removed linear scan register allocator (greedy allocator is now the only option)
  • 2.6x faster [...set] spread optimization by Sosuke Suzuki (Bun)
  • 2.5x faster Array.prototype.slice on ScopedArguments by Sosuke Suzuki (Bun)
  • String constant folding: String.fromCharCode and String.prototype.codePointAt now constant-folded in DFG/FTL

Bug Fixes Included

  • RegExp.prototype[Symbol.split] incorrectly used fast path when limit is not a number
  • TypedArray.prototype.subarray calculated beginByteOffset incorrectly
  • WASM debugger: Fixed deadlock during thread suspension
  • DFG: Fixed ValueRep reduction preserving speculation checks

Build Changes (this PR)

  • Removed DerivedSources/inspector from include paths (headers already in PrivateHeaders/JavaScriptCore)
  • Don't define USE_MIMALLOC when building with WEBKIT_LOCAL (avoids macro redefinition)
  • WebKit's build.ts updated to disable USE_MIMALLOC (Bun uses its own mimalloc)

Test plan

  • Built WebKit with bun build.ts debug
  • Built Bun with bun run build:local
  • Verified basic functionality (bun-debug --print '42')

🤖 Generated with Claude Code

Updates WEBKIT_VERSION to latest upstream merge.

Changes to local WebKit build support:
- Removed DerivedSources/inspector from include paths (headers already
  in PrivateHeaders/JavaScriptCore, including both caused redefinition
  errors)
- Don't define USE_MIMALLOC when building with WEBKIT_LOCAL (WebKit's
  cmakeconfig.h already defines it)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@robobun

robobun commented Jan 22, 2026 •

Copy link
Copy Markdown
Collaborator Author
Updated 9:11 PM PT - Jan 21st, 2026

❌ Your commit a011c82c has 1 failures in Build #35571 (All Failures):


🧪   To try this PR locally:

bunx bun-pr 26352

That installs a local version of the PR into your bun-26352 executable, so you can run:

bun-26352 --bun

@coderabbitai

coderabbitai Bot commented Jan 22, 2026 •

Copy link
Copy Markdown
Contributor

Walkthrough

Build system tweaks: BuildBun.cmake now conditionally defines USE_MIMALLOC=1 only when WEBKIT_LOCAL is not set; SetupWebKit.cmake updates the default WEBKIT_VERSION hash and removes the inspector DerivedSources include from WEBKIT_LOCAL include paths.

Changes

Cohort / File(s) Summary
BuildBun.cmake conditional allocator
cmake/targets/BuildBun.cmake
USE_MIMALLOC=1 compilation definition is now wrapped with a NOT WEBKIT_LOCAL check to avoid macro redefinition when WEBKIT_LOCAL is set. Comment added explaining rationale.
WebKit setup and include paths
cmake/tools/SetupWebKit.cmake
Updated default WEBKIT_VERSION commit hash; removed ${WEBKIT_PATH}/JavaScriptCore/DerivedSources/inspector from WEBKIT_LOCAL include_directories and added comment noting inspector headers are provided via PrivateHeaders/JavaScriptCore.

Possibly related PRs

Suggested reviewers

  • Jarred-Sumner
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Upgrade WebKit to 5b194ac887f2' accurately describes the main objective of the pull request, which is to upgrade WebKit to a specific upstream commit version.
Description check ✅ Passed The pull request description is comprehensive and well-structured, covering what the PR does, test verification, and detailed changes. However, it does not follow the repository's required template structure with the exact sections 'What does this PR do?' and 'How did you verify your code works?'

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

zhcndoc-bot pushed a commit to zhcndoc/bun that referenced this pull request Apr 14, 2026
Bumps WebKit from `42f80a684c5d` → `b39129e720d3` (15 commits).


oven-sh/WebKit@42f80a6...b39129e

| Commit | Message |
|---|---|
| 24d76be9b327 | Windows: fix resource exhaustion in libpas/WTF |
| e38dd2fc34a0 | pas_page_malloc: optimistic single-call commit/decommit
on Windows |
| 61c73c25601c | libpas: fix 8 memory-accounting bugs found via
adversarial sweep |
| 617c2ba416b9 | libpas: add embedder thread-suspension callback and
enable Linux TLC decommit |
| 98dc8d6eb9dc | WTF: install pas_thread_suspender on Linux, wrapping
Thread::suspend/resume |
| 68e2ebfa862f | Restore do_mprotect gate in decommit_impl on Windows |
| d8d42dd398d9 | ThreadingPOSIX: avoid allocation in Thread::suspend's
self-check assertion |
| 9c8ba3a07c81 | Revert FlsAlloc — TLC destructor crashes on Windows
thread exit |
| 4596a6f61d01 | libpas: use is_exiting flag instead of (void*)1
sentinel for TLC teardown |
| ebf11e28e73e | pas_thread: fix pthread_once on Windows |
| 98ceda0246f4 | OSAllocatorPOSIX: madvise advice is an enum, not a
bitmask |
| 7d4f81658658 | pas_scavenger: also decommit TLCs on the last-chance
tick before deep sleep |
| b39129e720d3 | ThreadingPOSIX: retry sem_wait on EINTR |

Closes oven-sh/bun#26352
Closes oven-sh/bun#26661
Closes oven-sh/bun#27972
Closes oven-sh/bun#26842
Closes oven-sh/bun#23635
Closes oven-sh/bun#22363

Fixes oven-sh/bun#20422
Fixes oven-sh/bun#26982
structwafel pushed a commit to structwafel/bun that referenced this pull request Apr 25, 2026
…9281)

Bumps WebKit from `42f80a684c5d` → `b39129e720d3` (15 commits).


oven-sh/WebKit@42f80a6...b39129e

| Commit | Message |
|---|---|
| 24d76be9b327 | Windows: fix resource exhaustion in libpas/WTF |
| e38dd2fc34a0 | pas_page_malloc: optimistic single-call commit/decommit
on Windows |
| 61c73c25601c | libpas: fix 8 memory-accounting bugs found via
adversarial sweep |
| 617c2ba416b9 | libpas: add embedder thread-suspension callback and
enable Linux TLC decommit |
| 98dc8d6eb9dc | WTF: install pas_thread_suspender on Linux, wrapping
Thread::suspend/resume |
| 68e2ebfa862f | Restore do_mprotect gate in decommit_impl on Windows |
| d8d42dd398d9 | ThreadingPOSIX: avoid allocation in Thread::suspend's
self-check assertion |
| 9c8ba3a07c81 | Revert FlsAlloc — TLC destructor crashes on Windows
thread exit |
| 4596a6f61d01 | libpas: use is_exiting flag instead of (void*)1
sentinel for TLC teardown |
| ebf11e28e73e | pas_thread: fix pthread_once on Windows |
| 98ceda0246f4 | OSAllocatorPOSIX: madvise advice is an enum, not a
bitmask |
| 7d4f81658658 | pas_scavenger: also decommit TLCs on the last-chance
tick before deep sleep |
| b39129e720d3 | ThreadingPOSIX: retry sem_wait on EINTR |

Closes oven-sh#26352
Closes oven-sh#26661
Closes oven-sh#27972
Closes oven-sh#26842
Closes oven-sh#23635
Closes oven-sh#22363

Fixes oven-sh#20422
Fixes oven-sh#26982
xhjkl pushed a commit to xhjkl/bun that referenced this pull request May 14, 2026
…9281)

Bumps WebKit from `42f80a684c5d` → `b39129e720d3` (15 commits).


oven-sh/WebKit@42f80a6...b39129e

| Commit | Message |
|---|---|
| 24d76be9b327 | Windows: fix resource exhaustion in libpas/WTF |
| e38dd2fc34a0 | pas_page_malloc: optimistic single-call commit/decommit
on Windows |
| 61c73c25601c | libpas: fix 8 memory-accounting bugs found via
adversarial sweep |
| 617c2ba416b9 | libpas: add embedder thread-suspension callback and
enable Linux TLC decommit |
| 98dc8d6eb9dc | WTF: install pas_thread_suspender on Linux, wrapping
Thread::suspend/resume |
| 68e2ebfa862f | Restore do_mprotect gate in decommit_impl on Windows |
| d8d42dd398d9 | ThreadingPOSIX: avoid allocation in Thread::suspend's
self-check assertion |
| 9c8ba3a07c81 | Revert FlsAlloc — TLC destructor crashes on Windows
thread exit |
| 4596a6f61d01 | libpas: use is_exiting flag instead of (void*)1
sentinel for TLC teardown |
| ebf11e28e73e | pas_thread: fix pthread_once on Windows |
| 98ceda0246f4 | OSAllocatorPOSIX: madvise advice is an enum, not a
bitmask |
| 7d4f81658658 | pas_scavenger: also decommit TLCs on the last-chance
tick before deep sleep |
| b39129e720d3 | ThreadingPOSIX: retry sem_wait on EINTR |

Closes oven-sh#26352
Closes oven-sh#26661
Closes oven-sh#27972
Closes oven-sh#26842
Closes oven-sh#23635
Closes oven-sh#22363

Fixes oven-sh#20422
Fixes oven-sh#26982
liooil pushed a commit to liooil/poly that referenced this pull request Aug 7, 2026
Bumps WebKit from `42f80a684c5d` → `b39129e720d3` (15 commits).


oven-sh/WebKit@42f80a6...b39129e

| Commit | Message |
|---|---|
| 24d76be9b327 | Windows: fix resource exhaustion in libpas/WTF |
| e38dd2fc34a0 | pas_page_malloc: optimistic single-call commit/decommit
on Windows |
| 61c73c25601c | libpas: fix 8 memory-accounting bugs found via
adversarial sweep |
| 617c2ba416b9 | libpas: add embedder thread-suspension callback and
enable Linux TLC decommit |
| 98dc8d6eb9dc | WTF: install pas_thread_suspender on Linux, wrapping
Thread::suspend/resume |
| 68e2ebfa862f | Restore do_mprotect gate in decommit_impl on Windows |
| d8d42dd398d9 | ThreadingPOSIX: avoid allocation in Thread::suspend's
self-check assertion |
| 9c8ba3a07c81 | Revert FlsAlloc — TLC destructor crashes on Windows
thread exit |
| 4596a6f61d01 | libpas: use is_exiting flag instead of (void*)1
sentinel for TLC teardown |
| ebf11e28e73e | pas_thread: fix pthread_once on Windows |
| 98ceda0246f4 | OSAllocatorPOSIX: madvise advice is an enum, not a
bitmask |
| 7d4f81658658 | pas_scavenger: also decommit TLCs on the last-chance
tick before deep sleep |
| b39129e720d3 | ThreadingPOSIX: retry sem_wait on EINTR |

Closes oven-sh/bun#26352
Closes oven-sh/bun#26661
Closes oven-sh/bun#27972
Closes oven-sh/bun#26842
Closes oven-sh/bun#23635
Closes oven-sh/bun#22363

Fixes oven-sh/bun#20422
Fixes oven-sh/bun#26982
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.

1 participant