Commit 8118544
committed
Store instance handles in an internal map behind flag (facebook#35053)
We already append `randomKey` to each handle name to prevent external
libraries from accessing and relying on these internals. But more
libraries recently have been getting around this by simply iterating
over the element properties and using a `startsWith` check.
This flag allows us to experiment with moving these handles to an
internal map.
This PR starts with the two most common internals, the props object and
the fiber. We can consider moving additional properties such as the
container root and others depending on perf results.
DiffTrain build for [a44e750](facebook@a44e750)1 parent 1e3ab94 commit 8118544
File tree
21 files changed
+374
-374
lines changed- compiled-rn
- facebook-fbsource/xplat/js
- RKJSModules/vendor/react
- react-dom/cjs
- react-test-renderer/cjs
- react/cjs
- react-native-github/Libraries/Renderer
- implementations
- tools/eslint-plugin-react-hooks
21 files changed
+374
-374
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
Lines changed: 109 additions & 109 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
1032 | 1032 | | |
1033 | 1033 | | |
1034 | 1034 | | |
1035 | | - | |
1036 | | - | |
| 1035 | + | |
| 1036 | + | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | 1039 | | |
| |||
13130 | 13130 | | |
13131 | 13131 | | |
13132 | 13132 | | |
13133 | | - | |
13134 | | - | |
13135 | | - | |
| 13133 | + | |
| 13134 | + | |
| 13135 | + | |
13136 | 13136 | | |
13137 | | - | |
13138 | | - | |
13139 | | - | |
13140 | | - | |
13141 | | - | |
13142 | | - | |
13143 | | - | |
| 13137 | + | |
| 13138 | + | |
| 13139 | + | |
| 13140 | + | |
| 13141 | + | |
| 13142 | + | |
| 13143 | + | |
13144 | 13144 | | |
13145 | | - | |
13146 | | - | |
| 13145 | + | |
| 13146 | + | |
13147 | 13147 | | |
13148 | 13148 | | |
13149 | 13149 | | |
| |||
17483 | 17483 | | |
17484 | 17484 | | |
17485 | 17485 | | |
17486 | | - | |
| 17486 | + | |
17487 | 17487 | | |
17488 | | - | |
17489 | | - | |
| 17488 | + | |
| 17489 | + | |
17490 | 17490 | | |
17491 | 17491 | | |
17492 | 17492 | | |
17493 | 17493 | | |
17494 | | - | |
17495 | | - | |
| 17494 | + | |
| 17495 | + | |
17496 | 17496 | | |
17497 | 17497 | | |
17498 | 17498 | | |
| |||
17512 | 17512 | | |
17513 | 17513 | | |
17514 | 17514 | | |
17515 | | - | |
| 17515 | + | |
17516 | 17516 | | |
17517 | | - | |
| 17517 | + | |
17518 | 17518 | | |
17519 | 17519 | | |
17520 | | - | |
| 17520 | + | |
17521 | 17521 | | |
17522 | 17522 | | |
17523 | | - | |
| 17523 | + | |
17524 | 17524 | | |
17525 | | - | |
17526 | | - | |
| 17525 | + | |
| 17526 | + | |
17527 | 17527 | | |
17528 | 17528 | | |
17529 | | - | |
17530 | | - | |
| 17529 | + | |
| 17530 | + | |
17531 | 17531 | | |
17532 | | - | |
| 17532 | + | |
17533 | 17533 | | |
17534 | 17534 | | |
17535 | 17535 | | |
| |||
17624 | 17624 | | |
17625 | 17625 | | |
17626 | 17626 | | |
17627 | | - | |
| 17627 | + | |
Lines changed: 30 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
1112 | 1112 | | |
1113 | 1113 | | |
1114 | 1114 | | |
1115 | | - | |
1116 | | - | |
| 1115 | + | |
| 1116 | + | |
1117 | 1117 | | |
1118 | 1118 | | |
1119 | 1119 | | |
| |||
15216 | 15216 | | |
15217 | 15217 | | |
15218 | 15218 | | |
15219 | | - | |
15220 | | - | |
15221 | | - | |
| 15219 | + | |
| 15220 | + | |
| 15221 | + | |
15222 | 15222 | | |
15223 | | - | |
15224 | | - | |
15225 | | - | |
15226 | | - | |
15227 | | - | |
15228 | | - | |
15229 | | - | |
| 15223 | + | |
| 15224 | + | |
| 15225 | + | |
| 15226 | + | |
| 15227 | + | |
| 15228 | + | |
| 15229 | + | |
15230 | 15230 | | |
15231 | | - | |
15232 | | - | |
| 15231 | + | |
| 15232 | + | |
15233 | 15233 | | |
15234 | 15234 | | |
15235 | 15235 | | |
| |||
19587 | 19587 | | |
19588 | 19588 | | |
19589 | 19589 | | |
19590 | | - | |
| 19590 | + | |
19591 | 19591 | | |
19592 | | - | |
19593 | | - | |
| 19592 | + | |
| 19593 | + | |
19594 | 19594 | | |
19595 | 19595 | | |
19596 | 19596 | | |
19597 | 19597 | | |
19598 | | - | |
19599 | | - | |
| 19598 | + | |
| 19599 | + | |
19600 | 19600 | | |
19601 | 19601 | | |
19602 | 19602 | | |
| |||
19616 | 19616 | | |
19617 | 19617 | | |
19618 | 19618 | | |
19619 | | - | |
| 19619 | + | |
19620 | 19620 | | |
19621 | | - | |
| 19621 | + | |
19622 | 19622 | | |
19623 | 19623 | | |
19624 | | - | |
| 19624 | + | |
19625 | 19625 | | |
19626 | 19626 | | |
19627 | 19627 | | |
| |||
19639 | 19639 | | |
19640 | 19640 | | |
19641 | 19641 | | |
19642 | | - | |
| 19642 | + | |
19643 | 19643 | | |
19644 | | - | |
19645 | | - | |
| 19644 | + | |
| 19645 | + | |
19646 | 19646 | | |
19647 | 19647 | | |
19648 | | - | |
19649 | | - | |
| 19648 | + | |
| 19649 | + | |
19650 | 19650 | | |
19651 | | - | |
| 19651 | + | |
19652 | 19652 | | |
19653 | 19653 | | |
19654 | 19654 | | |
| |||
19744 | 19744 | | |
19745 | 19745 | | |
19746 | 19746 | | |
19747 | | - | |
| 19747 | + | |
0 commit comments