Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2018-10-26 12:51:50 +0300
committerMichaël Zasso <targos@protonmail.com>2018-11-01 23:47:11 +0300
commit0312d8b2cdfeca1ffb73d46ad633049fb8d7890f (patch)
tree8e0f0e80813dd56385579c3ecf4c8e5a00416af2 /deps
parentfef17b716d2c54818504f64646df1ac5c1f5b68d (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.cc2
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);
}