| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Add a CADisplayLink-backed AnimationFrame module registering two surfaces on every global (workers included): - requestAnimationFrame/cancelAnimationFrame with spec semantics: one one-shot entry per request, a returned handle, cancellation by handle, and a single performance-timeline timestamp argument. - __postFrameCallback(fn[, delayMillis])/__removeFrameCallback(fn), matching the Android runtime's contract: dedup by function identity via a private value, fn(frameTimeNanos, performanceMillis), and delayed entries firing on the first frame after the delay elapses. The per-isolate display link is created paused on the isolate's home runloop in the common modes and only runs while entries are pending, so an idle isolate never wakes per frame. Frame timestamps map CADisplayLink.timestamp (mach_absolute_time base, shared with the V8 platform clock) onto the performance timeline through the runtime's monotonic time origin, so every callback in a batch observes the vsync instant rather than dispatch time. QuartzCore is now linked into the NativeScript target, which autolinks nothing.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 8ece8b68-d187-4e19-883e-ee607bd89727 📥 CommitsReviewing files that changed from the base of the PR and between 9399899 and 36da24f. 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review. 📝 Walkthrough WalkthroughAdds iOS animation-frame support for each V8 isolate. It exposes standard and compatibility callback APIs, schedules callbacks through CADisplayLink, integrates the runtime and Xcode project, and adds JavaScript contract tests. ChangesAnimation frame runtime
Estimated code review effort: 4 (Complex) | ~45 minutes Merge Risk: ⚪ Minimal · up to 36da2 The PR adds frame-callback APIs with runtime, test, and build integration; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant JavaScript
participant AnimationFrame
participant CADisplayLink
participant V8Isolate
JavaScript->>AnimationFrame: requestAnimationFrame(callback)
AnimationFrame->>CADisplayLink: schedule display-link callback
CADisplayLink->>AnimationFrame: provide frame timestamp
AnimationFrame->>V8Isolate: enter isolate and dispatch callbacks
V8Isolate->>JavaScript: invoke callback with timestamp
Suggested reviewers: nathanwalker Poem 🚥 Pre-merge checks | ✅ 5 ✅ Passed checks (5 passed)
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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What
Adds a CADisplayLink-backed AnimationFrame module exposing two frame-callback surfaces on every global (workers included):
How
Tests
TestRunner/app/tests/AnimationFrameTests.js ports the Android testPostFrameCallback.js suite (existence, argument TypeErrors, single-fire, dedup on double-post, cancel/cancel-then-repost, self-reschedule, GC retention/release) and adds rAF specs (handle + single timestamp arg, once-per-request for the same function, targeted cancellation, batch timestamp equality, frame chaining, dedupe isolation from __postFrameCallback), a delay spec, and a frame-time/performance-timestamp spec. Full suite green locally on the iOS simulator.
Summary by CodeRabbit
New Features
Tests