Commit 23b9d13b authored by Camillo Bruni's avatar Camillo Bruni Committed by V8 LUCI CQ

[d8] Fix TestVerifySourcePositions with bound Proxy callable


Bug: chromium:1244320
Change-Id: I4472f7ffbc3f6a0ec5ca12f9e8b3501d3f0d3dc0
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3133140
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: 's avatarPatrick Thier <pthier@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76604}
parent d826adf6
...@@ -2012,8 +2012,14 @@ void Shell::TestVerifySourcePositions( ...@@ -2012,8 +2012,14 @@ void Shell::TestVerifySourcePositions(
auto callable = i::Handle<i::JSFunctionOrBoundFunction>::cast(arg_handle); auto callable = i::Handle<i::JSFunctionOrBoundFunction>::cast(arg_handle);
while (callable->IsJSBoundFunction()) { while (callable->IsJSBoundFunction()) {
internal::DisallowGarbageCollection no_gc;
auto bound_function = i::Handle<i::JSBoundFunction>::cast(callable); auto bound_function = i::Handle<i::JSBoundFunction>::cast(callable);
auto bound_target = bound_function->bound_target_function(); auto bound_target = bound_function->bound_target_function();
if (!bound_target.IsJSFunctionOrBoundFunction()) {
internal::AllowGarbageCollection allow_gc;
isolate->ThrowError("Expected function as bound target.");
return;
}
callable = callable =
handle(i::JSFunctionOrBoundFunction::cast(bound_target), i_isolate); handle(i::JSFunctionOrBoundFunction::cast(bound_target), i_isolate);
} }
......
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