mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:28:12 +00:00
LibJS: Replace standalone js_string() with PrimitiveString::create()
Note that js_rope_string() has been folded into this, the old name was misleading - it would not always create a rope string, only if both sides are not empty strings. Use a three-argument create() overload instead.
This commit is contained in:
parent
5db38d7ba1
commit
525f22d018
144 changed files with 656 additions and 672 deletions
|
@ -121,10 +121,10 @@ WebIDL::ExceptionOr<JS::Value> XMLHttpRequest::response()
|
|||
if (m_response_type == Bindings::XMLHttpRequestResponseType::Empty || m_response_type == Bindings::XMLHttpRequestResponseType::Text) {
|
||||
// 1. If this’s state is not loading or done, then return the empty string.
|
||||
if (m_state != State::Loading && m_state != State::Done)
|
||||
return JS::js_string(vm, "");
|
||||
return JS::PrimitiveString::create(vm, "");
|
||||
|
||||
// 2. Return the result of getting a text response for this.
|
||||
return JS::js_string(vm, get_text_response());
|
||||
return JS::PrimitiveString::create(vm, get_text_response());
|
||||
}
|
||||
// 2. If this’s state is not done, then return null.
|
||||
if (m_state != State::Done)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue