mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
http2: elevate v8 namespaces of repeated references
PR-URL: https://github.com/nodejs/node/pull/24453 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
This commit is contained in:
1 parent
53973fde9d
commit
5e3c6799cb
1 file changed
+6
-4
+6
-4
@@ -12,11 +12,13 @@
|
||||
namespace node {
|
||||
|
||||
using v8::ArrayBuffer;
|
||||
using v8::ArrayBufferCreationMode;
|
||||
using v8::Boolean;
|
||||
using v8::Context;
|
||||
using v8::Float64Array;
|
||||
using v8::Function;
|
||||
using v8::Integer;
|
||||
using v8::NewStringType;
|
||||
using v8::Number;
|
||||
using v8::ObjectTemplate;
|
||||
using v8::String;
|
||||
@@ -1411,11 +1413,11 @@ void Http2Session::HandleAltSvcFrame(const nghttp2_frame* frame) {
|
||||
Integer::New(isolate, id),
|
||||
String::NewFromOneByte(isolate,
|
||||
altsvc->origin,
|
||||
v8::NewStringType::kNormal,
|
||||
NewStringType::kNormal,
|
||||
altsvc->origin_len).ToLocalChecked(),
|
||||
String::NewFromOneByte(isolate,
|
||||
altsvc->field_value,
|
||||
v8::NewStringType::kNormal,
|
||||
NewStringType::kNormal,
|
||||
altsvc->field_value_len).ToLocalChecked(),
|
||||
};
|
||||
|
||||
@@ -1445,7 +1447,7 @@ void Http2Session::HandleOriginFrame(const nghttp2_frame* frame) {
|
||||
argv[j++] =
|
||||
String::NewFromOneByte(isolate,
|
||||
entry.origin,
|
||||
v8::NewStringType::kNormal,
|
||||
NewStringType::kNormal,
|
||||
entry.origin_len).ToLocalChecked();
|
||||
}
|
||||
if (j > 0)
|
||||
@@ -2330,7 +2332,7 @@ void HttpErrorString(const FunctionCallbackInfo<Value>& args) {
|
||||
String::NewFromOneByte(
|
||||
env->isolate(),
|
||||
reinterpret_cast<const uint8_t*>(nghttp2_strerror(val)),
|
||||
v8::NewStringType::kInternalized).ToLocalChecked());
|
||||
NewStringType::kInternalized).ToLocalChecked());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user