diff options
author | Andreas Kling <kling@serenityos.org> | 2020-06-23 16:57:39 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-06-23 16:57:39 +0200 |
commit | fc4ed8d444535f6ddf5b2d8f414466e2bdfb46b5 (patch) | |
tree | da312b4d7a231ef27f421213552bba25c5db3710 /Libraries/LibWeb/DOM/XMLHttpRequest.cpp | |
parent | c24f5585b29a52c32315dbed49aa66c7fe94caa0 (diff) | |
download | serenity-fc4ed8d444535f6ddf5b2d8f414466e2bdfb46b5.zip |
LibWeb: Make wrapper factory functions take JS::GlobalObject&
Instead of taking the JS::Heap&. This allows us to get rid of some
calls to JS::Interpreter::global_object(). We're getting closer and
closer to multiple global objects. :^)
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)); } } |