@fails-components/webtransport 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (300) hide show
  1. package/package.json +1 -1
  2. package/readme.md +1 -3
  3. package/src/http3eventloop.cc +83 -9
  4. package/src/http3eventloop.h +13 -3
  5. package/src/http3server.cc +22 -22
  6. package/src/http3server.h +7 -20
  7. package/src/http3wtstreamvisitor.cc +31 -10
  8. package/src/http3wtstreamvisitor.h +38 -11
  9. package/src/webtransport.js +91 -23
  10. package/test/echoserver.js +29 -5
  11. package/test/testsuite.js +242 -220
  12. package/third_party/boringssl/src/CMakeLists.txt +2 -0
  13. package/third_party/boringssl/src/crypto/CMakeLists.txt +1 -0
  14. package/third_party/boringssl/src/crypto/asn1/a_bitstr.c +174 -177
  15. package/third_party/boringssl/src/crypto/asn1/a_bool.c +46 -48
  16. package/third_party/boringssl/src/crypto/asn1/a_d2i_fp.c +21 -23
  17. package/third_party/boringssl/src/crypto/asn1/a_dup.c +21 -23
  18. package/third_party/boringssl/src/crypto/asn1/a_gentm.c +84 -187
  19. package/third_party/boringssl/src/crypto/asn1/a_i2d_fp.c +19 -21
  20. package/third_party/boringssl/src/crypto/asn1/a_int.c +305 -329
  21. package/third_party/boringssl/src/crypto/asn1/a_mbstr.c +190 -195
  22. package/third_party/boringssl/src/crypto/asn1/a_object.c +182 -189
  23. package/third_party/boringssl/src/crypto/asn1/a_octet.c +6 -9
  24. package/third_party/boringssl/src/crypto/asn1/a_print.c +15 -16
  25. package/third_party/boringssl/src/crypto/asn1/a_strex.c +386 -399
  26. package/third_party/boringssl/src/crypto/asn1/a_strnid.c +110 -131
  27. package/third_party/boringssl/src/crypto/asn1/a_time.c +118 -111
  28. package/third_party/boringssl/src/crypto/asn1/a_type.c +59 -60
  29. package/third_party/boringssl/src/crypto/asn1/a_utctm.c +114 -186
  30. package/third_party/boringssl/src/crypto/asn1/a_utf8.c +171 -159
  31. package/third_party/boringssl/src/crypto/asn1/asn1_lib.c +245 -260
  32. package/third_party/boringssl/src/crypto/asn1/asn1_par.c +41 -40
  33. package/third_party/boringssl/src/crypto/asn1/asn1_test.cc +31 -0
  34. package/third_party/boringssl/src/crypto/asn1/asn_pack.c +31 -33
  35. package/third_party/boringssl/src/crypto/asn1/f_int.c +36 -33
  36. package/third_party/boringssl/src/crypto/asn1/f_string.c +29 -26
  37. package/third_party/boringssl/src/crypto/asn1/internal.h +62 -61
  38. package/third_party/boringssl/src/crypto/asn1/tasn_dec.c +706 -702
  39. package/third_party/boringssl/src/crypto/asn1/tasn_enc.c +507 -524
  40. package/third_party/boringssl/src/crypto/asn1/tasn_fre.c +141 -133
  41. package/third_party/boringssl/src/crypto/asn1/tasn_new.c +207 -199
  42. package/third_party/boringssl/src/crypto/asn1/tasn_typ.c +19 -22
  43. package/third_party/boringssl/src/crypto/asn1/tasn_utl.c +24 -24
  44. package/third_party/boringssl/src/crypto/asn1/time_support.c +13 -13
  45. package/third_party/boringssl/src/crypto/bio/connect.c +9 -3
  46. package/third_party/boringssl/src/crypto/bytestring/bytestring_test.cc +125 -1
  47. package/third_party/boringssl/src/crypto/bytestring/cbb.c +4 -7
  48. package/third_party/boringssl/src/crypto/bytestring/cbs.c +167 -9
  49. package/third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c +0 -2
  50. package/third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c +23 -54
  51. package/third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c +0 -2
  52. package/third_party/boringssl/src/crypto/cipher_extra/e_tls.c +0 -2
  53. package/third_party/boringssl/src/crypto/curve25519/curve25519.c +6 -8
  54. package/third_party/boringssl/src/crypto/evp/evp_ctx.c +25 -22
  55. package/third_party/boringssl/src/crypto/evp/internal.h +15 -9
  56. package/third_party/boringssl/src/crypto/evp/p_dsa_asn1.c +2 -0
  57. package/third_party/boringssl/src/crypto/evp/p_ec_asn1.c +2 -0
  58. package/third_party/boringssl/src/crypto/evp/p_ed25519.c +3 -3
  59. package/third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c +10 -7
  60. package/third_party/boringssl/src/crypto/evp/p_hkdf.c +241 -0
  61. package/third_party/boringssl/src/crypto/evp/p_rsa_asn1.c +2 -0
  62. package/third_party/boringssl/src/crypto/evp/p_x25519_asn1.c +1 -0
  63. package/third_party/boringssl/src/crypto/fipsmodule/aes/aes_nohw.c +9 -10
  64. package/third_party/boringssl/src/crypto/fipsmodule/aes/key_wrap.c +2 -6
  65. package/third_party/boringssl/src/crypto/fipsmodule/bn/exponentiation.c +5 -11
  66. package/third_party/boringssl/src/crypto/fipsmodule/bn/internal.h +1 -1
  67. package/third_party/boringssl/src/crypto/fipsmodule/bn/prime.c +2 -0
  68. package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c +10 -26
  69. package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aesccm.c +2 -3
  70. package/third_party/boringssl/src/crypto/fipsmodule/digestsign/digestsign.c +1 -0
  71. package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz.c +44 -43
  72. package/third_party/boringssl/src/crypto/fipsmodule/modes/cbc.c +5 -9
  73. package/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c +14 -21
  74. package/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c +8 -8
  75. package/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h +1 -4
  76. package/third_party/boringssl/src/crypto/hkdf/hkdf_test.cc +104 -0
  77. package/third_party/boringssl/src/crypto/internal.h +18 -4
  78. package/third_party/boringssl/src/crypto/lhash/internal.h +13 -1
  79. package/third_party/boringssl/src/crypto/obj/obj_dat.h +4 -1
  80. package/third_party/boringssl/src/crypto/obj/obj_mac.num +1 -0
  81. package/third_party/boringssl/src/crypto/obj/objects.txt +2 -0
  82. package/third_party/boringssl/src/crypto/pem/pem_all.c +77 -86
  83. package/third_party/boringssl/src/crypto/pem/pem_info.c +221 -233
  84. package/third_party/boringssl/src/crypto/pem/pem_lib.c +639 -608
  85. package/third_party/boringssl/src/crypto/pem/pem_oth.c +17 -16
  86. package/third_party/boringssl/src/crypto/pem/pem_pk8.c +133 -142
  87. package/third_party/boringssl/src/crypto/pem/pem_pkey.c +96 -92
  88. package/third_party/boringssl/src/crypto/poly1305/poly1305_vec.c +12 -28
  89. package/third_party/boringssl/src/crypto/siphash/siphash.c +8 -11
  90. package/third_party/boringssl/src/crypto/siphash/siphash_test.cc +5 -7
  91. package/third_party/boringssl/src/crypto/stack/stack.c +33 -16
  92. package/third_party/boringssl/src/crypto/thread_pthread.c +0 -2
  93. package/third_party/boringssl/src/crypto/thread_win.c +0 -2
  94. package/third_party/boringssl/src/crypto/trust_token/internal.h +14 -0
  95. package/third_party/boringssl/src/crypto/trust_token/pmbtoken.c +127 -30
  96. package/third_party/boringssl/src/crypto/trust_token/trust_token.c +40 -0
  97. package/third_party/boringssl/src/crypto/trust_token/trust_token_test.cc +165 -0
  98. package/third_party/boringssl/src/crypto/trust_token/voprf.c +55 -6
  99. package/third_party/boringssl/src/crypto/x509/a_digest.c +23 -24
  100. package/third_party/boringssl/src/crypto/x509/a_sign.c +52 -55
  101. package/third_party/boringssl/src/crypto/x509/a_verify.c +33 -34
  102. package/third_party/boringssl/src/crypto/x509/algorithm.c +17 -18
  103. package/third_party/boringssl/src/crypto/x509/asn1_gen.c +618 -612
  104. package/third_party/boringssl/src/crypto/x509/by_dir.c +320 -337
  105. package/third_party/boringssl/src/crypto/x509/by_file.c +186 -186
  106. package/third_party/boringssl/src/crypto/x509/i2d_pr.c +11 -14
  107. package/third_party/boringssl/src/crypto/x509/internal.h +22 -22
  108. package/third_party/boringssl/src/crypto/x509/name_print.c +155 -150
  109. package/third_party/boringssl/src/crypto/x509/rsa_pss.c +27 -29
  110. package/third_party/boringssl/src/crypto/x509/t_crl.c +67 -70
  111. package/third_party/boringssl/src/crypto/x509/t_req.c +3 -5
  112. package/third_party/boringssl/src/crypto/x509/t_x509.c +280 -251
  113. package/third_party/boringssl/src/crypto/x509/t_x509a.c +52 -47
  114. package/third_party/boringssl/src/crypto/x509/x509.c +3 -4
  115. package/third_party/boringssl/src/crypto/x509/x509_att.c +234 -223
  116. package/third_party/boringssl/src/crypto/x509/x509_cmp.c +286 -296
  117. package/third_party/boringssl/src/crypto/x509/x509_d2.c +37 -32
  118. package/third_party/boringssl/src/crypto/x509/x509_def.c +14 -30
  119. package/third_party/boringssl/src/crypto/x509/x509_ext.c +55 -84
  120. package/third_party/boringssl/src/crypto/x509/x509_lu.c +545 -581
  121. package/third_party/boringssl/src/crypto/x509/x509_obj.c +131 -121
  122. package/third_party/boringssl/src/crypto/x509/x509_req.c +120 -139
  123. package/third_party/boringssl/src/crypto/x509/x509_set.c +128 -142
  124. package/third_party/boringssl/src/crypto/x509/x509_trs.c +185 -193
  125. package/third_party/boringssl/src/crypto/x509/x509_txt.c +70 -72
  126. package/third_party/boringssl/src/crypto/x509/x509_v3.c +172 -161
  127. package/third_party/boringssl/src/crypto/x509/x509_vfy.c +2041 -2053
  128. package/third_party/boringssl/src/crypto/x509/x509_vpm.c +441 -461
  129. package/third_party/boringssl/src/crypto/x509/x509cset.c +152 -170
  130. package/third_party/boringssl/src/crypto/x509/x509name.c +274 -260
  131. package/third_party/boringssl/src/crypto/x509/x509rset.c +43 -20
  132. package/third_party/boringssl/src/crypto/x509/x509spki.c +62 -63
  133. package/third_party/boringssl/src/crypto/x509/x_algor.c +64 -62
  134. package/third_party/boringssl/src/crypto/x509/x_all.c +103 -133
  135. package/third_party/boringssl/src/crypto/x509/x_attrib.c +23 -24
  136. package/third_party/boringssl/src/crypto/x509/x_crl.c +310 -321
  137. package/third_party/boringssl/src/crypto/x509/x_exten.c +6 -5
  138. package/third_party/boringssl/src/crypto/x509/x_info.c +31 -28
  139. package/third_party/boringssl/src/crypto/x509/x_name.c +361 -365
  140. package/third_party/boringssl/src/crypto/x509/x_pkey.c +38 -32
  141. package/third_party/boringssl/src/crypto/x509/x_pubkey.c +114 -117
  142. package/third_party/boringssl/src/crypto/x509/x_req.c +27 -29
  143. package/third_party/boringssl/src/crypto/x509/x_sig.c +2 -2
  144. package/third_party/boringssl/src/crypto/x509/x_spki.c +8 -10
  145. package/third_party/boringssl/src/crypto/x509/x_val.c +2 -2
  146. package/third_party/boringssl/src/crypto/x509/x_x509.c +212 -226
  147. package/third_party/boringssl/src/crypto/x509/x_x509a.c +112 -109
  148. package/third_party/boringssl/src/crypto/x509v3/ext_dat.h +10 -13
  149. package/third_party/boringssl/src/crypto/x509v3/internal.h +72 -87
  150. package/third_party/boringssl/src/crypto/x509v3/pcy_cache.c +184 -176
  151. package/third_party/boringssl/src/crypto/x509v3/pcy_data.c +58 -56
  152. package/third_party/boringssl/src/crypto/x509v3/pcy_lib.c +71 -70
  153. package/third_party/boringssl/src/crypto/x509v3/pcy_map.c +56 -58
  154. package/third_party/boringssl/src/crypto/x509v3/pcy_node.c +89 -91
  155. package/third_party/boringssl/src/crypto/x509v3/pcy_tree.c +585 -590
  156. package/third_party/boringssl/src/crypto/x509v3/v3_akey.c +118 -112
  157. package/third_party/boringssl/src/crypto/x509v3/v3_akeya.c +3 -3
  158. package/third_party/boringssl/src/crypto/x509v3/v3_alt.c +447 -451
  159. package/third_party/boringssl/src/crypto/x509v3/v3_bcons.c +44 -38
  160. package/third_party/boringssl/src/crypto/x509v3/v3_bitst.c +39 -43
  161. package/third_party/boringssl/src/crypto/x509v3/v3_conf.c +321 -320
  162. package/third_party/boringssl/src/crypto/x509v3/v3_cpols.c +352 -327
  163. package/third_party/boringssl/src/crypto/x509v3/v3_crld.c +437 -383
  164. package/third_party/boringssl/src/crypto/x509v3/v3_enum.c +23 -16
  165. package/third_party/boringssl/src/crypto/x509v3/v3_extku.c +62 -53
  166. package/third_party/boringssl/src/crypto/x509v3/v3_genn.c +118 -115
  167. package/third_party/boringssl/src/crypto/x509v3/v3_ia5.c +30 -31
  168. package/third_party/boringssl/src/crypto/x509v3/v3_info.c +112 -98
  169. package/third_party/boringssl/src/crypto/x509v3/v3_int.c +40 -15
  170. package/third_party/boringssl/src/crypto/x509v3/v3_lib.c +248 -252
  171. package/third_party/boringssl/src/crypto/x509v3/v3_ncons.c +390 -386
  172. package/third_party/boringssl/src/crypto/x509v3/v3_ocsp.c +45 -32
  173. package/third_party/boringssl/src/crypto/x509v3/v3_pci.c +206 -209
  174. package/third_party/boringssl/src/crypto/x509v3/v3_pcia.c +6 -8
  175. package/third_party/boringssl/src/crypto/x509v3/v3_pcons.c +54 -50
  176. package/third_party/boringssl/src/crypto/x509v3/v3_pmaps.c +66 -65
  177. package/third_party/boringssl/src/crypto/x509v3/v3_prn.c +144 -133
  178. package/third_party/boringssl/src/crypto/x509v3/v3_purp.c +695 -709
  179. package/third_party/boringssl/src/crypto/x509v3/v3_skey.c +75 -69
  180. package/third_party/boringssl/src/crypto/x509v3/v3_utl.c +1102 -1082
  181. package/third_party/boringssl/src/include/openssl/base.h +3 -1
  182. package/third_party/boringssl/src/include/openssl/bn.h +3 -0
  183. package/third_party/boringssl/src/include/openssl/bytestring.h +20 -0
  184. package/third_party/boringssl/src/include/openssl/evp.h +6 -5
  185. package/third_party/boringssl/src/include/openssl/kdf.h +91 -0
  186. package/third_party/boringssl/src/include/openssl/nid.h +4 -0
  187. package/third_party/boringssl/src/include/openssl/ssl.h +6 -1
  188. package/third_party/boringssl/src/include/openssl/stack.h +47 -32
  189. package/third_party/boringssl/src/include/openssl/trust_token.h +18 -3
  190. package/third_party/boringssl/src/include/openssl/x509.h +18 -0
  191. package/third_party/boringssl/src/ssl/ssl_file.cc +61 -99
  192. package/third_party/boringssl/src/ssl/ssl_test.cc +101 -0
  193. package/third_party/boringssl/src/util/doc.config +2 -1
  194. package/third_party/boringssl/src/util/fipstools/acvp/acvptool/subprocess/subprocess.go +8 -0
  195. package/third_party/googleurl/AUTHORS +16 -2
  196. package/third_party/googleurl/base/BUILD +1 -0
  197. package/third_party/googleurl/base/compiler_specific.h +16 -17
  198. package/third_party/googleurl/base/containers/contiguous_iterator.h +13 -9
  199. package/third_party/googleurl/base/containers/span.h +23 -8
  200. package/third_party/googleurl/base/memory/raw_ptr.h +17 -25
  201. package/third_party/googleurl/base/memory/raw_ptr_exclusion.h +21 -0
  202. package/third_party/googleurl/base/strings/escape.cc +14 -2
  203. package/third_party/googleurl/base/strings/safe_sprintf.h +1 -1
  204. package/third_party/googleurl/base/strings/string_number_conversions.cc +5 -3
  205. package/third_party/googleurl/base/strings/string_number_conversions_internal.h +5 -5
  206. package/third_party/googleurl/base/strings/string_piece.h +3 -3
  207. package/third_party/googleurl/base/strings/string_util.cc +4 -27
  208. package/third_party/googleurl/base/strings/string_util.h +43 -8
  209. package/third_party/googleurl/base/strings/string_util_internal.h +11 -12
  210. package/third_party/googleurl/base/strings/string_util_unittest.cc +33 -0
  211. package/third_party/googleurl/base/strings/string_util_win.cc +0 -5
  212. package/third_party/googleurl/base/strings/string_util_win.h +9 -1
  213. package/third_party/googleurl/base/strings/utf_offset_string_conversions.cc +1 -1
  214. package/third_party/googleurl/base/strings/utf_string_conversion_utils.cc +5 -8
  215. package/third_party/googleurl/base/strings/utf_string_conversion_utils.h +13 -10
  216. package/third_party/googleurl/base/strings/utf_string_conversions.cc +32 -25
  217. package/third_party/googleurl/base/template_util.h +23 -35
  218. package/third_party/googleurl/build/build_config.h +14 -3
  219. package/third_party/googleurl/copy.bara.sky +1 -1
  220. package/third_party/googleurl/url/gurl.cc +8 -4
  221. package/third_party/googleurl/url/gurl.h +1 -0
  222. package/third_party/googleurl/url/gurl_unittest.cc +1 -0
  223. package/third_party/googleurl/url/origin.h +36 -26
  224. package/third_party/googleurl/url/scheme_host_port.h +4 -1
  225. package/third_party/googleurl/url/url_canon.h +2 -1
  226. package/third_party/googleurl/url/url_canon_internal.cc +9 -7
  227. package/third_party/googleurl/url/url_canon_internal.h +16 -16
  228. package/third_party/googleurl/url/url_canon_stdstring.h +2 -1
  229. package/third_party/googleurl/url/url_util.cc +9 -8
  230. package/third_party/quiche/build/source_list.bzl +7 -0
  231. package/third_party/quiche/build/source_list.gni +7 -0
  232. package/third_party/quiche/build/source_list.json +7 -0
  233. package/third_party/quiche/quiche/common/platform/api/quiche_mem_slice.h +7 -3
  234. package/third_party/quiche/quiche/http2/adapter/nghttp2_adapter_test.cc +86 -2
  235. package/third_party/quiche/quiche/http2/adapter/oghttp2_adapter_test.cc +104 -2
  236. package/third_party/quiche/quiche/http2/adapter/oghttp2_session.cc +23 -0
  237. package/third_party/quiche/quiche/http2/adapter/oghttp2_session.h +6 -1
  238. package/third_party/quiche/quiche/quic/core/congestion_control/send_algorithm_test.cc +0 -16
  239. package/third_party/quiche/quiche/quic/core/crypto/crypto_protocol.h +1 -1
  240. package/third_party/quiche/quiche/quic/core/http/end_to_end_test.cc +56 -2
  241. package/third_party/quiche/quiche/quic/core/http/http_constants.cc +1 -0
  242. package/third_party/quiche/quiche/quic/core/http/http_constants.h +1 -0
  243. package/third_party/quiche/quiche/quic/core/http/http_encoder.cc +28 -17
  244. package/third_party/quiche/quiche/quic/core/http/http_encoder.h +5 -0
  245. package/third_party/quiche/quiche/quic/core/http/http_encoder_test.cc +26 -30
  246. package/third_party/quiche/quiche/quic/core/http/http_frames.h +1 -0
  247. package/third_party/quiche/quiche/quic/core/http/quic_server_session_base.cc +4 -4
  248. package/third_party/quiche/quiche/quic/core/http/quic_server_session_base_test.cc +1 -1
  249. package/third_party/quiche/quiche/quic/core/http/quic_spdy_client_session.cc +5 -1
  250. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.cc +6 -33
  251. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.h +0 -17
  252. package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream_test.cc +5 -20
  253. package/third_party/quiche/quiche/quic/core/io/quic_event_loop.h +81 -0
  254. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.cc +265 -0
  255. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.h +152 -0
  256. package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop_test.cc +341 -0
  257. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.cc +3 -1
  258. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.h +7 -7
  259. package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store_test.cc +4 -3
  260. package/third_party/quiche/quiche/quic/core/quic_connection.cc +69 -19
  261. package/third_party/quiche/quiche/quic/core/quic_connection.h +9 -3
  262. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.cc +29 -10
  263. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.h +5 -3
  264. package/third_party/quiche/quiche/quic/core/quic_connection_id_manager_test.cc +85 -22
  265. package/third_party/quiche/quiche/quic/core/quic_connection_test.cc +186 -30
  266. package/third_party/quiche/quiche/quic/core/quic_crypto_stream.cc +2 -1
  267. package/third_party/quiche/quiche/quic/core/quic_default_clock.cc +31 -0
  268. package/third_party/quiche/quiche/quic/core/quic_default_clock.h +34 -0
  269. package/third_party/quiche/quiche/quic/core/quic_default_connection_helper.h +49 -0
  270. package/third_party/quiche/quiche/quic/core/quic_dispatcher.cc +53 -37
  271. package/third_party/quiche/quiche/quic/core/quic_dispatcher.h +19 -11
  272. package/third_party/quiche/quiche/quic/core/quic_dispatcher_test.cc +15 -2
  273. package/third_party/quiche/quiche/quic/core/quic_flags_list.h +10 -4
  274. package/third_party/quiche/quiche/quic/core/quic_idle_network_detector.cc +2 -2
  275. package/third_party/quiche/quiche/quic/core/quic_idle_network_detector_test.cc +4 -4
  276. package/third_party/quiche/quiche/quic/core/quic_packet_creator.cc +14 -3
  277. package/third_party/quiche/quiche/quic/core/quic_packet_creator_test.cc +145 -2
  278. package/third_party/quiche/quiche/quic/core/quic_packets.cc +3 -1
  279. package/third_party/quiche/quiche/quic/core/quic_packets.h +4 -0
  280. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.cc +13 -11
  281. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.h +9 -0
  282. package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager_test.cc +6 -0
  283. package/third_party/quiche/quiche/quic/core/quic_session.cc +3 -2
  284. package/third_party/quiche/quiche/quic/core/quic_session.h +8 -3
  285. package/third_party/quiche/quiche/quic/core/quic_types.cc +18 -0
  286. package/third_party/quiche/quiche/quic/core/quic_types.h +3 -0
  287. package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.cc +3 -0
  288. package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.h +10 -0
  289. package/third_party/quiche/quiche/quic/test_tools/mock_quic_session_visitor.h +1 -1
  290. package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.h +1 -1
  291. package/third_party/quiche/quiche/quic/test_tools/server_thread.cc +3 -2
  292. package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.cc +7 -1
  293. package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.h +3 -0
  294. package/third_party/quiche/quiche/quic/test_tools/simulator/quic_endpoint.h +4 -2
  295. package/certs/ca.cnf +0 -69
  296. package/certs/generate_certs.sh +0 -53
  297. package/certs/generate_certs_leaf.sh +0 -53
  298. package/certs/leaf.cnf +0 -24
  299. package/certs/readme.txt +0 -2
  300. package/third_party/quiche/build/BUILD.bazel +0 -7
@@ -16,10 +16,10 @@
16
16
  //
17
17
  // Operating System:
18
18
  // IS_AIX / IS_ANDROID / IS_ASMJS / IS_CHROMEOS / IS_FREEBSD / IS_FUCHSIA /
19
- // IS_IOS / IS_LINUX / IS_MAC / IS_NACL / IS_NETBSD / IS_OPENBSD / IS_QNX /
20
- // IS_SOLARIS / IS_WIN
19
+ // IS_IOS / IS_IOS_MACCATALYST / IS_LINUX / IS_MAC / IS_NACL / IS_NETBSD /
20
+ // IS_OPENBSD / IS_QNX / IS_SOLARIS / IS_WIN
21
21
  // Operating System family:
22
- // IS_APPLE: IOS or MAC
22
+ // IS_APPLE: IOS or MAC or IOS_MACCATALYST
23
23
  // IS_BSD: FREEBSD or NETBSD or OPENBSD
24
24
  // IS_POSIX: AIX or ANDROID or ASMJS or CHROMEOS or FREEBSD or IOS or LINUX
25
25
  // or MAC or NACL or NETBSD or OPENBSD or QNX or SOLARIS
@@ -64,6 +64,11 @@
64
64
  #include <TargetConditionals.h>
65
65
  #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
