Skip to content

Commit 0312d8b

Browse files
addaleaxtargos
authored andcommitted
deps: fix shim for v8::Value::IntegerValue()
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>
1 parent fef17b7 commit 0312d8b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

deps/v8/src/api.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -3901,7 +3901,7 @@ double Value::NumberValue() const {
39013901

39023902

39033903
int64_t Value::IntegerValue() const {
3904-
return NumberValue(Isolate::GetCurrent()->GetCurrentContext())
3904+
return IntegerValue(Isolate::GetCurrent()->GetCurrentContext())
39053905
.FromMaybe(0);
39063906
}
39073907

0 commit comments

Comments
 (0)