Commit 33789183 authored by Adam Klein's avatar Adam Klein Committed by Commit Bot

[builtins] Allow API callbacks to return BigInts

This fixes the debug code which checks that API callbacks
return only valid JS values: BigInt was missing from the list
of allowable types.

Bug: chromium:985115
Change-Id: I8b3db409bd99e9e9b936d520d0fdbe75654e7602
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1706623Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Adam Klein <adamk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62812}
parent 6e0473f3
......@@ -3093,6 +3093,9 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ CompareRoot(map, RootIndex::kHeapNumberMap);
__ j(equal, &ok, Label::kNear);
__ CompareRoot(map, RootIndex::kBigIntMap);
__ j(equal, &ok, Label::kNear);
__ CompareRoot(return_value, RootIndex::kUndefinedValue);
__ j(equal, &ok, Label::kNear);
......
......@@ -3076,6 +3076,9 @@ void CallApiFunctionAndReturn(MacroAssembler* masm, Register function_address,
__ CompareRoot(map, RootIndex::kHeapNumberMap);
__ j(equal, &ok, Label::kNear);
__ CompareRoot(map, RootIndex::kBigIntMap);
__ j(equal, &ok, Label::kNear);
__ CompareRoot(return_value, RootIndex::kUndefinedValue);
__ j(equal, &ok, Label::kNear);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment