mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 12:17:35 +00:00
LibJS+LibWeb: Wrap raw JS::Cell*/& fields in GCPtr/NonnullGCPtr
This commit is contained in:
parent
1df3652e27
commit
7c0c1c8f49
214 changed files with 825 additions and 827 deletions
|
@ -519,7 +519,7 @@ WebIDL::ExceptionOr<void> fetch_response_handover(JS::Realm& realm, Infrastructu
|
|||
// timingInfo’s server-timing headers to the result of getting, decoding, and splitting `Server-Timing` from
|
||||
// response’s header list.
|
||||
// The user agent may decide to expose `Server-Timing` headers to non-secure contexts requests as well.
|
||||
auto* client = fetch_params.request()->client();
|
||||
auto client = fetch_params.request()->client();
|
||||
if (!response.is_network_error() && client != nullptr && HTML::is_secure_context(*client)) {
|
||||
auto server_timing_headers = TRY_OR_THROW_OOM(vm, response.header_list()->get_decode_and_split("Server-Timing"sv.bytes()));
|
||||
if (server_timing_headers.has_value())
|
||||
|
@ -588,7 +588,7 @@ WebIDL::ExceptionOr<void> fetch_response_handover(JS::Realm& realm, Infrastructu
|
|||
// 3. If fetchParams’s request’s initiator type is non-null and fetchParams’s request’s client’s global
|
||||
// object is fetchParams’s task destination, then run fetchParams’s controller’s report timing steps
|
||||
// given fetchParams’s request’s client’s global object.
|
||||
auto* client = fetch_params.request()->client();
|
||||
auto client = fetch_params.request()->client();
|
||||
auto const* task_destination_global_object = fetch_params.task_destination().get_pointer<JS::NonnullGCPtr<JS::Object>>();
|
||||
if (client != nullptr && task_destination_global_object != nullptr) {
|
||||
if (fetch_params.request()->initiator_type().has_value() && &client->global_object() == task_destination_global_object->ptr())
|
||||
|
@ -1459,7 +1459,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<PendingResponse>> http_network_or_cache_fet
|
|||
if (response->status() == 401
|
||||
&& http_request->response_tainting() != Infrastructure::Request::ResponseTainting::CORS
|
||||
&& include_credentials == IncludeCredentials::Yes
|
||||
&& request->window().has<HTML::EnvironmentSettingsObject*>()) {
|
||||
&& request->window().has<JS::GCPtr<HTML::EnvironmentSettingsObject>>()) {
|
||||
// 1. Needs testing: multiple `WWW-Authenticate` headers, missing, parsing issues.
|
||||
// (Red box in the spec, no-op)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue