From 0312d8b2cdfeca1ffb73d46ad633049fb8d7890f 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()` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 PR-URL: https://github.com/nodejs/node/pull/23898 Reviewed-By: Michaƫl Zasso Reviewed-By: Ujjwal Sharma Reviewed-By: Colin Ihrig Reviewed-By: Refael Ackermann Reviewed-By: James M Snell --- 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); }