fix(ios): support V8 14 native bridge APIs - #147
Merged
triniwiz merged 1 commit intoSep 9, 2026
Merged
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
LorenzGit
marked this pull request as ready for review
September 8, 2026 18:44
triniwiz
added a commit
that referenced
this pull request
Sep 14, 2026
Brings in #144-#149. Conflict resolution notes: * #147 (V8 14 native bridge) overlapped almost entirely with the V8 14 migration this branch already carries. Both sides fix the same API break; master does it with dual-version shims (canvas::GetAlignedPointer, canvas::Receiver, CANVAS_FAST_FUNCTION, #if V8_MAJOR_VERSION >= 14) so one tree can build against V8 10.3 and 14, while this branch targets a single vendored V8 14.9 (tools/scripts/download-v8.sh) and calls the native APIs directly. 118 of the 127 conflicting sources were that difference alone -- after rewriting master's shims into this branch's idiom, 112 compared byte-identical -- so those keep this branch's spelling and the now-unused shim block is dropped from Common.h. * Master's shims also compile fast API calls out on V8 >= 14 (CANVAS_FAST_FUNCTION -> v8::CFunction{}, c_function -> nullptr). V8 14.9 still declares both FunctionTemplate::New(..., const CFunction*) and NewWithCFunctionOverloads, and this branch's fast paths are built against it, so taking that would have silently disabled every fast call in the binding layer. Helpers.h keeps this branch's version; the four CANVAS_FAST_FUNCTION call sites that auto-merged into OES_vertex_array_objectImpl and WEBGL_draw_buffersImpl -- no conflict was raised for those -- are restored to v8::CFunction::Make. * Master's *Array fast overloads are all guarded #if V8_MAJOR_VERSION < 14, so they are dead on 14 and equivalent to this branch having removed them. * #149 (ImageData double free) applies unchanged. canvas_native_image_data_get_data borrows its argument and returns a U8Buffer holding a second refcounted handle to the same pixels, so ImageDataBuffer must release only the buffer -- ~ImageDataImpl already releases the ImageData. The comment is reworded from master's, which described the buffer as owning a clone of the pixel storage; it is a shared handle, and that is what makes the JS data view live. * Package versions stay on the 3.0.0-alpha line. * canvas-release.aar keeps this branch's binary; it predates the Android render fixes in 638a265 and needs rebuilding from the merged sources.
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.
Adapt the Apple Canvas bridge to V8 14.9 while retaining V8 10 compatibility: tagged pointers, receiver/accessor APIs, UTF-8 APIs and the removed fast typed-array interface. Use the existing ordinary callbacks where newer V8 no longer exposes that fast API.
Validation
All 59 Apple bridge translation units passed syntax checks against both V8 10 and V8 14 framework headers. The source-built V8 14.9 tvOS app passes Canvas pixel/Unicode metrics, WebGL typed-buffer/readback and WebGPU compute tests. The mapping-progress regression separately requires #148. JIT-enabled iOS fast-path performance has not been benchmarked.
Reproduce
Revision-pinned reviewer setup builds the companion stack in an isolated workspace. It includes commands, requirements, dependency pins and physical-device limitations. No binary artifacts or private development paths are committed.
This PR contains one commit,
ed84b43758e24751f2bc60a9a9a888ed944a1776, changing 128 files against1fd6ef470dfdfd43b3385fa7ef43feddd1debd06. Its exported patch reproduces the committed tree from a fresh base index.The source-built runtime was validated in the prepared runtime checkout; companion clones, native helpers, Canvas and clean npm installation were validated in a separate workspace on the same Mac. A second machine and one uninterrupted cold
allrun have not been tested.