66
66
  #define OS_IOS 1
67
+ // Catalyst is the technology that allows running iOS apps on macOS. These
68
+ // builds are both OS_IOS and OS_IOS_MACCATALYST.
69
+ #if defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST
70
+ #define OS_IOS_MACCATALYST
71
+ #endif // defined(TARGET_OS_MACCATALYST) && TARGET_OS_MACCATALYST
67
72
  #else
68
73
  #define OS_MAC 1
69
74
  #endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
@@ -180,6 +185,12 @@
180
185
  #define BUILDFLAG_INTERNAL_IS_IOS() (0)
181
186
  #endif
182
187
 
188
+ #if defined(OS_IOS_MACCATALYST)
189
+ #define BUILDFLAG_INTERNAL_IS_IOS_MACCATALYST() (1)
190
+ #else
191
+ #define BUILDFLAG_INTERNAL_IS_IOS_MACCATALYST() (0)
192
+ #endif
193
+
183
194
  #if defined(OS_LINUX)
184
195
  #define BUILDFLAG_INTERNAL_IS_LINUX() (1)
185
196
  #else
@@ -26,6 +26,7 @@ import_list = glob(
26
26
  "base/functional/*.h",
27
27
  "base/i18n/uchar.h",
28
28
  "base/memory/raw_ptr.h",
29
+ "base/memory/raw_ptr_exclusion.h",
29
30
  "base/no_destructor.h",
30
31
  "base/ranges/*.h",
31
32
  "base/stl_util.h",
@@ -101,7 +102,6 @@ transformations = [
101
102
  # Fix some Perfetto includes.
102
103
  core.replace("perfetto/tracing/traced_value_forward.h", "perfetto/tracing/traced_value.h"),
103
104
 
104
- core.replace("#include \"base/win/windows_types.h\"", "#include <windows.h>"),
105
105
  core.replace("#include \"base/strings/string_number_conversions_win.h\"", ""),
106
106
  core.replace("#include \"base/allocator/partition_allocator/partition_alloc_config.h\"", ""),
107
107
  core.replace("base/trace_event/base_tracing_forward.h", "polyfills/third_party/perfetto/include/perfetto/tracing/traced_value.h"),
@@ -439,12 +439,16 @@ gurl_base::StringPiece GURL::HostNoBracketsPiece() const {
439
439
  }
440
440
 
441
441
  std::string GURL::GetContent() const {
442
+ return std::string(GetContentPiece());
443
+ }
444
+
445
+ gurl_base::StringPiece GURL::GetContentPiece() const {
442
446
  if (!is_valid_)
443
- return std::string();
444
- std::string content = ComponentString(parsed_.GetContent());
447
+ return gurl_base::StringPiece();
448
+ url::Component content_component = parsed_.GetContent();
445
449
  if (!SchemeIs(url::kJavaScriptScheme) && parsed_.ref.len >= 0)
446
- content.erase(content.size() - parsed_.ref.len - 1);
447
- return content;
450
+ content_component.len -= parsed_.ref.len + 1;
451
+ return ComponentStringPiece(content_component);
448
452
  }
449
453
 
450
454
  bool GURL::HostIsIPAddress() const {
@@ -278,6 +278,7 @@ class COMPONENT_EXPORT(URL) GURL {
278
278
  // It is an error to get the content of an invalid URL: the result will be an
279
279
  // empty string.
280
280
  std::string GetContent() const;
281
+ gurl_base::StringPiece GetContentPiece() const;
281
282
 
282
283
  // Returns true if the hostname is an IP address. Note: this function isn't
283
284
  // as cheap as a simple getter because it re-parses the hostname to verify.
@@ -929,6 +929,7 @@ TEST(GURLTest, ContentForNonStandardURLs) {
929
929
  for (const auto& test : cases) {
930
930
  GURL url(test.url);
931
931
  EXPECT_EQ(test.expected, url.GetContent()) << test.url;
932
+ EXPECT_EQ(test.expected, url.GetContentPiece()) << test.url;
932
933
  }
933
934
  }
934
935
 
@@ -119,16 +119,9 @@ class OriginDataView;
119
119
  // * The host component of an IPv6 address includes brackets, just like the URL
120
120
  // representation.
121
121
  //
122
- // Usage:
123
- //
124
- // * Origins are generally constructed from an already-canonicalized GURL:
125
- //
126
- // GURL url("https://example.com/");
127
- // url::Origin origin = Origin::Create(url);
128
- // origin.scheme(); // "https"
129
- // origin.host(); // "example.com"
130
- // origin.port(); // 443
131
- // origin.opaque(); // false
122
+ // * Constructing origins from GURLs (or from SchemeHostPort) is typically a red
123
+ // flag (this is true for `url::Origin::Create` but also to some extent for
124
+ // `url::Origin::Resolve`). See docs/security/origin-vs-url.md for more.
132
125
  //
133
126
  // * To answer the question "Are |this| and |that| "same-origin" with each
134
127
  // other?", use |Origin::IsSameOriginWith|:
@@ -142,29 +135,46 @@ class COMPONENT_EXPORT(URL) Origin {
142
135
  // existing origins.
143
136
  Origin();
144
137
 
145
- // Creates an Origin from |url|, as described at
146
- // https://url.spec.whatwg.org/#origin, with the following additions:
138
+ // WARNING: Converting an URL into an Origin is usually a red flag. See
139
+ // //docs/security/origin-vs-url.md for more details. Some discussion about
140
+ // deprecating the Create method can be found in https://crbug.com/1270878.
147
141
  //
148
- // 1. If |url| is invalid or non-standard, an opaque Origin is constructed.
142
+ // Creates an Origin from `url`, as described at
143
+ // https://url.spec.whatwg.org/#origin, with the following additions:
144
+ // 1. If `url` is invalid or non-standard, an opaque Origin is constructed.
149
145
  // 2. 'filesystem' URLs behave as 'blob' URLs (that is, the origin is parsed
150
146
  // out of everything in the URL which follows the scheme).
151
147
  // 3. 'file' URLs all parse as ("file", "", 0).
152
148
  //
153
- // Note that the returned Origin may have a different scheme and host from
154
- // |url| (e.g. in case of blob URLs - see OriginTest.ConstructFromGURL).
149
+ // WARNING: `url::Origin::Create(url)` can give unexpected results if:
150
+ // 1) `url` is "about:blank", or "about:srcdoc" (returning unique, opaque
151
+ // origin rather than the real origin of the frame)
152
+ // 2) `url` comes from a sandboxed frame (potentially returning a non-opaque
153
+ // origin, when an opaque one is needed; see also
154
+ // https://www.html5rocks.com/en/tutorials/security/sandboxed-iframes/)
155
+ // 3) Wrong `url` is used - e.g. in some navigations `base_url_for_data_url`
156
+ // might need to be used instead of relying on
157
+ // `content::NavigationHandle::GetURL`.
158
+ //
159
+ // WARNING: The returned Origin may have a different scheme and host from
160
+ // `url` (e.g. in case of blob URLs - see OriginTest.ConstructFromGURL).
161
+ //
162
+ // WARNING: data: URLs will be correctly be translated into opaque origins,
163
+ // but the precursor origin will be lost (unlike with `url::Origin::Resolve`).
155
164
  static Origin Create(const GURL& url);
156
165
 
157
- // Creates an Origin for the resource |url| as if it were requested
158
- // from the context of |base_origin|. If |url| is standard
166
+ // Creates an Origin for the resource `url` as if it were requested
167
+ // from the context of `base_origin`. If `url` is standard
159
168
  // (in the sense that it embeds a complete origin, like http/https),
160
169
  // this returns the same value as would Create().
161
170
  //
162
- // If |url| is "about:blank", this returns a copy of |base_origin|.
171
+ // If `url` is "about:blank" or "about:srcdoc", this returns a copy of
172
+ // `base_origin`.
163
173
  //
164
- // Otherwise, returns a new opaque origin derived from |base_origin|.
174
+ // Otherwise, returns a new opaque origin derived from `base_origin`.
165
175
  // In this case, the resulting opaque origin will inherit the tuple
166
- // (or precursor tuple) of |base_origin|, but will not be same origin
167
- // with |base_origin|, even if |base_origin| is already opaque.
176
+ // (or precursor tuple) of `base_origin`, but will not be same origin
177
+ // with `base_origin`, even if `base_origin` is already opaque.
168
178
  static Origin Resolve(const GURL& url, const Origin& base_origin);
169
179
 
170
180
  // Copyable and movable.
@@ -222,9 +232,9 @@ class COMPONENT_EXPORT(URL) Origin {
222
232
  }
223
233
 
224
234
  // Non-opaque origin is "same-origin" with `url` if their schemes, hosts, and
225
- // ports are exact matches. Opaque origin is never "same-origin" with any
235
+ // ports are exact matches. Opaque origin is never "same-origin" with any
226
236
  // `url`. about:blank, about:srcdoc, and invalid GURLs are never
227
- // "same-origin" with any origin. This method is a shorthand for
237
+ // "same-origin" with any origin. This method is a shorthand for
228
238
  // `origin.IsSameOriginWith(url::Origin::Create(url))`.
229
239
  //
230
240
  // See also CanBeDerivedFrom.
@@ -442,9 +452,9 @@ std::ostream& operator<<(std::ostream& out, const Origin::Nonce& origin);
442
452
 
443
453
  COMPONENT_EXPORT(URL) bool IsSameOriginWith(const GURL& a, const GURL& b);
444
454
 
445
- // DEBUG_ALIAS_FOR_ORIGIN(var_name, origin) copies |origin| into a new
446
- // stack-allocated variable named |<var_name>|. This helps ensure that the
447
- // value of |origin| gets preserved in crash dumps.
455
+ // DEBUG_ALIAS_FOR_ORIGIN(var_name, origin) copies `origin` into a new
456
+ // stack-allocated variable named `<var_name>`. This helps ensure that the
457
+ // value of `origin` gets preserved in crash dumps.
448
458
  #define DEBUG_ALIAS_FOR_ORIGIN(var_name, origin) \
449
459
  DEBUG_ALIAS_FOR_CSTR(var_name, (origin).Serialize().c_str(), 128)
450
460
 
@@ -133,7 +133,10 @@ class COMPONENT_EXPORT(URL) SchemeHostPort {
133
133
  std::string Serialize() const;
134
134
 
135
135
  // Efficiently returns what GURL(Serialize()) would return, without needing to
136
- // re-parse the URL.
136
+ // re-parse the URL. Note: this still performs allocations to copy data into
137
+ // GURL, so please avoid using this method if you only need to work on
138
+ // schemes, hosts, or ports individually.
139
+ // For example, see crrev.com/c/3637099/comments/782360d0_e14757be.
137
140
  GURL GetURL() const;
138
141
 
139
142
  // Two SchemeHostPort objects are "equal" iff their schemes, hosts, and ports
@@ -10,6 +10,7 @@
10
10
 
11
11
  #include "polyfills/base/component_export.h"
12
12
  #include "polyfills/base/export_template.h"
13
+ #include "base/memory/raw_ptr_exclusion.h"
13
14
  #include "url/third_party/mozilla/url_parse.h"
14
15
 
15
16
  namespace url {
@@ -139,7 +140,7 @@ class CanonOutputT {
139
140
 
140
141
  // `buffer_` is not a raw_ptr<...> for performance reasons (based on analysis
141
142
  // of sampling profiler data).
142
- T* buffer_;
143
+ RAW_PTR_EXCLUSION T* buffer_;
143
144
  int buffer_len_;
144
145
 
145
146
  // Used characters in the buffer.
@@ -25,7 +25,7 @@ void DoAppendStringOfType(const CHAR* source, int length,
25
25
  if (static_cast<UCHAR>(source[i]) >= 0x80) {
26
26
  // ReadChar will fill the code point with kUnicodeReplacementCharacter
27
27
  // when the input is invalid, which is what we want.
28
- unsigned code_point;
28
+ base_icu::UChar32 code_point;
29
29
  ReadUTFChar(source, &i, length, &code_point);
30
30
  AppendUTF8EscapedValue(code_point, output);
31
31
  } else {
@@ -233,7 +233,7 @@ const char kCharToHexLookup[8] = {
233
233
  0, // 0xE0 - 0xFF
234
234
  };
235
235
 
236
- const char16_t kUnicodeReplacementCharacter = 0xfffd;
236
+ const base_icu::UChar32 kUnicodeReplacementCharacter = 0xfffd;
237
237
 
238
238
  void AppendStringOfType(const char* source, int length,
239
239
  SharedCharTypes type,
@@ -248,8 +248,10 @@ void AppendStringOfType(const char16_t* source,
248
248
  DoAppendStringOfType<char16_t, char16_t>(source, length, type, output);
249
249
  }
250
250
 
251
- bool ReadUTFChar(const char* str, int* begin, int length,
252
- unsigned* code_point_out) {
251
+ bool ReadUTFChar(const char* str,
252
+ int* begin,
253
+ int length,
254
+ base_icu::UChar32* code_point_out) {
253
255
  // This depends on ints and int32s being the same thing. If they're not, it
254
256
  // will fail to compile.
255
257
  // TODO(mmenke): This should probably be fixed.
@@ -264,7 +266,7 @@ bool ReadUTFChar(const char* str, int* begin, int length,
264
266
  bool ReadUTFChar(const char16_t* str,
265
267
  int* begin,
266
268
  int length,
267
- unsigned* code_point_out) {
269
+ base_icu::UChar32* code_point_out) {
268
270
  // This depends on ints and int32s being the same thing. If they're not, it
269
271
  // will fail to compile.
270
272
  // TODO(mmenke): This should probably be fixed.
@@ -293,7 +295,7 @@ bool ConvertUTF16ToUTF8(const char16_t* input,
293
295
  CanonOutput* output) {
294
296
  bool success = true;
295
297
  for (int i = 0; i < input_len; i++) {
296
- unsigned code_point;
298
+ base_icu::UChar32 code_point;
297
299
  success &= ReadUTFChar(input, &i, input_len, &code_point);
298
300
  AppendUTF8Value(code_point, output);
299
301
  }
@@ -305,7 +307,7 @@ bool ConvertUTF8ToUTF16(const char* input,
305
307
  CanonOutputT<char16_t>* output) {
306
308
  bool success = true;
307
309
  for (int i = 0; i < input_len; i++) {
308
- unsigned code_point;
310
+ base_icu::UChar32 code_point;
309
311
  success &= ReadUTFChar(input, &i, input_len, &code_point);
310
312
  AppendUTF16Value(code_point, output);
311
313
  }
@@ -15,6 +15,7 @@
15
15
 
16
16
  #include "polyfills/base/component_export.h"
17
17
  #include "polyfills/base/notreached.h"
18
+ #include "base/third_party/icu/icu_utf.h"
18
19
  #include "url/url_canon.h"
19
20
 
20
21
  namespace url {
@@ -139,7 +140,7 @@ inline void AppendEscapedChar(UINCHAR ch,
139
140
  }
140
141
 
141
142
  // The character we'll substitute for undecodable or invalid characters.
142
- extern const char16_t kUnicodeReplacementCharacter;
143
+ extern const base_icu::UChar32 kUnicodeReplacementCharacter;
143
144
 
144
145
  // UTF-8 functions ------------------------------------------------------------
145
146
 
@@ -155,7 +156,7 @@ COMPONENT_EXPORT(URL)
155
156
  bool ReadUTFChar(const char* str,
156
157
  int* begin,
157
158
  int length,
158
- unsigned* code_point_out);
159
+ base_icu::UChar32* code_point_out);
159
160
 
160
161
  // Generic To-UTF-8 converter. This will call the given append method for each
161
162
  // character that should be appended, with the given output method. Wrappers
@@ -163,8 +164,10 @@ bool ReadUTFChar(const char* str,
163
164
  //
164
165
  // The char_value must have already been checked that it's a valid Unicode
165
166
  // character.
166
- template<class Output, void Appender(unsigned char, Output*)>
167
- inline void DoAppendUTF8(unsigned char_value, Output* output) {
167
+ template <class Output, void Appender(unsigned char, Output*)>
168
+ inline void DoAppendUTF8(base_icu::UChar32 char_value, Output* output) {
169
+ GURL_DCHECK(char_value >= 0);
170
+ GURL_DCHECK(char_value <= 0x10FFFF);
168
171
  if (char_value <= 0x7f) {
169
172
  Appender(static_cast<unsigned char>(char_value), output);
170
173
  } else if (char_value <= 0x7ff) {
@@ -181,7 +184,7 @@ inline void DoAppendUTF8(unsigned char_value, Output* output) {
181
184
  output);
182
185
  Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)),
183
186
  output);
184
- } else if (char_value <= 0x10FFFF) { // Max Unicode code point.
187
+ } else {
185
188
  // 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
186
189
  Appender(static_cast<unsigned char>(0xf0 | (char_value >> 18)),
187
190
  output);
@@ -189,11 +192,7 @@ inline void DoAppendUTF8(unsigned char_value, Output* output) {
189
192
  output);
190
193
  Appender(static_cast<unsigned char>(0x80 | ((char_value >> 6) & 0x3f)),
191
194
  output);
192
- Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)),
193
- output);
194
- } else {
195
- // Invalid UTF-8 character (>20 bits).
196
- GURL_NOTREACHED();
195
+ Appender(static_cast<unsigned char>(0x80 | (char_value & 0x3f)), output);
197
196
  }
198
197
  }
199
198
 
@@ -207,7 +206,7 @@ inline void AppendCharToOutput(unsigned char ch, CanonOutput* output) {
207
206
  // Writes the given character to the output as UTF-8. This does NO checking
208
207
  // of the validity of the Unicode characters; the caller should ensure that
209
208
  // the value it is appending is valid to append.
210
- inline void AppendUTF8Value(unsigned char_value, CanonOutput* output) {
209
+ inline void AppendUTF8Value(base_icu::UChar32 char_value, CanonOutput* output) {
211
210
  DoAppendUTF8<CanonOutput, AppendCharToOutput>(char_value, output);
212
211
  }
213
212
 
@@ -215,7 +214,8 @@ inline void AppendUTF8Value(unsigned char_value, CanonOutput* output) {
215
214
  // characters (even when they are ASCII). This does NO checking of the
216
215
  // validity of the Unicode characters; the caller should ensure that the value
217
216
  // it is appending is valid to append.
218
- inline void AppendUTF8EscapedValue(unsigned char_value, CanonOutput* output) {
217
+ inline void AppendUTF8EscapedValue(base_icu::UChar32 char_value,
218
+ CanonOutput* output) {
219
219
  DoAppendUTF8<CanonOutput, AppendEscapedChar>(char_value, output);
220
220
  }
221
221
 
@@ -233,10 +233,10 @@ COMPONENT_EXPORT(URL)
233
233
  bool ReadUTFChar(const char16_t* str,
234
234
  int* begin,
235
235
  int length,
236
- unsigned* code_point_out);
236
+ base_icu::UChar32* code_point_out);
237
237
 
238
238
  // Equivalent to U16_APPEND_UNSAFE in ICU but uses our output method.
239
- inline void AppendUTF16Value(unsigned code_point,
239
+ inline void AppendUTF16Value(base_icu::UChar32 code_point,
240
240
  CanonOutputT<char16_t>* output) {
241
241
  if (code_point > 0xffff) {
242
242
  output->push_back(static_cast<char16_t>((code_point >> 10) + 0xd7c0));
@@ -274,7 +274,7 @@ inline bool AppendUTF8EscapedChar(const char16_t* str,
274
274
  // UTF-16 input. ReadUTFChar will handle invalid characters for us and give
275
275
  // us the kUnicodeReplacementCharacter, so we don't have to do special
276
276
  // checking after failure, just pass through the failure to the caller.
277
- unsigned char_value;
277
+ base_icu::UChar32 char_value;
278
278
  bool success = ReadUTFChar(str, begin, length, &char_value);
279
279
  AppendUTF8EscapedValue(char_value, output);
280
280
  return success;
@@ -286,7 +286,7 @@ inline bool AppendUTF8EscapedChar(const char* str, int* begin, int length,
286
286
  // ReadUTF8Char will handle invalid characters for us and give us the
287
287
  // kUnicodeReplacementCharacter, so we don't have to do special checking
288
288
  // after failure, just pass through the failure to the caller.
289
- unsigned ch;
289
+ base_icu::UChar32 ch;
290
290
  bool success = ReadUTFChar(str, begin, length, &ch);
291
291
  AppendUTF8EscapedValue(ch, output);
292
292
  return success;
@@ -13,6 +13,7 @@
13
13
 
14
14
  #include "base/compiler_specific.h"
15
15
  #include "polyfills/base/component_export.h"
16
+ #include "base/memory/raw_ptr_exclusion.h"
16
17
  #include "base/strings/string_piece.h"
17
18
  #include "url/url_canon.h"
18
19
 
@@ -50,7 +51,7 @@ class COMPONENT_EXPORT(URL) StdStringCanonOutput : public CanonOutput {
50
51
  protected:
51
52
  // `str_` is not a raw_ptr<...> for performance reasons (based on analysis of
52
53
  // sampling profiler data and tab_search:top100:2020).
53
- std::string* str_;
54
+ RAW_PTR_EXCLUSION std::string* str_;
54
55
  };
55
56
 
56
57
  // An extension of the Replacements class that allows the setters to use
@@ -151,9 +151,9 @@ inline bool DoCompareSchemeComponent(const CHAR* spec,
151
151
  const char* compare_to) {
152
152
  if (!component.is_nonempty())
153
153
  return compare_to[0] == 0; // When component is empty, match empty scheme.
154
- return gurl_base::LowerCaseEqualsASCII(
155
- typename CharToStringPiece<CHAR>::Piece(
156
- &spec[component.begin], component.len),
154
+ return gurl_base::EqualsCaseInsensitiveASCII(
155
+ typename CharToStringPiece<CHAR>::Piece(&spec[component.begin],
156
+ component.len),
157
157
  compare_to);
158
158
  }
159
159
 
@@ -168,9 +168,10 @@ bool DoIsInSchemes(const CHAR* spec,
168
168
  return false; // Empty or invalid schemes are non-standard.
169
169
 
170
170
  for (const SchemeWithType& scheme_with_type : schemes) {
171
- if (gurl_base::LowerCaseEqualsASCII(typename CharToStringPiece<CHAR>::Piece(
172
- &spec[scheme.begin], scheme.len),
173
- scheme_with_type.scheme)) {
171
+ if (gurl_base::EqualsCaseInsensitiveASCII(
172
+ typename CharToStringPiece<CHAR>::Piece(&spec[scheme.begin],
173
+ scheme.len),
174
+ scheme_with_type.scheme)) {
174
175
  *type = scheme_with_type.type;
175
176
  return true;
176
177
  }
@@ -838,14 +839,14 @@ void DecodeURLEscapeSequences(const char* input,
838
839
  // next_ch will point to the last character of the decoded
839
840
  // character.
840
841
  int next_character = i;
841
- unsigned code_point;
842
+ base_icu::UChar32 code_point;
842
843
  if (ReadUTFChar(unescaped_chars.data(), &next_character,
843
844
  unescaped_chars.length(), &code_point)) {
844
845
  // Valid UTF-8 character, convert to UTF-16.
845
846
  AppendUTF16Value(code_point, output);
846
847
  i = next_character;
847
848
  } else if (mode == DecodeURLMode::kUTF8) {
848
- GURL_DCHECK_EQ(code_point, 0xFFFDU);
849
+ GURL_DCHECK_EQ(code_point, 0xFFFD);
849
850
  AppendUTF16Value(code_point, output);
850
851
  i = next_character;
851
852
  } else {
@@ -287,6 +287,8 @@ quiche_core_hdrs = [
287
287
  "quic/core/quic_data_reader.h",
288
288
  "quic/core/quic_data_writer.h",
289
289
  "quic/core/quic_datagram_queue.h",
290
+ "quic/core/quic_default_clock.h",
291
+ "quic/core/quic_default_connection_helper.h",
290
292
  "quic/core/quic_dispatcher.h",
291
293
  "quic/core/quic_error_codes.h",
292
294
  "quic/core/quic_flags_list.h",
@@ -613,6 +615,7 @@ quiche_core_srcs = [
613
615
  "quic/core/quic_data_reader.cc",
614
616
  "quic/core/quic_data_writer.cc",
615
617
  "quic/core/quic_datagram_queue.cc",
618
+ "quic/core/quic_default_clock.cc",
616
619
  "quic/core/quic_dispatcher.cc",
617
620
  "quic/core/quic_error_codes.cc",
618
621
  "quic/core/quic_flow_controller.cc",
@@ -932,6 +935,8 @@ epoll_tool_support_hdrs = [
932
935
  "quic/core/batch_writer/quic_batch_writer_test.h",
933
936
  "quic/core/batch_writer/quic_gso_batch_writer.h",
934
937
  "quic/core/batch_writer/quic_sendmmsg_batch_writer.h",
938
+ "quic/core/io/quic_event_loop.h",
939
+ "quic/core/io/quic_poll_event_loop.h",
935
940
  "quic/core/quic_default_packet_writer.h",
936
941
  "quic/core/quic_epoll_alarm_factory.h",
937
942
  "quic/core/quic_epoll_clock.h",
@@ -962,6 +967,7 @@ epoll_tool_support_srcs = [
962
967
  "quic/core/batch_writer/quic_batch_writer_buffer.cc",
963
968
  "quic/core/batch_writer/quic_gso_batch_writer.cc",
964
969
  "quic/core/batch_writer/quic_sendmmsg_batch_writer.cc",
970
+ "quic/core/io/quic_poll_event_loop.cc",
965
971
  "quic/core/quic_default_packet_writer.cc",
966
972
  "quic/core/quic_epoll_alarm_factory.cc",
967
973
  "quic/core/quic_epoll_clock.cc",
@@ -1275,6 +1281,7 @@ epoll_tests_srcs = [
1275
1281
  "quic/core/http/quic_spdy_client_session_test.cc",
1276
1282
  "quic/core/http/quic_spdy_client_stream_test.cc",
1277
1283
  "quic/core/http/quic_spdy_server_stream_base_test.cc",
1284
+ "quic/core/io/quic_poll_event_loop_test.cc",
1278
1285
  "quic/core/quic_epoll_alarm_factory_test.cc",
1279
1286
  "quic/core/quic_epoll_clock_test.cc",
1280
1287
  "quic/core/quic_epoll_connection_helper_test.cc",
@@ -287,6 +287,8 @@ quiche_core_hdrs = [
287
287
  "src/quiche/quic/core/quic_data_reader.h",
288
288
  "src/quiche/quic/core/quic_data_writer.h",
289
289
  "src/quiche/quic/core/quic_datagram_queue.h",
290
+ "src/quiche/quic/core/quic_default_clock.h",
291
+ "src/quiche/quic/core/quic_default_connection_helper.h",
290
292
  "src/quiche/quic/core/quic_dispatcher.h",
291
293
  "src/quiche/quic/core/quic_error_codes.h",
292
294
  "src/quiche/quic/core/quic_flags_list.h",
@@ -613,6 +615,7 @@ quiche_core_srcs = [
613
615
  "src/quiche/quic/core/quic_data_reader.cc",
614
616
  "src/quiche/quic/core/quic_data_writer.cc",
615
617
  "src/quiche/quic/core/quic_datagram_queue.cc",
618
+ "src/quiche/quic/core/quic_default_clock.cc",
616
619
  "src/quiche/quic/core/quic_dispatcher.cc",
617
620
  "src/quiche/quic/core/quic_error_codes.cc",
618
621
  "src/quiche/quic/core/quic_flow_controller.cc",
@@ -932,6 +935,8 @@ epoll_tool_support_hdrs = [
932
935
  "src/quiche/quic/core/batch_writer/quic_batch_writer_test.h",
933
936
  "src/quiche/quic/core/batch_writer/quic_gso_batch_writer.h",
934
937
  "src/quiche/quic/core/batch_writer/quic_sendmmsg_batch_writer.h",
938
+ "src/quiche/quic/core/io/quic_event_loop.h",
939
+ "src/quiche/quic/core/io/quic_poll_event_loop.h",
935
940
  "src/quiche/quic/core/quic_default_packet_writer.h",
936
941
  "src/quiche/quic/core/quic_epoll_alarm_factory.h",
937
942
  "src/quiche/quic/core/quic_epoll_clock.h",
@@ -962,6 +967,7 @@ epoll_tool_support_srcs = [
962
967
  "src/quiche/quic/core/batch_writer/quic_batch_writer_buffer.cc",
963
968
  "src/quiche/quic/core/batch_writer/quic_gso_batch_writer.cc",
964
969
  "src/quiche/quic/core/batch_writer/quic_sendmmsg_batch_writer.cc",
970
+ "src/quiche/quic/core/io/quic_poll_event_loop.cc",
965
971
  "src/quiche/quic/core/quic_default_packet_writer.cc",
966
972
  "src/quiche/quic/core/quic_epoll_alarm_factory.cc",
967
973
  "src/quiche/quic/core/quic_epoll_clock.cc",
@@ -1275,6 +1281,7 @@ epoll_tests_srcs = [
1275
1281
  "src/quiche/quic/core/http/quic_spdy_client_session_test.cc",
1276
1282
  "src/quiche/quic/core/http/quic_spdy_client_stream_test.cc",
1277
1283
  "src/quiche/quic/core/http/quic_spdy_server_stream_base_test.cc",
1284
+ "src/quiche/quic/core/io/quic_poll_event_loop_test.cc",
1278
1285
  "src/quiche/quic/core/quic_epoll_alarm_factory_test.cc",
1279
1286
  "src/quiche/quic/core/quic_epoll_clock_test.cc",
1280
1287
  "src/quiche/quic/core/quic_epoll_connection_helper_test.cc",
@@ -286,6 +286,8 @@
286
286
  "quiche/quic/core/quic_data_reader.h",
287
287
  "quiche/quic/core/quic_data_writer.h",
288
288
  "quiche/quic/core/quic_datagram_queue.h",
289
+ "quiche/quic/core/quic_default_clock.h",
290
+ "quiche/quic/core/quic_default_connection_helper.h",
289
291
  "quiche/quic/core/quic_dispatcher.h",
290
292
  "quiche/quic/core/quic_error_codes.h",
291
293
  "quiche/quic/core/quic_flags_list.h",
@@ -612,6 +614,7 @@
612
614
  "quiche/quic/core/quic_data_reader.cc",
613
615
  "quiche/quic/core/quic_data_writer.cc",
614
616
  "quiche/quic/core/quic_datagram_queue.cc",
617
+ "quiche/quic/core/quic_default_clock.cc",
615
618
  "quiche/quic/core/quic_dispatcher.cc",
616
619
  "quiche/quic/core/quic_error_codes.cc",
617
620
  "quiche/quic/core/quic_flow_controller.cc",
@@ -931,6 +934,8 @@
931
934
  "quiche/quic/core/batch_writer/quic_batch_writer_test.h",
932
935
  "quiche/quic/core/batch_writer/quic_gso_batch_writer.h",
933
936
  "quiche/quic/core/batch_writer/quic_sendmmsg_batch_writer.h",
937
+ "quiche/quic/core/io/quic_event_loop.h",
938
+ "quiche/quic/core/io/quic_poll_event_loop.h",
934
939
  "quiche/quic/core/quic_default_packet_writer.h",
935
940
  "quiche/quic/core/quic_epoll_alarm_factory.h",
936
941
  "quiche/quic/core/quic_epoll_clock.h",
@@ -961,6 +966,7 @@
961
966
  "quiche/quic/core/batch_writer/quic_batch_writer_buffer.cc",
962
967
  "quiche/quic/core/batch_writer/quic_gso_batch_writer.cc",
963
968
  "quiche/quic/core/batch_writer/quic_sendmmsg_batch_writer.cc",
969
+ "quiche/quic/core/io/quic_poll_event_loop.cc",
964
970
  "quiche/quic/core/quic_default_packet_writer.cc",
965
971
  "quiche/quic/core/quic_epoll_alarm_factory.cc",
966
972
  "quiche/quic/core/quic_epoll_clock.cc",
@@ -1274,6 +1280,7 @@
1274
1280
  "quiche/quic/core/http/quic_spdy_client_session_test.cc",
1275
1281
  "quiche/quic/core/http/quic_spdy_client_stream_test.cc",
1276
1282
  "quiche/quic/core/http/quic_spdy_server_stream_base_test.cc",
1283
+ "quiche/quic/core/io/quic_poll_event_loop_test.cc",
1277
1284
  "quiche/quic/core/quic_epoll_alarm_factory_test.cc",
1278
1285
  "quiche/quic/core/quic_epoll_clock_test.cc",
1279
1286
  "quiche/quic/core/quic_epoll_connection_helper_test.cc",
@@ -31,9 +31,13 @@ class QUICHE_EXPORT_PRIVATE QuicheMemSlice {
31
31
  QuicheMemSlice(std::unique_ptr<char[]> buffer, size_t length)
32
32
  : impl_(std::move(buffer), length) {}
33
33
 
34
- // Constructs QuicheMemSlice from |impl|. It takes the reference away from
35
- // |impl|.
36
- explicit QuicheMemSlice(QuicheMemSliceImpl impl) : impl_(std::move(impl)) {}
34
+ // Ensures the use of the in-place constructor (below) is intentional.
35
+ struct InPlace {};
36
+
37
+ // Constructs a QuicheMemSlice by constructing |impl_| in-place.
38
+ template <typename... Args>
39
+ explicit QuicheMemSlice(InPlace, Args&&... args)
40
+ : impl_{std::forward<Args>(args)...} {}
37
41
 
38
42
  QuicheMemSlice(const QuicheMemSlice& other) = delete;
39
43
  QuicheMemSlice& operator=(const QuicheMemSlice& other) = delete;