deps: fix shim for v8::Value::IntegerValue()

This was introduced in 48d1335bbc. Previously, values such as
`undefined` would not be coerced properly because `NumberValue()`
returns `NaN` for them.

Refs: https://github.com/nodejs/node/pull/23158

PR-URL: https://github.com/nodejs/node/pull/23898
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Ujjwal Sharma <usharma1998@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Anna Henningsen authored and Michaël Zasso committed 2018-11-01 21:47:11 +01:00
1 parent fef17b716d
commit 0312d8b2cd
1 file changed
+1 -1
+1 -1
View File
@@ -3901,7 +3901,7 @@ double Value::NumberValue() const {
int64_t Value::IntegerValue() const {
return NumberValue(Isolate::GetCurrent()->GetCurrentContext())
return IntegerValue(Isolate::GetCurrent()->GetCurrentContext())
.FromMaybe(0);
}