summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/Bindings/DocumentWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibWeb/Bindings/DocumentWrapper.cpp')
-rw-r--r--Libraries/LibWeb/Bindings/DocumentWrapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibWeb/Bindings/DocumentWrapper.cpp b/Libraries/LibWeb/Bindings/DocumentWrapper.cpp
index df9c84dcb2..a9439e3593 100644
--- a/Libraries/LibWeb/Bindings/DocumentWrapper.cpp
+++ b/Libraries/LibWeb/Bindings/DocumentWrapper.cpp
@@ -96,7 +96,7 @@ JS::Value DocumentWrapper::query_selector_all(JS::Interpreter& interpreter)
auto selector = arguments[0].to_string();
auto elements = document->query_selector_all(selector);
// FIXME: This should be a static NodeList, not a plain JS::Array.
- auto* node_list = interpreter.heap().allocate<JS::Array>();
+ auto* node_list = JS::Array::create(interpreter.global_object());
for (auto& element : elements) {
node_list->elements().append(wrap(interpreter.heap(), element));
}