Skip to content

Commit

Permalink
src: elevate v8 namespaces for node_url.cc
Browse files Browse the repository at this point in the history
Elevate namespace for repeated entities.

PR-URL: #24573
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
  • Loading branch information
Jayasankar-m authored and BethGriggs committed Feb 11, 2019
1 parent e464a1d commit 8c48302
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/node_url.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,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;
Expand All @@ -30,7 +31,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();
}

Expand Down Expand Up @@ -2158,7 +2159,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>());
}
Expand Down Expand Up @@ -2208,7 +2209,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) {
Expand Down Expand Up @@ -2242,7 +2243,7 @@ static void ToUSVString(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(
String::NewFromTwoByte(env->isolate(),
*value,
v8::NewStringType::kNormal,
NewStringType::kNormal,
n).ToLocalChecked());
}

Expand All @@ -2263,7 +2264,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) {
Expand All @@ -2283,7 +2284,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 {
Expand Down

0 comments on commit 8c48302

Please sign in to comment.