diff options
Diffstat (limited to 'Libraries/LibWeb/DOM/XMLHttpRequest.cpp')
-rw-r--r-- | Libraries/LibWeb/DOM/XMLHttpRequest.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Libraries/LibWeb/DOM/XMLHttpRequest.cpp b/Libraries/LibWeb/DOM/XMLHttpRequest.cpp index 89789c2a63..46e41187ad 100644 --- a/Libraries/LibWeb/DOM/XMLHttpRequest.cpp +++ b/Libraries/LibWeb/DOM/XMLHttpRequest.cpp @@ -94,10 +94,10 @@ void XMLHttpRequest::dispatch_event(NonnullRefPtr<Event> event) for (auto& listener : listeners()) { if (listener.event_name == event->type()) { auto& function = const_cast<EventListener&>(*listener.listener).function(); - auto& heap = function.heap(); - auto* this_value = wrap(heap, *this); - JS::MarkedValueList arguments(heap); - arguments.append(wrap(heap, *event)); + auto& global_object = function.global_object(); + auto* this_value = wrap(global_object, *this); + JS::MarkedValueList arguments(global_object.heap()); + arguments.append(wrap(global_object, *event)); function.interpreter().call(function, this_value, move(arguments)); } } |