diff options
Diffstat (limited to 'Libraries/LibWeb/DOM/XMLHttpRequest.cpp')
-rw-r--r-- | Libraries/LibWeb/DOM/XMLHttpRequest.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Libraries/LibWeb/DOM/XMLHttpRequest.cpp b/Libraries/LibWeb/DOM/XMLHttpRequest.cpp index 82caf5b71b..757ce79bb3 100644 --- a/Libraries/LibWeb/DOM/XMLHttpRequest.cpp +++ b/Libraries/LibWeb/DOM/XMLHttpRequest.cpp @@ -83,8 +83,9 @@ void XMLHttpRequest::dispatch_event(NonnullRefPtr<Event> event) if (listener.event_name == event->name()) { auto* function = const_cast<EventListener&>(*listener.listener).function(); auto* this_value = wrap(function->heap(), *this); - auto* event_wrapper = wrap(function->heap(), *event); - function->interpreter().call(function, this_value, { event_wrapper }); + JS::MarkedValueList arguments(function->heap()); + arguments.append(wrap(function->heap(), *event)); + function->interpreter().call(function, this_value, move(arguments)); } } } |