Skip to content

Conversation

wcandillon
Copy link
Contributor

fixes #3275

@wcandillon wcandillon requested a review from Copilot September 18, 2025 11:13
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue with Reanimated ArrayBuffer unmarshalling in the Skia package by adding an alternative property access method for color values. The fix addresses issue #3275 by providing a fallback mechanism when the object doesn't behave as a regular array.

  • Adds property-based color value extraction using string indices "0", "1", "2", "3"
  • Provides fallback logic for cases where array indexing fails

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 169 to 180
auto r =
object.getProperty(runtime, jsi::PropNameID::forAscii(runtime, "0"))
.asNumber();
auto g =
object.getProperty(runtime, jsi::PropNameID::forAscii(runtime, "1"))
.asNumber();
auto b =
object.getProperty(runtime, jsi::PropNameID::forAscii(runtime, "2"))
.asNumber();
auto a =
object.getProperty(runtime, jsi::PropNameID::forAscii(runtime, "3"))
.asNumber();
Copy link
Preview

Copilot AI Sep 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The duplicated logic between the array access (lines 158-161) and property access approaches creates code duplication. Consider extracting the color conversion logic into a helper function that accepts the four color component values.

Copilot uses AI. Check for mistakes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@wcandillon wcandillon requested a review from Copilot September 18, 2025 11:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@wcandillon wcandillon merged commit 1d886cf into main Sep 18, 2025
12 of 13 checks passed
Copy link
Contributor

🎉 This PR is included in version 2.2.17 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Expo 53] "useColorBuffer" throwing " Value is undefined, expected an Object, js engine: hermes"
1 participant