Skip to content

Commit

Permalink
deps: fix shim for v8::Value::IntegerValue()
Browse files Browse the repository at this point in the history
This was introduced in 48d1335. Previously, values such as
`undefined` would not be coerced properly because `NumberValue()`
returns `NaN` for them.

Refs: #23158

PR-URL: #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>
  • Loading branch information
addaleax authored and targos committed Nov 1, 2018
1 parent fef17b7 commit 0312d8b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps/v8/src/api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 0312d8b

Please sign in to comment.