From a96358fb3817be1d4102601917a64cad8640c5b4 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Fri, 26 Oct 2018 11:51:50 +0200 Subject: [PATCH] deps: fix shim for `v8::Value::IntegerValue()` This was introduced in 48d1335bbc100. Previously, values such as `undefined` would not be coerced properly because `NumberValue()` returns `NaN` for them. Refs: https://github.com/nodejs/node/pull/23158 --- deps/v8/src/api.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index fbd947b92301e3..54d1ba1afc7099 100644 --- a/deps/v8/src/api.cc +++ b/deps/v8/src/api.cc @@ -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); }