Permalink
Browse files

src: elevate v8 namespaces for node_url.cc

Elevate namespace for repeated entities.

PR-URL: #24573
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
  • Loading branch information...
Jayasankar-m authored and Trott committed Nov 23, 2018
1 parent 63aef2d commit c5db2df32588a954dc8d74eef08da7d57e93a3b2
Showing with 7 additions and 6 deletions.
  1. +7 −6 src/node_url.cc
@@ -21,6 +21,7 @@ using v8::Integer;
using v8::Isolate;
using v8::Local;
using v8::MaybeLocal;
using v8::NewStringType;
using v8::Null;
using v8::Object;
using v8::String;
@@ -31,7 +32,7 @@ using v8::Value;
inline Local<String> Utf8String(Isolate* isolate, const std::string& str) {
return String::NewFromUtf8(isolate,
str.data(),
v8::NewStringType::kNormal,
NewStringType::kNormal,
str.length()).ToLocalChecked();
}
@@ -2159,7 +2160,7 @@ static void Parse(Environment* env,
argv[ERR_ARG_INPUT] =
String::NewFromUtf8(env->isolate(),
input,
v8::NewStringType::kNormal).ToLocalChecked();
NewStringType::kNormal).ToLocalChecked();
error_cb.As<Function>()->Call(context, recv, arraysize(argv), argv)
.FromMaybe(Local<Value>());
}
@@ -2209,7 +2210,7 @@ static void EncodeAuthSet(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(
String::NewFromUtf8(env->isolate(),
output.c_str(),
v8::NewStringType::kNormal).ToLocalChecked());
NewStringType::kNormal).ToLocalChecked());
}
static void ToUSVString(const FunctionCallbackInfo<Value>& args) {
@@ -2243,7 +2244,7 @@ static void ToUSVString(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(
String::NewFromTwoByte(env->isolate(),
*value,
v8::NewStringType::kNormal,
NewStringType::kNormal,
n).ToLocalChecked());
}
@@ -2264,7 +2265,7 @@ static void DomainToASCII(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(
String::NewFromUtf8(env->isolate(),
out.c_str(),
v8::NewStringType::kNormal).ToLocalChecked());
NewStringType::kNormal).ToLocalChecked());
}
static void DomainToUnicode(const FunctionCallbackInfo<Value>& args) {
@@ -2284,7 +2285,7 @@ static void DomainToUnicode(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(
String::NewFromUtf8(env->isolate(),
out.c_str(),
v8::NewStringType::kNormal).ToLocalChecked());
NewStringType::kNormal).ToLocalChecked());
}
std::string URL::ToFilePath() const {

0 comments on commit c5db2df

Please sign in to comment.