diff options
author | Anna Henningsen <anna@addaleax.net> | 2018-10-26 12:51:50 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2018-10-27 11:28:29 +0300 |
commit | ffa5c7e054a9835649d580d94c898b174447a741 (patch) | |
tree | f9c5ce92421ac920842fed9a617c1863654a0e0b /deps | |
parent | 5c5bb36b742e45eba8d587412bf33977aa00cc02 (diff) |
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
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>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/src/api.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/v8/src/api.cc b/deps/v8/src/api.cc index fbd947b9230..54d1ba1afc7 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); } |