Commit 0b1cce0
committed
clearContainer and clearSingleton both assumed scripts could be safely
removed from the DOM because normally once a script has been inserted
into the DOM it is executable and removing it, even synchronously, will
not prevent it from running. However There is an edge case in a couple
browsers (Chrome at least) where during HTML streaming if a script is
opened and not yet closed the script will be inserted into the document
but not yet executed. If the script is removed from the document before
the end tag is parsed then the script will not run. This change causes
clearContainer and clearSingleton to retain script elements. This is
generally thought to be safe because if we are calling these methods we
are no longer hydrating the container or the singleton and the scripts
execution will happen regardless.
DiffTrain build for [1cea384](1cea384)
1 parent abcb33d commit 0b1cce0
File tree
15 files changed
+100
-28
lines changed- compiled/facebook-www
15 files changed
+100
-28
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10193 | 10193 | | |
10194 | 10194 | | |
10195 | 10195 | | |
10196 | | - | |
| 10196 | + | |
10197 | 10197 | | |
10198 | 10198 | | |
10199 | 10199 | | |
| |||
10224 | 10224 | | |
10225 | 10225 | | |
10226 | 10226 | | |
10227 | | - | |
| 10227 | + | |
10228 | 10228 | | |
10229 | 10229 | | |
10230 | 10230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34196 | 34196 | | |
34197 | 34197 | | |
34198 | 34198 | | |
34199 | | - | |
| 34199 | + | |
34200 | 34200 | | |
34201 | 34201 | | |
34202 | 34202 | | |
| |||
42932 | 42932 | | |
42933 | 42933 | | |
42934 | 42934 | | |
| 42935 | + | |
| 42936 | + | |
| 42937 | + | |
| 42938 | + | |
| 42939 | + | |
| 42940 | + | |
| 42941 | + | |
| 42942 | + | |
| 42943 | + | |
| 42944 | + | |
| 42945 | + | |
| 42946 | + | |
42935 | 42947 | | |
| 42948 | + | |
42936 | 42949 | | |
42937 | 42950 | | |
42938 | 42951 | | |
| 42952 | + | |
42939 | 42953 | | |
42940 | 42954 | | |
42941 | 42955 | | |
| |||
43612 | 43626 | | |
43613 | 43627 | | |
43614 | 43628 | | |
| 43629 | + | |
43615 | 43630 | | |
43616 | 43631 | | |
43617 | 43632 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34041 | 34041 | | |
34042 | 34042 | | |
34043 | 34043 | | |
34044 | | - | |
| 34044 | + | |
34045 | 34045 | | |
34046 | 34046 | | |
34047 | 34047 | | |
| |||
43442 | 43442 | | |
43443 | 43443 | | |
43444 | 43444 | | |
| 43445 | + | |
| 43446 | + | |
| 43447 | + | |
| 43448 | + | |
| 43449 | + | |
| 43450 | + | |
| 43451 | + | |
| 43452 | + | |
| 43453 | + | |
| 43454 | + | |
| 43455 | + | |
| 43456 | + | |
43445 | 43457 | | |
| 43458 | + | |
43446 | 43459 | | |
43447 | 43460 | | |
43448 | 43461 | | |
| 43462 | + | |
43449 | 43463 | | |
43450 | 43464 | | |
43451 | 43465 | | |
| |||
44122 | 44136 | | |
44123 | 44137 | | |
44124 | 44138 | | |
| 44139 | + | |
44125 | 44140 | | |
44126 | 44141 | | |
44127 | 44142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8673 | 8673 | | |
8674 | 8674 | | |
8675 | 8675 | | |
| 8676 | + | |
8676 | 8677 | | |
8677 | 8678 | | |
8678 | 8679 | | |
| |||
15108 | 15109 | | |
15109 | 15110 | | |
15110 | 15111 | | |
| 15112 | + | |
15111 | 15113 | | |
15112 | 15114 | | |
15113 | 15115 | | |
| |||
16649 | 16651 | | |
16650 | 16652 | | |
16651 | 16653 | | |
16652 | | - | |
| 16654 | + | |
16653 | 16655 | | |
16654 | 16656 | | |
16655 | 16657 | | |
| |||
16679 | 16681 | | |
16680 | 16682 | | |
16681 | 16683 | | |
16682 | | - | |
| 16684 | + | |
16683 | 16685 | | |
16684 | 16686 | | |
16685 | 16687 | | |
| |||
16922 | 16924 | | |
16923 | 16925 | | |
16924 | 16926 | | |
16925 | | - | |
| 16927 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8509 | 8509 | | |
8510 | 8510 | | |
8511 | 8511 | | |
| 8512 | + | |
8512 | 8513 | | |
8513 | 8514 | | |
8514 | 8515 | | |
| |||
15336 | 15337 | | |
15337 | 15338 | | |
15338 | 15339 | | |
| 15340 | + | |
15339 | 15341 | | |
15340 | 15342 | | |
15341 | 15343 | | |
| |||
16176 | 16178 | | |
16177 | 16179 | | |
16178 | 16180 | | |
16179 | | - | |
| 16181 | + | |
16180 | 16182 | | |
16181 | 16183 | | |
16182 | 16184 | | |
| |||
16207 | 16209 | | |
16208 | 16210 | | |
16209 | 16211 | | |
16210 | | - | |
| 16212 | + | |
16211 | 16213 | | |
16212 | 16214 | | |
16213 | 16215 | | |
| |||
16378 | 16380 | | |
16379 | 16381 | | |
16380 | 16382 | | |
16381 | | - | |
| 16383 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9223 | 9223 | | |
9224 | 9224 | | |
9225 | 9225 | | |
| 9226 | + | |
9226 | 9227 | | |
9227 | 9228 | | |
9228 | 9229 | | |
| |||
15883 | 15884 | | |
15884 | 15885 | | |
15885 | 15886 | | |
| 15887 | + | |
15886 | 15888 | | |
15887 | 15889 | | |
15888 | 15890 | | |
| |||
17424 | 17426 | | |
17425 | 17427 | | |
17426 | 17428 | | |
17427 | | - | |
| 17429 | + | |
17428 | 17430 | | |
17429 | 17431 | | |
17430 | 17432 | | |
| |||
17468 | 17470 | | |
17469 | 17471 | | |
17470 | 17472 | | |
17471 | | - | |
| 17473 | + | |
17472 | 17474 | | |
17473 | 17475 | | |
17474 | 17476 | | |
| |||
17698 | 17700 | | |
17699 | 17701 | | |
17700 | 17702 | | |
17701 | | - | |
| 17703 | + | |
17702 | 17704 | | |
17703 | 17705 | | |
17704 | 17706 | | |
| |||
0 commit comments