LibWeb: Don't swallow args when forwarding cross-origin WindowProxy call
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-24.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-24.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-24.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run

Fixes at least one WPT test that was previously timing out:
- html/semantics/document-metadata/the-base-element/base_target_does_not_affect_iframe_src_navigation.html
This commit is contained in:
Andreas Kling 2024-10-03 15:48:35 +02:00 committed by Andreas Kling
parent 8cfe51cef4
commit 0b403d30d7
Notes: github-actions[bot] 2024-10-03 18:50:34 +00:00
3 changed files with 15 additions and 3 deletions

View file

@ -0,0 +1,11 @@
<script src="../include.js"></script>
<iframe id="i"></iframe>
<script>
asyncTest((done) => {
window.onmessage = function() {
println("PASS");
done();
};
i.src = "data:text/html,<script>top.postMessage('done', '*');</sc" + "ript>";
});
</script>

View file

@ -135,7 +135,7 @@ Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HT
if (value->is_function()) {
value = JS::NativeFunction::create(
realm, [function = JS::make_handle(*value)](auto& vm) {
return JS::call(vm, function.value(), JS::js_undefined());
return JS::call(vm, function.value(), JS::js_undefined(), vm.running_execution_context().arguments.span());
},
0, "");
}
@ -152,7 +152,7 @@ Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HT
if (*entry.needs_get) {
cross_origin_get = JS::NativeFunction::create(
realm, [object_ptr, getter = JS::make_handle(*original_descriptor->get)](auto& vm) {
return JS::call(vm, getter.cell(), object_ptr);
return JS::call(vm, getter.cell(), object_ptr, vm.running_execution_context().arguments.span());
},
0, "");
}
@ -164,7 +164,7 @@ Optional<JS::PropertyDescriptor> cross_origin_get_own_property_helper(Variant<HT
if (*entry.needs_set) {
cross_origin_set = JS::NativeFunction::create(
realm, [object_ptr, setter = JS::make_handle(*original_descriptor->set)](auto& vm) {
return JS::call(vm, setter.cell(), object_ptr);
return JS::call(vm, setter.cell(), object_ptr, vm.running_execution_context().arguments.span());
},
0, "");
}