Skip to content

Commit 112843b

Browse files
Apply fix to blob.js
1 parent 7760ce7 commit 112843b

File tree

4 files changed

+274
-0
lines changed

4 files changed

+274
-0
lines changed

package-lock.json

Lines changed: 251 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.0.0",
44
"main": "node_modules/expo/AppEntry.js",
55
"scripts": {
6+
"postinstall": "patch-package",
67
"start": "expo start",
78
"android": "expo start --android",
89
"ios": "expo start --ios",
@@ -12,6 +13,7 @@
1213
"dependencies": {
1314
"expo": "~44.0.0",
1415
"expo-status-bar": "~1.2.0",
16+
"patch-package": "^6.4.7",
1517
"react": "17.0.1",
1618
"react-dom": "17.0.1",
1719
"react-native": "0.64.3",

patches/react-native+0.66.4.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/node_modules/react-native/Libraries/Blob/Blob.js b/node_modules/react-native/Libraries/Blob/Blob.js
2+
index 99d5e59..1c35f3b 100644
3+
--- a/node_modules/react-native/Libraries/Blob/Blob.js
4+
+++ b/node_modules/react-native/Libraries/Blob/Blob.js
5+
@@ -105,6 +105,12 @@ class Blob {
6+
blobId: this.data.blobId,
7+
offset,
8+
size,
9+
+ /* Since `blob.slice()` creates a new view onto the same binary
10+
+ * data as the original blob, we should re-use the same collector
11+
+ * object so that the underlying resource gets deallocated when
12+
+ * the last view into the data is released, not the first.
13+
+ */
14+
+ __collector: this.data.__collector,
15+
});
16+
}
17+

readme.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,7 @@ This repo contains an Expo app and a server implementation.
1414
## Server
1515

1616
* Run `node server.js`
17+
18+
## Fix
19+
20+
The bug fix is implemented in the `fix` branch

0 commit comments

Comments
 (0)