From 525f22d018cb5f9c4c6ea0e2b5544fdcab8da483 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Tue, 6 Dec 2022 22:17:27 +0000 Subject: 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. --- Userland/Libraries/LibWeb/Infra/JSON.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Libraries/LibWeb/Infra/JSON.cpp') diff --git a/Userland/Libraries/LibWeb/Infra/JSON.cpp b/Userland/Libraries/LibWeb/Infra/JSON.cpp index 66d2b3e74e..3d39d719ce 100644 --- a/Userland/Libraries/LibWeb/Infra/JSON.cpp +++ b/Userland/Libraries/LibWeb/Infra/JSON.cpp @@ -18,7 +18,7 @@ WebIDL::ExceptionOr parse_json_string_to_javascript_value(JS::VM& vm, auto& realm = *vm.current_realm(); // 1. Return ? Call(%JSON.parse%, undefined, « string »). - return TRY(JS::call(vm, realm.intrinsics().json_parse_function(), JS::js_undefined(), JS::js_string(vm, string))); + return TRY(JS::call(vm, realm.intrinsics().json_parse_function(), JS::js_undefined(), JS::PrimitiveString::create(vm, string))); } // https://infra.spec.whatwg.org/#parse-json-bytes-to-a-javascript-value -- cgit v1.2.3