| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
JS delegates shared one vtable whose Invoke takes up to three pointer-sized arguments and returns nothing. That covers event handlers, but a delegate such as Int64 F(Single, Single, Single, Single) got garbage arguments (floats travel in vector registers on x64 and ARM64) and its result was never written back. Delegates whose Invoke takes floating-point values or returns a value now get their own vtable, whose Invoke is a libffi closure with the exact signature from metadata. The JS function's result is converted to the declared return type, and a JS exception is reported as E_FAIL. Other delegates keep the shared Invoke. Both the classic and the Node-API engines use it.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 82883341-5a66-4b0f-b5be-f48843aee057 You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file. 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. ❤️ ShareComment @coderabbitai help to get the list of available commands. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
JS functions passed as WinRT delegates (NSWinRT.asDelegate and delegate constructors) now work when the delegate's Invoke takes floating-point values or returns a value.
Problem
Every JS delegate shared one vtable whose Invoke takes up to three pointer-sized arguments and returns nothing. That covers event handlers ((sender, args)), but not a delegate such as Int64 F(Single, Single, Single, Single):
Change
No API changes: asDelegate picks the right Invoke from the delegate's metadata.
Tests
cargo test -p runtime --lib --release: