Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0b39975

Browse filesBrowse files
targosMylesBorins
authored andcommitted
src: fix usage of deprecated v8::Date::New
PR-URL: #23288 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent e865418 commit 0b39975
Copy full SHA for 0b39975

File tree

Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-2
lines changed
Open diff view settings
Collapse file

‎src/node.h‎

Copy file name to clipboardExpand all lines: src/node.h
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,11 @@ NODE_EXTERN struct uv_loop_s* GetCurrentEventLoop(v8::Isolate* isolate);
312312
/* Converts a unixtime to V8 Date */
313313
NODE_DEPRECATED("Use v8::Date::New() directly",
314314
inline v8::Local<v8::Value> NODE_UNIXTIME_V8(double time) {
315-
return v8::Date::New(v8::Isolate::GetCurrent(), 1000 * time);
316-
})
315+
return v8::Date::New(
316+
v8::Isolate::GetCurrent()->GetCurrentContext(),
317+
1000 * time)
318+
.ToLocalChecked();
319+
})
317320
#define NODE_UNIXTIME_V8 node::NODE_UNIXTIME_V8
318321
NODE_DEPRECATED("Use v8::Date::ValueOf() directly",
319322
inline double NODE_V8_UNIXTIME(v8::Local<v8::Date> date) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.