Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: fix usage of deprecated v8::Date::New #23288

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/node.h
Expand Up @@ -287,8 +287,11 @@ NODE_EXTERN struct uv_loop_s* GetCurrentEventLoop(v8::Isolate* isolate);
/* Converts a unixtime to V8 Date */
NODE_DEPRECATED("Use v8::Date::New() directly",
inline v8::Local<v8::Value> NODE_UNIXTIME_V8(double time) {
return v8::Date::New(v8::Isolate::GetCurrent(), 1000 * time);
})
return v8::Date::New(
refack marked this conversation as resolved.
Show resolved Hide resolved
v8::Isolate::GetCurrent()->GetCurrentContext(),
1000 * time)
.ToLocalChecked();
})
#define NODE_UNIXTIME_V8 node::NODE_UNIXTIME_V8
NODE_DEPRECATED("Use v8::Date::ValueOf() directly",
inline double NODE_V8_UNIXTIME(v8::Local<v8::Date> date) {
Expand Down