Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! src: remove calls to deprecated v8 functions (NewFromUtf8)
  • Loading branch information
ryzokuken committed Jul 21, 2018
commit 1264ad88ff85f5767ca03545d82ca33b4929687a
12 changes: 8 additions & 4 deletions src/node_perf.cc
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,18 @@ inline void InitObject(const PerformanceEntry& entry, Local<Object> obj) {
env->name_string(),
String::NewFromUtf8(isolate,
entry.name().c_str(),
String::kNormalString),
attr).FromJust();
v8::NewStringType::kNormal)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kInternalized

.ToLocalChecked(),
attr)
.FromJust();
obj->DefineOwnProperty(context,
FIXED_ONE_BYTE_STRING(isolate, "entryType"),
String::NewFromUtf8(isolate,
entry.type().c_str(),
String::kNormalString),
attr).FromJust();
v8::NewStringType::kNormal)
.ToLocalChecked(),
attr)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and here

.FromJust();
obj->DefineOwnProperty(context,
FIXED_ONE_BYTE_STRING(isolate, "startTime"),
Number::New(isolate, entry.startTime()),
Expand Down
4 changes: 2 additions & 2 deletions src/node_process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ void Cwd(const FunctionCallbackInfo<Value>& args) {

Local<String> cwd = String::NewFromUtf8(env->isolate(),
buf,
String::kNormalString,
cwd_len);
v8::NewStringType::kNormal,
cwd_len).ToLocalChecked();
args.GetReturnValue().Set(cwd);
}

Expand Down