@@ -210,8 +210,7 @@ std::string Http3Settings::ToString() const {
210210 return res;
211211}
212212
213- Maybe<Http3Settings> Http3Settings::From (Environment* env,
214- Local<Value> value) {
213+ Maybe<Http3Settings> Http3Settings::From (Environment* env, Local<Value> value) {
215214 if (value.IsEmpty () || !value->IsObject ()) [[unlikely]] {
216215 THROW_ERR_INVALID_ARG_TYPE (env, " settings must be an object" );
217216 return Nothing<Http3Settings>();
@@ -249,15 +248,13 @@ Maybe<Http3Settings> Http3Settings::From(Environment* env,
249248MaybeLocal<Object> Http3Settings::ToObject (Environment* env) const {
250249 auto & binding_data = BindingData::Get (env);
251250 auto tmpl = binding_data.http3_settings_template ();
252- static constexpr std::string_view names[] = {
253- " maxHeaderPairs" ,
254- " maxHeaderLength" ,
255- " maxFieldSectionSize" ,
256- " qpackMaxDtableCapacity" ,
257- " qpackEncoderMaxDtableCapacity" ,
258- " qpackBlockedStreams" ,
259- " enableConnectProtocol"
260- };
251+ static constexpr std::string_view names[] = {" maxHeaderPairs" ,
252+ " maxHeaderLength" ,
253+ " maxFieldSectionSize" ,
254+ " qpackMaxDtableCapacity" ,
255+ " qpackEncoderMaxDtableCapacity" ,
256+ " qpackBlockedStreams" ,
257+ " enableConnectProtocol" };
261258 if (tmpl.IsEmpty ()) {
262259 tmpl = DictionaryTemplate::New (env->isolate (), names);
263260 binding_data.set_http3_settings_template (tmpl);
@@ -414,9 +411,8 @@ class Http3Application final : public Session::Application {
414411 Session& s = session ();
415412 if (s.is_destroyed () || !s.env ()->can_call_into_js ()) return ;
416413 CallbackScope<Session> cb_scope (&s);
417- s.MakeCallback (BindingData::Get (s.env ()).session_application_callback (),
418- 0 ,
419- nullptr );
414+ s.MakeCallback (
415+ BindingData::Get (s.env ()).session_application_callback (), 0 , nullptr );
420416 });
421417 }
422418
@@ -874,12 +870,12 @@ class Http3Application final : public Session::Application {
874870 ssize_t ret = 0 ;
875871 Debug (&session (), " HTTP/3 application getting stream data" );
876872 if (conn_ && session ().max_data_left ()) {
877- ret = nghttp3_conn_writev_stream (
878- *this ,
879- &data->id ,
880- &data->fin ,
881- reinterpret_cast <nghttp3_vec*>(data->data ),
882- data->count );
873+ ret =
874+ nghttp3_conn_writev_stream ( *this ,
875+ &data->id ,
876+ &data->fin ,
877+ reinterpret_cast <nghttp3_vec*>(data->data ),
878+ data->count );
883879 // A negative return value indicates an error.
884880 if (ret < 0 ) {
885881 return static_cast <int >(ret);
@@ -1151,10 +1147,9 @@ class Http3Application final : public Session::Application {
11511147 hs.headers .clear ();
11521148 hs.headers_length = 0 ;
11531149
1154- Local<Value> argv[] = {
1155- Array::New (env ()->isolate (), values.data (), count),
1156- Integer::NewFromUnsigned (env ()->isolate (),
1157- static_cast <uint32_t >(kind))};
1150+ Local<Value> argv[] = {Array::New (env ()->isolate (), values.data (), count),
1151+ Integer::NewFromUnsigned (
1152+ env ()->isolate (), static_cast <uint32_t >(kind))};
11581153
11591154 stream->MakeCallback (
11601155 binding.stream_headers_callback (), arraysize (argv), argv);
@@ -1722,8 +1717,8 @@ JS_METHOD_IMPL(Http3Binding::SendHeaders) {
17221717 // A pending stream has no id yet; defer the submission until the transport
17231718 // opens it (the priority header, if any, rides along in this header block).
17241719 if (stream->is_pending ()) {
1725- auto held = std::make_shared<Global<Array>>(binding-> env ()-> isolate (),
1726- headers);
1720+ auto held =
1721+ std::make_shared<Global<Array>>(binding-> env ()-> isolate (), headers);
17271722 stream->RunWhenOpen ([stream, flags, held]() {
17281723 Session& session = stream->session ();
17291724 if (!session.has_application ()) return ;
@@ -1807,9 +1802,8 @@ JS_METHOD_IMPL(Http3Binding::GetPriority) {
18071802 if (!session.has_application () || stream->is_pending ()) return ;
18081803
18091804 auto result = Http3App (session).GetStreamPriority (*stream);
1810- uint32_t packed =
1811- (static_cast <uint32_t >(result.priority ) << 1 ) |
1812- (result.flags == StreamPriorityFlags::INCREMENTAL ? 1 : 0 );
1805+ uint32_t packed = (static_cast <uint32_t >(result.priority ) << 1 ) |
1806+ (result.flags == StreamPriorityFlags::INCREMENTAL ? 1 : 0 );
18131807 args.GetReturnValue ().Set (packed);
18141808}
18151809
@@ -1836,9 +1830,8 @@ void CreateHttp3Handle(const FunctionCallbackInfo<Value>& args) {
18361830 if (session->is_server () && !session->application ().Start ()) {
18371831 // Start() failed (e.g. the peer's initial_max_streams_uni is < 3), so
18381832 // the application cannot run HTTP/3.
1839- THROW_ERR_INVALID_STATE (
1840- session->env (),
1841- " The HTTP/3 application could not be started" );
1833+ THROW_ERR_INVALID_STATE (session->env (),
1834+ " The HTTP/3 application could not be started" );
18421835 return ;
18431836 }
18441837 }
@@ -1888,8 +1881,7 @@ Http3Settings ResolveHttp3Settings(const Session::Options& options) {
18881881std::unique_ptr<Session::Application> CreateHttp3Application (Session* session) {
18891882 Debug (session, " Installing HTTP/3 application" );
18901883 return std::make_unique<Http3Application>(
1891- session,
1892- ResolveHttp3Settings (std::as_const (*session).config ().options ));
1884+ session, ResolveHttp3Settings (std::as_const (*session).config ().options ));
18931885}
18941886
18951887Maybe<std::shared_ptr<void >> ParseHttp3Settings (Environment* env,
0 commit comments