@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.
- package/package.json +1 -1
- package/readme.md +1 -3
- package/src/http3eventloop.cc +83 -9
- package/src/http3eventloop.h +13 -3
- package/src/http3server.cc +22 -22
- package/src/http3server.h +7 -20
- package/src/http3wtstreamvisitor.cc +31 -10
- package/src/http3wtstreamvisitor.h +38 -11
- package/src/webtransport.js +91 -23
- package/test/echoserver.js +29 -5
- package/test/testsuite.js +242 -220
- package/third_party/boringssl/src/CMakeLists.txt +2 -0
- package/third_party/boringssl/src/crypto/CMakeLists.txt +1 -0
- package/third_party/boringssl/src/crypto/asn1/a_bitstr.c +174 -177
- package/third_party/boringssl/src/crypto/asn1/a_bool.c +46 -48
- package/third_party/boringssl/src/crypto/asn1/a_d2i_fp.c +21 -23
- package/third_party/boringssl/src/crypto/asn1/a_dup.c +21 -23
- package/third_party/boringssl/src/crypto/asn1/a_gentm.c +84 -187
- package/third_party/boringssl/src/crypto/asn1/a_i2d_fp.c +19 -21
- package/third_party/boringssl/src/crypto/asn1/a_int.c +305 -329
- package/third_party/boringssl/src/crypto/asn1/a_mbstr.c +190 -195
- package/third_party/boringssl/src/crypto/asn1/a_object.c +182 -189
- package/third_party/boringssl/src/crypto/asn1/a_octet.c +6 -9
- package/third_party/boringssl/src/crypto/asn1/a_print.c +15 -16
- package/third_party/boringssl/src/crypto/asn1/a_strex.c +386 -399
- package/third_party/boringssl/src/crypto/asn1/a_strnid.c +110 -131
- package/third_party/boringssl/src/crypto/asn1/a_time.c +118 -111
- package/third_party/boringssl/src/crypto/asn1/a_type.c +59 -60
- package/third_party/boringssl/src/crypto/asn1/a_utctm.c +114 -186
- package/third_party/boringssl/src/crypto/asn1/a_utf8.c +171 -159
- package/third_party/boringssl/src/crypto/asn1/asn1_lib.c +245 -260
- package/third_party/boringssl/src/crypto/asn1/asn1_par.c +41 -40
- package/third_party/boringssl/src/crypto/asn1/asn1_test.cc +31 -0
- package/third_party/boringssl/src/crypto/asn1/asn_pack.c +31 -33
- package/third_party/boringssl/src/crypto/asn1/f_int.c +36 -33
- package/third_party/boringssl/src/crypto/asn1/f_string.c +29 -26
- package/third_party/boringssl/src/crypto/asn1/internal.h +62 -61
- package/third_party/boringssl/src/crypto/asn1/tasn_dec.c +706 -702
- package/third_party/boringssl/src/crypto/asn1/tasn_enc.c +507 -524
- package/third_party/boringssl/src/crypto/asn1/tasn_fre.c +141 -133
- package/third_party/boringssl/src/crypto/asn1/tasn_new.c +207 -199
- package/third_party/boringssl/src/crypto/asn1/tasn_typ.c +19 -22
- package/third_party/boringssl/src/crypto/asn1/tasn_utl.c +24 -24
- package/third_party/boringssl/src/crypto/asn1/time_support.c +13 -13
- package/third_party/boringssl/src/crypto/bio/connect.c +9 -3
- package/third_party/boringssl/src/crypto/bytestring/bytestring_test.cc +125 -1
- package/third_party/boringssl/src/crypto/bytestring/cbb.c +4 -7
- package/third_party/boringssl/src/crypto/bytestring/cbs.c +167 -9
- package/third_party/boringssl/src/crypto/cipher_extra/e_aesctrhmac.c +0 -2
- package/third_party/boringssl/src/crypto/cipher_extra/e_aesgcmsiv.c +23 -54
- package/third_party/boringssl/src/crypto/cipher_extra/e_chacha20poly1305.c +0 -2
- package/third_party/boringssl/src/crypto/cipher_extra/e_tls.c +0 -2
- package/third_party/boringssl/src/crypto/curve25519/curve25519.c +6 -8
- package/third_party/boringssl/src/crypto/evp/evp_ctx.c +25 -22
- package/third_party/boringssl/src/crypto/evp/internal.h +15 -9
- package/third_party/boringssl/src/crypto/evp/p_dsa_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_ec_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_ed25519.c +3 -3
- package/third_party/boringssl/src/crypto/evp/p_ed25519_asn1.c +10 -7
- package/third_party/boringssl/src/crypto/evp/p_hkdf.c +241 -0
- package/third_party/boringssl/src/crypto/evp/p_rsa_asn1.c +2 -0
- package/third_party/boringssl/src/crypto/evp/p_x25519_asn1.c +1 -0
- package/third_party/boringssl/src/crypto/fipsmodule/aes/aes_nohw.c +9 -10
- package/third_party/boringssl/src/crypto/fipsmodule/aes/key_wrap.c +2 -6
- package/third_party/boringssl/src/crypto/fipsmodule/bn/exponentiation.c +5 -11
- package/third_party/boringssl/src/crypto/fipsmodule/bn/internal.h +1 -1
- package/third_party/boringssl/src/crypto/fipsmodule/bn/prime.c +2 -0
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aes.c +10 -26
- package/third_party/boringssl/src/crypto/fipsmodule/cipher/e_aesccm.c +2 -3
- package/third_party/boringssl/src/crypto/fipsmodule/digestsign/digestsign.c +1 -0
- package/third_party/boringssl/src/crypto/fipsmodule/ec/p256-nistz.c +44 -43
- package/third_party/boringssl/src/crypto/fipsmodule/modes/cbc.c +5 -9
- package/third_party/boringssl/src/crypto/fipsmodule/modes/gcm.c +14 -21
- package/third_party/boringssl/src/crypto/fipsmodule/rand/ctrdrbg.c +8 -8
- package/third_party/boringssl/src/crypto/fipsmodule/rand/internal.h +1 -4
- package/third_party/boringssl/src/crypto/hkdf/hkdf_test.cc +104 -0
- package/third_party/boringssl/src/crypto/internal.h +18 -4
- package/third_party/boringssl/src/crypto/lhash/internal.h +13 -1
- package/third_party/boringssl/src/crypto/obj/obj_dat.h +4 -1
- package/third_party/boringssl/src/crypto/obj/obj_mac.num +1 -0
- package/third_party/boringssl/src/crypto/obj/objects.txt +2 -0
- package/third_party/boringssl/src/crypto/pem/pem_all.c +77 -86
- package/third_party/boringssl/src/crypto/pem/pem_info.c +221 -233
- package/third_party/boringssl/src/crypto/pem/pem_lib.c +639 -608
- package/third_party/boringssl/src/crypto/pem/pem_oth.c +17 -16
- package/third_party/boringssl/src/crypto/pem/pem_pk8.c +133 -142
- package/third_party/boringssl/src/crypto/pem/pem_pkey.c +96 -92
- package/third_party/boringssl/src/crypto/poly1305/poly1305_vec.c +12 -28
- package/third_party/boringssl/src/crypto/siphash/siphash.c +8 -11
- package/third_party/boringssl/src/crypto/siphash/siphash_test.cc +5 -7
- package/third_party/boringssl/src/crypto/stack/stack.c +33 -16
- package/third_party/boringssl/src/crypto/thread_pthread.c +0 -2
- package/third_party/boringssl/src/crypto/thread_win.c +0 -2
- package/third_party/boringssl/src/crypto/trust_token/internal.h +14 -0
- package/third_party/boringssl/src/crypto/trust_token/pmbtoken.c +127 -30
- package/third_party/boringssl/src/crypto/trust_token/trust_token.c +40 -0
- package/third_party/boringssl/src/crypto/trust_token/trust_token_test.cc +165 -0
- package/third_party/boringssl/src/crypto/trust_token/voprf.c +55 -6
- package/third_party/boringssl/src/crypto/x509/a_digest.c +23 -24
- package/third_party/boringssl/src/crypto/x509/a_sign.c +52 -55
- package/third_party/boringssl/src/crypto/x509/a_verify.c +33 -34
- package/third_party/boringssl/src/crypto/x509/algorithm.c +17 -18
- package/third_party/boringssl/src/crypto/x509/asn1_gen.c +618 -612
- package/third_party/boringssl/src/crypto/x509/by_dir.c +320 -337
- package/third_party/boringssl/src/crypto/x509/by_file.c +186 -186
- package/third_party/boringssl/src/crypto/x509/i2d_pr.c +11 -14
- package/third_party/boringssl/src/crypto/x509/internal.h +22 -22
- package/third_party/boringssl/src/crypto/x509/name_print.c +155 -150
- package/third_party/boringssl/src/crypto/x509/rsa_pss.c +27 -29
- package/third_party/boringssl/src/crypto/x509/t_crl.c +67 -70
- package/third_party/boringssl/src/crypto/x509/t_req.c +3 -5
- package/third_party/boringssl/src/crypto/x509/t_x509.c +280 -251
- package/third_party/boringssl/src/crypto/x509/t_x509a.c +52 -47
- package/third_party/boringssl/src/crypto/x509/x509.c +3 -4
- package/third_party/boringssl/src/crypto/x509/x509_att.c +234 -223
- package/third_party/boringssl/src/crypto/x509/x509_cmp.c +286 -296
- package/third_party/boringssl/src/crypto/x509/x509_d2.c +37 -32
- package/third_party/boringssl/src/crypto/x509/x509_def.c +14 -30
- package/third_party/boringssl/src/crypto/x509/x509_ext.c +55 -84
- package/third_party/boringssl/src/crypto/x509/x509_lu.c +545 -581
- package/third_party/boringssl/src/crypto/x509/x509_obj.c +131 -121
- package/third_party/boringssl/src/crypto/x509/x509_req.c +120 -139
- package/third_party/boringssl/src/crypto/x509/x509_set.c +128 -142
- package/third_party/boringssl/src/crypto/x509/x509_trs.c +185 -193
- package/third_party/boringssl/src/crypto/x509/x509_txt.c +70 -72
- package/third_party/boringssl/src/crypto/x509/x509_v3.c +172 -161
- package/third_party/boringssl/src/crypto/x509/x509_vfy.c +2041 -2053
- package/third_party/boringssl/src/crypto/x509/x509_vpm.c +441 -461
- package/third_party/boringssl/src/crypto/x509/x509cset.c +152 -170
- package/third_party/boringssl/src/crypto/x509/x509name.c +274 -260
- package/third_party/boringssl/src/crypto/x509/x509rset.c +43 -20
- package/third_party/boringssl/src/crypto/x509/x509spki.c +62 -63
- package/third_party/boringssl/src/crypto/x509/x_algor.c +64 -62
- package/third_party/boringssl/src/crypto/x509/x_all.c +103 -133
- package/third_party/boringssl/src/crypto/x509/x_attrib.c +23 -24
- package/third_party/boringssl/src/crypto/x509/x_crl.c +310 -321
- package/third_party/boringssl/src/crypto/x509/x_exten.c +6 -5
- package/third_party/boringssl/src/crypto/x509/x_info.c +31 -28
- package/third_party/boringssl/src/crypto/x509/x_name.c +361 -365
- package/third_party/boringssl/src/crypto/x509/x_pkey.c +38 -32
- package/third_party/boringssl/src/crypto/x509/x_pubkey.c +114 -117
- package/third_party/boringssl/src/crypto/x509/x_req.c +27 -29
- package/third_party/boringssl/src/crypto/x509/x_sig.c +2 -2
- package/third_party/boringssl/src/crypto/x509/x_spki.c +8 -10
- package/third_party/boringssl/src/crypto/x509/x_val.c +2 -2
- package/third_party/boringssl/src/crypto/x509/x_x509.c +212 -226
- package/third_party/boringssl/src/crypto/x509/x_x509a.c +112 -109
- package/third_party/boringssl/src/crypto/x509v3/ext_dat.h +10 -13
- package/third_party/boringssl/src/crypto/x509v3/internal.h +72 -87
- package/third_party/boringssl/src/crypto/x509v3/pcy_cache.c +184 -176
- package/third_party/boringssl/src/crypto/x509v3/pcy_data.c +58 -56
- package/third_party/boringssl/src/crypto/x509v3/pcy_lib.c +71 -70
- package/third_party/boringssl/src/crypto/x509v3/pcy_map.c +56 -58
- package/third_party/boringssl/src/crypto/x509v3/pcy_node.c +89 -91
- package/third_party/boringssl/src/crypto/x509v3/pcy_tree.c +585 -590
- package/third_party/boringssl/src/crypto/x509v3/v3_akey.c +118 -112
- package/third_party/boringssl/src/crypto/x509v3/v3_akeya.c +3 -3
- package/third_party/boringssl/src/crypto/x509v3/v3_alt.c +447 -451
- package/third_party/boringssl/src/crypto/x509v3/v3_bcons.c +44 -38
- package/third_party/boringssl/src/crypto/x509v3/v3_bitst.c +39 -43
- package/third_party/boringssl/src/crypto/x509v3/v3_conf.c +321 -320
- package/third_party/boringssl/src/crypto/x509v3/v3_cpols.c +352 -327
- package/third_party/boringssl/src/crypto/x509v3/v3_crld.c +437 -383
- package/third_party/boringssl/src/crypto/x509v3/v3_enum.c +23 -16
- package/third_party/boringssl/src/crypto/x509v3/v3_extku.c +62 -53
- package/third_party/boringssl/src/crypto/x509v3/v3_genn.c +118 -115
- package/third_party/boringssl/src/crypto/x509v3/v3_ia5.c +30 -31
- package/third_party/boringssl/src/crypto/x509v3/v3_info.c +112 -98
- package/third_party/boringssl/src/crypto/x509v3/v3_int.c +40 -15
- package/third_party/boringssl/src/crypto/x509v3/v3_lib.c +248 -252
- package/third_party/boringssl/src/crypto/x509v3/v3_ncons.c +390 -386
- package/third_party/boringssl/src/crypto/x509v3/v3_ocsp.c +45 -32
- package/third_party/boringssl/src/crypto/x509v3/v3_pci.c +206 -209
- package/third_party/boringssl/src/crypto/x509v3/v3_pcia.c +6 -8
- package/third_party/boringssl/src/crypto/x509v3/v3_pcons.c +54 -50
- package/third_party/boringssl/src/crypto/x509v3/v3_pmaps.c +66 -65
- package/third_party/boringssl/src/crypto/x509v3/v3_prn.c +144 -133
- package/third_party/boringssl/src/crypto/x509v3/v3_purp.c +695 -709
- package/third_party/boringssl/src/crypto/x509v3/v3_skey.c +75 -69
- package/third_party/boringssl/src/crypto/x509v3/v3_utl.c +1102 -1082
- package/third_party/boringssl/src/include/openssl/base.h +3 -1
- package/third_party/boringssl/src/include/openssl/bn.h +3 -0
- package/third_party/boringssl/src/include/openssl/bytestring.h +20 -0
- package/third_party/boringssl/src/include/openssl/evp.h +6 -5
- package/third_party/boringssl/src/include/openssl/kdf.h +91 -0
- package/third_party/boringssl/src/include/openssl/nid.h +4 -0
- package/third_party/boringssl/src/include/openssl/ssl.h +6 -1
- package/third_party/boringssl/src/include/openssl/stack.h +47 -32
- package/third_party/boringssl/src/include/openssl/trust_token.h +18 -3
- package/third_party/boringssl/src/include/openssl/x509.h +18 -0
- package/third_party/boringssl/src/ssl/ssl_file.cc +61 -99
- package/third_party/boringssl/src/ssl/ssl_test.cc +101 -0
- package/third_party/boringssl/src/util/doc.config +2 -1
- package/third_party/boringssl/src/util/fipstools/acvp/acvptool/subprocess/subprocess.go +8 -0
- package/third_party/googleurl/AUTHORS +16 -2
- package/third_party/googleurl/base/BUILD +1 -0
- package/third_party/googleurl/base/compiler_specific.h +16 -17
- package/third_party/googleurl/base/containers/contiguous_iterator.h +13 -9
- package/third_party/googleurl/base/containers/span.h +23 -8
- package/third_party/googleurl/base/memory/raw_ptr.h +17 -25
- package/third_party/googleurl/base/memory/raw_ptr_exclusion.h +21 -0
- package/third_party/googleurl/base/strings/escape.cc +14 -2
- package/third_party/googleurl/base/strings/safe_sprintf.h +1 -1
- package/third_party/googleurl/base/strings/string_number_conversions.cc +5 -3
- package/third_party/googleurl/base/strings/string_number_conversions_internal.h +5 -5
- package/third_party/googleurl/base/strings/string_piece.h +3 -3
- package/third_party/googleurl/base/strings/string_util.cc +4 -27
- package/third_party/googleurl/base/strings/string_util.h +43 -8
- package/third_party/googleurl/base/strings/string_util_internal.h +11 -12
- package/third_party/googleurl/base/strings/string_util_unittest.cc +33 -0
- package/third_party/googleurl/base/strings/string_util_win.cc +0 -5
- package/third_party/googleurl/base/strings/string_util_win.h +9 -1
- package/third_party/googleurl/base/strings/utf_offset_string_conversions.cc +1 -1
- package/third_party/googleurl/base/strings/utf_string_conversion_utils.cc +5 -8
- package/third_party/googleurl/base/strings/utf_string_conversion_utils.h +13 -10
- package/third_party/googleurl/base/strings/utf_string_conversions.cc +32 -25
- package/third_party/googleurl/base/template_util.h +23 -35
- package/third_party/googleurl/build/build_config.h +14 -3
- package/third_party/googleurl/copy.bara.sky +1 -1
- package/third_party/googleurl/url/gurl.cc +8 -4
- package/third_party/googleurl/url/gurl.h +1 -0
- package/third_party/googleurl/url/gurl_unittest.cc +1 -0
- package/third_party/googleurl/url/origin.h +36 -26
- package/third_party/googleurl/url/scheme_host_port.h +4 -1
- package/third_party/googleurl/url/url_canon.h +2 -1
- package/third_party/googleurl/url/url_canon_internal.cc +9 -7
- package/third_party/googleurl/url/url_canon_internal.h +16 -16
- package/third_party/googleurl/url/url_canon_stdstring.h +2 -1
- package/third_party/googleurl/url/url_util.cc +9 -8
- package/third_party/quiche/build/source_list.bzl +7 -0
- package/third_party/quiche/build/source_list.gni +7 -0
- package/third_party/quiche/build/source_list.json +7 -0
- package/third_party/quiche/quiche/common/platform/api/quiche_mem_slice.h +7 -3
- package/third_party/quiche/quiche/http2/adapter/nghttp2_adapter_test.cc +86 -2
- package/third_party/quiche/quiche/http2/adapter/oghttp2_adapter_test.cc +104 -2
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.cc +23 -0
- package/third_party/quiche/quiche/http2/adapter/oghttp2_session.h +6 -1
- package/third_party/quiche/quiche/quic/core/congestion_control/send_algorithm_test.cc +0 -16
- package/third_party/quiche/quiche/quic/core/crypto/crypto_protocol.h +1 -1
- package/third_party/quiche/quiche/quic/core/http/end_to_end_test.cc +56 -2
- package/third_party/quiche/quiche/quic/core/http/http_constants.cc +1 -0
- package/third_party/quiche/quiche/quic/core/http/http_constants.h +1 -0
- package/third_party/quiche/quiche/quic/core/http/http_encoder.cc +28 -17
- package/third_party/quiche/quiche/quic/core/http/http_encoder.h +5 -0
- package/third_party/quiche/quiche/quic/core/http/http_encoder_test.cc +26 -30
- package/third_party/quiche/quiche/quic/core/http/http_frames.h +1 -0
- package/third_party/quiche/quiche/quic/core/http/quic_server_session_base.cc +4 -4
- package/third_party/quiche/quiche/quic/core/http/quic_server_session_base_test.cc +1 -1
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_client_session.cc +5 -1
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.cc +6 -33
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream.h +0 -17
- package/third_party/quiche/quiche/quic/core/http/quic_spdy_stream_test.cc +5 -20
- package/third_party/quiche/quiche/quic/core/io/quic_event_loop.h +81 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.cc +265 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop.h +152 -0
- package/third_party/quiche/quiche/quic/core/io/quic_poll_event_loop_test.cc +341 -0
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.cc +3 -1
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store.h +7 -7
- package/third_party/quiche/quiche/quic/core/quic_buffered_packet_store_test.cc +4 -3
- package/third_party/quiche/quiche/quic/core/quic_connection.cc +69 -19
- package/third_party/quiche/quiche/quic/core/quic_connection.h +9 -3
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.cc +29 -10
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager.h +5 -3
- package/third_party/quiche/quiche/quic/core/quic_connection_id_manager_test.cc +85 -22
- package/third_party/quiche/quiche/quic/core/quic_connection_test.cc +186 -30
- package/third_party/quiche/quiche/quic/core/quic_crypto_stream.cc +2 -1
- package/third_party/quiche/quiche/quic/core/quic_default_clock.cc +31 -0
- package/third_party/quiche/quiche/quic/core/quic_default_clock.h +34 -0
- package/third_party/quiche/quiche/quic/core/quic_default_connection_helper.h +49 -0
- package/third_party/quiche/quiche/quic/core/quic_dispatcher.cc +53 -37
- package/third_party/quiche/quiche/quic/core/quic_dispatcher.h +19 -11
- package/third_party/quiche/quiche/quic/core/quic_dispatcher_test.cc +15 -2
- package/third_party/quiche/quiche/quic/core/quic_flags_list.h +10 -4
- package/third_party/quiche/quiche/quic/core/quic_idle_network_detector.cc +2 -2
- package/third_party/quiche/quiche/quic/core/quic_idle_network_detector_test.cc +4 -4
- package/third_party/quiche/quiche/quic/core/quic_packet_creator.cc +14 -3
- package/third_party/quiche/quiche/quic/core/quic_packet_creator_test.cc +145 -2
- package/third_party/quiche/quiche/quic/core/quic_packets.cc +3 -1
- package/third_party/quiche/quiche/quic/core/quic_packets.h +4 -0
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.cc +13 -11
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager.h +9 -0
- package/third_party/quiche/quiche/quic/core/quic_sent_packet_manager_test.cc +6 -0
- package/third_party/quiche/quiche/quic/core/quic_session.cc +3 -2
- package/third_party/quiche/quiche/quic/core/quic_session.h +8 -3
- package/third_party/quiche/quiche/quic/core/quic_types.cc +18 -0
- package/third_party/quiche/quiche/quic/core/quic_types.h +3 -0
- package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.cc +3 -0
- package/third_party/quiche/quiche/quic/core/tls_chlo_extractor.h +10 -0
- package/third_party/quiche/quiche/quic/test_tools/mock_quic_session_visitor.h +1 -1
- package/third_party/quiche/quiche/quic/test_tools/quic_test_utils.h +1 -1
- package/third_party/quiche/quiche/quic/test_tools/server_thread.cc +3 -2
- package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.cc +7 -1
- package/third_party/quiche/quiche/quic/test_tools/simple_session_notifier.h +3 -0
- package/third_party/quiche/quiche/quic/test_tools/simulator/quic_endpoint.h +4 -2
- package/certs/ca.cnf +0 -69
- package/certs/generate_certs.sh +0 -53
- package/certs/generate_certs_leaf.sh +0 -53
- package/certs/leaf.cnf +0 -24
- package/certs/readme.txt +0 -2
- 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 /
|
|
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
|
|
444
|
-
|
|
447
|
+
return gurl_base::StringPiece();
|
|
448
|
+
url::Component content_component = parsed_.GetContent();
|
|
445
449
|
if (!SchemeIs(url::kJavaScriptScheme) && parsed_.ref.len >= 0)
|
|
446
|
-
|
|
447
|
-
return
|
|
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.
|
|
@@ -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
|
-
//
|
|
123
|
-
//
|
|
124
|
-
//
|
|
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
|
-
//
|
|
146
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
154
|
-
//
|
|
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
|
|
158
|
-
// from the context of
|
|
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
|
|
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
|
|
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
|
|
167
|
-
// with
|
|
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.
|
|
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.
|
|
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
|
|
446
|
-
// stack-allocated variable named
|
|
447
|
-
// value of
|
|
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
|
-
|
|
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
|
|
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,
|
|
252
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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(
|
|
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
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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::
|
|
155
|
-
typename CharToStringPiece<CHAR>::Piece(
|
|
156
|
-
|
|
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::
|
|
172
|
-
|
|
173
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
//
|
|
35
|
-
|
|
36
|
-
|
|
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;
|