|
@@ -41,11 +41,11 @@
|
|
|
|
|
|
namespace Web::XHR {
|
|
namespace Web::XHR {
|
|
|
|
|
|
-JS::NonnullGCPtr<XMLHttpRequest> XMLHttpRequest::construct_impl(JS::Realm& realm)
|
|
|
|
|
|
+WebIDL::ExceptionOr<JS::NonnullGCPtr<XMLHttpRequest>> XMLHttpRequest::construct_impl(JS::Realm& realm)
|
|
{
|
|
{
|
|
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
|
auto& window = verify_cast<HTML::Window>(realm.global_object());
|
|
auto author_request_headers = Fetch::Infrastructure::HeaderList::create(realm.vm());
|
|
auto author_request_headers = Fetch::Infrastructure::HeaderList::create(realm.vm());
|
|
- return realm.heap().allocate<XMLHttpRequest>(realm, window, *author_request_headers).release_allocated_value_but_fixme_should_propagate_errors();
|
|
|
|
|
|
+ return MUST_OR_THROW_OOM(realm.heap().allocate<XMLHttpRequest>(realm, window, *author_request_headers));
|
|
}
|
|
}
|
|
|
|
|
|
XMLHttpRequest::XMLHttpRequest(HTML::Window& window, Fetch::Infrastructure::HeaderList& author_request_headers)
|
|
XMLHttpRequest::XMLHttpRequest(HTML::Window& window, Fetch::Infrastructure::HeaderList& author_request_headers)
|