Skip to content

Commit

Permalink
src: replace deprecated String::NewFromOneByte
Browse files Browse the repository at this point in the history
PR-URL: #4722
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
  • Loading branch information
targos authored and Ali Sheikh committed Mar 4, 2016
1 parent 953173b commit 81f1732
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/util-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -157,26 +157,26 @@ inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
int length) {
return v8::String::NewFromOneByte(isolate,
reinterpret_cast<const uint8_t*>(data),
v8::String::kNormalString,
length);
v8::NewStringType::kNormal,
length).ToLocalChecked();
}

inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
const signed char* data,
int length) {
return v8::String::NewFromOneByte(isolate,
reinterpret_cast<const uint8_t*>(data),
v8::String::kNormalString,
length);
v8::NewStringType::kNormal,
length).ToLocalChecked();
}

inline v8::Local<v8::String> OneByteString(v8::Isolate* isolate,
const unsigned char* data,
int length) {
return v8::String::NewFromOneByte(isolate,
reinterpret_cast<const uint8_t*>(data),
v8::String::kNormalString,
length);
v8::NewStringType::kNormal,
length).ToLocalChecked();
}

template <typename TypeName>
Expand Down

0 comments on commit 81f1732

Please sign in to comment.