Commit 648fb10d authored by Niek van der Maas's avatar Niek van der Maas Committed by Commit Bot

Fix #1192941 - stack-overflow

Bug: chromium:1192941
Change-Id: Ifb17736936df6f3b1ad6081e74d802be8897fe74
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2787489Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73701}
parent 3fc2ee95
...@@ -462,8 +462,12 @@ Handle<String> Object::NoSideEffectsToString(Isolate* isolate, ...@@ -462,8 +462,12 @@ Handle<String> Object::NoSideEffectsToString(Isolate* isolate,
if (input->IsString() || input->IsNumber() || input->IsOddball()) { if (input->IsString() || input->IsNumber() || input->IsOddball()) {
return Object::ToString(isolate, input).ToHandleChecked(); return Object::ToString(isolate, input).ToHandleChecked();
} else if (input->IsJSProxy()) { } else if (input->IsJSProxy()) {
HeapObject target = Handle<JSProxy>::cast(input)->target(isolate); Handle<Object> currInput = input;
return NoSideEffectsToString(isolate, Handle<Object>(target, isolate)); do {
HeapObject target = Handle<JSProxy>::cast(currInput)->target(isolate);
currInput = Handle<Object>(target, isolate);
} while (currInput->IsJSProxy());
return NoSideEffectsToString(isolate, currInput);
} else if (input->IsBigInt()) { } else if (input->IsBigInt()) {
MaybeHandle<String> maybe_string = MaybeHandle<String> maybe_string =
BigInt::ToString(isolate, Handle<BigInt>::cast(input), 10, kDontThrow); BigInt::ToString(isolate, Handle<BigInt>::cast(input), 10, kDontThrow);
......
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