File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,7 +23,9 @@ using v8::Just;
2323using v8::Local;
2424using v8::Maybe;
2525using v8::MaybeLocal;
26+ using v8::NewStringType;
2627using v8::Nothing;
28+ using v8::String;
2729using v8::Uint8Array;
2830using v8::Undefined;
2931using v8::Value;
@@ -442,7 +444,8 @@ MaybeLocal<Value> QuicError::ToV8Value(Environment* env) const {
442444 // names and OpenSSL TLS alert descriptions for CRYPTO_ERROR). Unknown
443445 // codes leave the slot as undefined.
444446 if (const char * n = name ()) {
445- if (!node::ToV8Value (env->context (), n).ToLocal (&argv[3 ])) {
447+ if (!String::NewFromUtf8 (env->isolate (), n, NewStringType::kInternalized )
448+ .ToLocal (&argv[3 ])) {
446449 return {};
447450 }
448451 }
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ using v8::Local;
4949using v8::LocalVector;
5050using v8::Maybe;
5151using v8::MaybeLocal;
52+ using v8::NewStringType;
5253using v8::Nothing;
5354using v8::Number;
5455using v8::Object;
@@ -3164,7 +3165,8 @@ void Session::EmitClose(const QuicError& error) {
31643165 // codes leave the slot as undefined. See QuicError::name() for the
31653166 // matching path on stream-level errors.
31663167 if (const char * n = error.name ()) {
3167- if (!ToV8Value (env ()->context (), n).ToLocal (&argv[3 ])) {
3168+ if (!String::NewFromUtf8 (env ()->isolate (), n, NewStringType::kInternalized )
3169+ .ToLocal (&argv[3 ])) {
31683170 return ;
31693171 }
31703172 }
You can’t perform that action at this time.
0 commit comments