1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 00:27:45 +00:00

LibJS+LibWeb: Convert empty PrimitiveString invocators to String

This commit is contained in:
Timothy Flynn 2023-01-21 10:42:46 -05:00 committed by Linus Groh
parent 1bcde5d216
commit 34574c5ee8
9 changed files with 13 additions and 13 deletions

View file

@ -341,7 +341,7 @@ JS::ThrowCompletionOr<JS::Value> CSSStyleDeclaration::internal_get(JS::PropertyK
return Base::internal_get(name, receiver);
if (auto maybe_property = property(property_id); maybe_property.has_value())
return { JS::PrimitiveString::create(vm(), maybe_property->value->to_string().release_value_but_fixme_should_propagate_errors().to_deprecated_string()) };
return { JS::PrimitiveString::create(vm(), DeprecatedString::empty()) };
return { JS::PrimitiveString::create(vm(), String {}) };
}
JS::ThrowCompletionOr<bool> CSSStyleDeclaration::internal_set(JS::PropertyKey const& name, JS::Value value, JS::Value receiver)

View file

@ -153,7 +153,7 @@ JS::NonnullGCPtr<JS::Promise> consume_body(JS::Realm& realm, BodyMixin const& ob
}
// 2. Let promise be a promise resolved with an empty byte sequence.
auto promise = WebIDL::create_resolved_promise(realm, JS::PrimitiveString::create(vm, DeprecatedString::empty()));
auto promise = WebIDL::create_resolved_promise(realm, JS::PrimitiveString::create(vm, String {}));
// 3. If objects body is non-null, then set promise to the result of fully reading body as promise given objects body.
auto const& body = object.body_impl();