From 0b4ea26c9b1abda86312f7e884ea19f4848a1ffc Mon Sep 17 00:00:00 2001 From: richardo2016x Date: Thu, 26 Dec 2024 16:05:12 +0800 Subject: [PATCH] fix: lack of transform for symbol-value from jsi to v8. --- .../react-native-v8-npm-2.5.1-215a8641f3.patch | 14 ++++++++++++++ package.json | 3 ++- yarn.lock | 18 ++++++++++++++++-- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch diff --git a/.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch b/.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch new file mode 100644 index 000000000..72e84c5c5 --- /dev/null +++ b/.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch @@ -0,0 +1,14 @@ +diff --git a/src/v8runtime/JSIV8ValueConverter.cpp b/src/v8runtime/JSIV8ValueConverter.cpp +index df5594068195f6c8fdfeab27800e5df629aee73e..158ac9264f09f7443f0f7ad12d851de7aac4f5c4 100644 +--- a/src/v8runtime/JSIV8ValueConverter.cpp ++++ b/src/v8runtime/JSIV8ValueConverter.cpp +@@ -66,6 +66,9 @@ v8::Local JSIV8ValueConverter::ToV8Value( + } else if (value.isObject()) { + return scopedHandle.Escape(ToV8Object( + runtime, std::move(value.getObject(const_cast(runtime))))); ++ } else if (value.isSymbol()) { ++ return scopedHandle.Escape(ToV8Symbol( ++ runtime, std::move(value.getSymbol(const_cast(runtime))))); + } else { + // What are you? + std::abort(); diff --git a/package.json b/package.json index 218fb6bac..c3efa3597 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,8 @@ "zeego@1.10.0": "patch:zeego@npm%3A1.10.0#./.yarn/patches/zeego-npm-1.10.0-1958a3ea63.patch", "@rabby-wallet/eth-hd-keyring@4.3.1": "patch:@rabby-wallet/eth-hd-keyring@npm%3A4.3.1#./.yarn/patches/@rabby-wallet-eth-hd-keyring-npm-4.3.1-a1d8bbe289.patch", "react-native-quick-crypto@^0.7.7": "patch:react-native-quick-crypto@npm%3A0.7.10#./.yarn/patches/react-native-quick-crypto-npm-0.7.10-e50ff7fecf.patch", - "react-native-quick-crypto@0.7.10": "patch:react-native-quick-crypto@npm%3A0.7.10#./.yarn/patches/react-native-quick-crypto-npm-0.7.10-e50ff7fecf.patch" + "react-native-quick-crypto@0.7.10": "patch:react-native-quick-crypto@npm%3A0.7.10#./.yarn/patches/react-native-quick-crypto-npm-0.7.10-e50ff7fecf.patch", + "react-native-v8@^2.5.1": "patch:react-native-v8@npm%3A2.5.1#./.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch" }, "dependencies": { "@babel/runtime": "^7.20.0", diff --git a/yarn.lock b/yarn.lock index df050efbf..91a517434 100644 --- a/yarn.lock +++ b/yarn.lock @@ -28552,7 +28552,7 @@ __metadata: "react-native-reanimated@npm:^3.6.1": version: 3.6.1 - resolution: "react-native-reanimated@npm:3.6.1::__archiveUrl=https%3A%2F%2Fregistry.npmjs.org%2Freact-native-reanimated%2F-%2Freact-native-reanimated-3.6.1.tgz" + resolution: "react-native-reanimated@npm:3.6.1" dependencies: "@babel/plugin-transform-object-assign": ^7.16.7 "@babel/preset-typescript": ^7.16.7 @@ -28707,7 +28707,7 @@ __metadata: languageName: node linkType: hard -"react-native-v8@npm:^2.5.1": +"react-native-v8@npm:2.5.1": version: 2.5.1 resolution: "react-native-v8@npm:2.5.1" dependencies: @@ -28721,6 +28721,20 @@ __metadata: languageName: node linkType: hard +"react-native-v8@patch:react-native-v8@npm%3A2.5.1#./.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch::locator=%40rabby-wallet%2Fmobile-monorepo%40workspace%3A.": + version: 2.5.1 + resolution: "react-native-v8@patch:react-native-v8@npm%3A2.5.1#./.yarn/patches/react-native-v8-npm-2.5.1-215a8641f3.patch::version=2.5.1&hash=4ea2bf&locator=%40rabby-wallet%2Fmobile-monorepo%40workspace%3A." + dependencies: + semver: ^7.6.2 + peerDependencies: + expo: "*" + peerDependenciesMeta: + expo: + optional: true + checksum: e0cb42392aa6bc0868547c48cea7eb7b9264428f474610c87069436ac81d81fbaeb826949d28c52e93ab689f4e4031dacb730a9f37b52f629728730900a77fb7 + languageName: node + linkType: hard + "react-native-vector-icons@npm:^10.0.2": version: 10.0.3 resolution: "react-native-vector-icons@npm:10.0.3::__archiveUrl=https%3A%2F%2Fregistry.npmjs.org%2Freact-native-vector-icons%2F-%2Freact-native-vector-icons-10.0.3.tgz"