diff --git a/src/util-inl.h b/src/util-inl.h index 69dc5b2a61a1a9..7ff6e51937bde7 100644 --- a/src/util-inl.h +++ b/src/util-inl.h @@ -157,8 +157,8 @@ inline v8::Local OneByteString(v8::Isolate* isolate, int length) { return v8::String::NewFromOneByte(isolate, reinterpret_cast(data), - v8::String::kNormalString, - length); + v8::NewStringType::kNormal, + length).ToLocalChecked(); } inline v8::Local OneByteString(v8::Isolate* isolate, @@ -166,8 +166,8 @@ inline v8::Local OneByteString(v8::Isolate* isolate, int length) { return v8::String::NewFromOneByte(isolate, reinterpret_cast(data), - v8::String::kNormalString, - length); + v8::NewStringType::kNormal, + length).ToLocalChecked(); } inline v8::Local OneByteString(v8::Isolate* isolate, @@ -175,8 +175,8 @@ inline v8::Local OneByteString(v8::Isolate* isolate, int length) { return v8::String::NewFromOneByte(isolate, reinterpret_cast(data), - v8::String::kNormalString, - length); + v8::NewStringType::kNormal, + length).ToLocalChecked(); } template