diff --git a/src/bun.js/bindings/BunInjectedScriptHost.cpp b/src/bun.js/bindings/BunInjectedScriptHost.cpp index d209133300..a31aefdc29 100644 --- a/src/bun.js/bindings/BunInjectedScriptHost.cpp +++ b/src/bun.js/bindings/BunInjectedScriptHost.cpp @@ -33,7 +33,7 @@ JSValue BunInjectedScriptHost::subtype(JSGlobalObject* exec, JSValue value) static JSObject* constructInternalProperty(VM& vm, JSGlobalObject* exec, const String& name, JSValue value) { auto* object = constructEmptyObject(exec); - object->putDirect(vm, Identifier::fromString(vm, "name"_s), jsString(vm, name)); + object->putDirect(vm, vm.propertyNames->name, jsString(vm, name)); object->putDirect(vm, Identifier::fromString(vm, "value"_s), value); return object; } @@ -41,7 +41,7 @@ static JSObject* constructInternalProperty(VM& vm, JSGlobalObject* exec, const S static JSObject* constructInternalProperty(VM& vm, JSGlobalObject* exec, const Identifier& name, JSValue value) { auto* object = constructEmptyObject(exec); - object->putDirect(vm, Identifier::fromString(vm, "name"_s), JSC::identifierToJSValue(vm, name)); + object->putDirect(vm, vm.propertyNames->name, JSC::identifierToJSValue(vm, name)); object->putDirect(vm, Identifier::fromString(vm, "value"_s), value); return object; } diff --git a/src/bun.js/bindings/BunProcess.cpp b/src/bun.js/bindings/BunProcess.cpp index 51b5d51448..3b02306650 100644 --- a/src/bun.js/bindings/BunProcess.cpp +++ b/src/bun.js/bindings/BunProcess.cpp @@ -205,7 +205,7 @@ static JSValue constructProcessReleaseObject(VM& vm, JSObject* processObject) auto* release = JSC::constructEmptyObject(globalObject); // SvelteKit compatibility hack - release->putDirect(vm, Identifier::fromString(vm, "name"_s), jsString(vm, WTF::String("node"_s)), 0); + release->putDirect(vm, vm.propertyNames->name, jsString(vm, WTF::String("node"_s)), 0); release->putDirect(vm, Identifier::fromString(vm, "lts"_s), jsBoolean(false), 0); release->putDirect(vm, Identifier::fromString(vm, "sourceUrl"_s), jsString(vm, WTF::String(std::span { Bun__githubURL, strlen(Bun__githubURL) })), 0); @@ -1068,7 +1068,7 @@ JSC_DEFINE_HOST_FUNCTION(Process_emitWarning, (JSGlobalObject * lexicalGlobalObj return createError(globalObject, str); })(); - errorInstance->putDirect(vm, Identifier::fromString(vm, "name"_s), jsString(vm, String("warn"_s)), JSC::PropertyAttribute::DontEnum | 0); + errorInstance->putDirect(vm, vm.propertyNames->name, jsString(vm, String("warn"_s)), JSC::PropertyAttribute::DontEnum | 0); auto ident = Identifier::fromString(vm, "warning"_s); if (process->wrapped().hasEventListeners(ident)) { diff --git a/src/bun.js/bindings/JSMockFunction.cpp b/src/bun.js/bindings/JSMockFunction.cpp index 7c5c46a83d..894e198db9 100644 --- a/src/bun.js/bindings/JSMockFunction.cpp +++ b/src/bun.js/bindings/JSMockFunction.cpp @@ -711,14 +711,14 @@ extern Structure* createMockResultStructure(JSC::VM& vm, JSC::JSGlobalObject* gl structure = structure->addPropertyTransition( vm, structure, - JSC::Identifier::fromString(vm, "type"_s), + vm.propertyNames->type, 0, offset); structure = structure->addPropertyTransition( vm, structure, - JSC::Identifier::fromString(vm, "value"_s), + vm.propertyNames->value, 0, offset); return structure; } diff --git a/src/bun.js/bindings/KeyObject.cpp b/src/bun.js/bindings/KeyObject.cpp index 6c4b9dcaa6..071e627bd1 100644 --- a/src/bun.js/bindings/KeyObject.cpp +++ b/src/bun.js/bindings/KeyObject.cpp @@ -550,7 +550,7 @@ JSC_DEFINE_HOST_FUNCTION(KeyObject__createPrivateKey, (JSC::JSGlobalObject * glo } } if (format == "der"_s) { - JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(Identifier::fromString(vm, "type"_s))); + JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(vm.propertyNames->type)); WTF::String type = "pkcs8"_s; if (!typeJSValue.isUndefinedOrNull() && !typeJSValue.isEmpty()) { if (!typeJSValue.isString()) { @@ -1138,7 +1138,7 @@ JSC_DEFINE_HOST_FUNCTION(KeyObject__createPublicKey, (JSC::JSGlobalObject * glob } } if (format == "der"_s) { - JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(Identifier::fromString(vm, "type"_s))); + JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(vm.propertyNames->type)); WTF::String type = "spki"_s; if (!typeJSValue.isUndefinedOrNull() && !typeJSValue.isEmpty()) { if (!typeJSValue.isString()) { @@ -1800,7 +1800,7 @@ JSC_DEFINE_HOST_FUNCTION(KeyObject__Exports, (JSC::JSGlobalObject * globalObject auto id = wrapped.keyClass(); if (auto* options = jsDynamicCast(callFrame->argument(1))) { JSValue formatJSValue = options->getIfPropertyExists(globalObject, PropertyName(Identifier::fromString(vm, "format"_s))); - JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(Identifier::fromString(vm, "type"_s))); + JSValue typeJSValue = options->getIfPropertyExists(globalObject, PropertyName(vm.propertyNames->type)); JSValue passphraseJSValue = options->getIfPropertyExists(globalObject, PropertyName(Identifier::fromString(vm, "passphrase"_s))); KeyPassphrase passphrase(passphraseJSValue, globalObject, scope); RETURN_IF_EXCEPTION(scope, encodedJSValue()); diff --git a/src/bun.js/bindings/webcore/JSPerformanceEntry.cpp b/src/bun.js/bindings/webcore/JSPerformanceEntry.cpp index ac027687e5..924cc6f7fb 100644 --- a/src/bun.js/bindings/webcore/JSPerformanceEntry.cpp +++ b/src/bun.js/bindings/webcore/JSPerformanceEntry.cpp @@ -235,7 +235,7 @@ static inline EncodedJSValue jsPerformanceEntryPrototypeFunction_toJSONBody(JSGl auto* result = constructEmptyObject(lexicalGlobalObject); auto nameValue = toJS(*lexicalGlobalObject, throwScope, impl.name()); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto entryTypeValue = toJS(*lexicalGlobalObject, throwScope, impl.entryType()); RETURN_IF_EXCEPTION(throwScope, {}); result->putDirect(vm, Identifier::fromString(vm, "entryType"_s), entryTypeValue); diff --git a/src/bun.js/bindings/webcore/JSPerformanceObserver.cpp b/src/bun.js/bindings/webcore/JSPerformanceObserver.cpp index f9eb3bf9f0..a9ce7b6c8e 100644 --- a/src/bun.js/bindings/webcore/JSPerformanceObserver.cpp +++ b/src/bun.js/bindings/webcore/JSPerformanceObserver.cpp @@ -95,7 +95,7 @@ template<> PerformanceObserver::Init convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "type"_s)); + typeValue = object->get(&lexicalGlobalObject, vm.propertyNames->type); RETURN_IF_EXCEPTION(throwScope, {}); } if (!typeValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcore/JSWorker.cpp b/src/bun.js/bindings/webcore/JSWorker.cpp index 15c77eb244..fe7ed06872 100644 --- a/src/bun.js/bindings/webcore/JSWorker.cpp +++ b/src/bun.js/bindings/webcore/JSWorker.cpp @@ -131,7 +131,7 @@ template<> JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES JSWorkerDOMConstructor:: options.bun.unref = false; if (JSObject* optionsObject = JSC::jsDynamicCast(argument1.value())) { - if (auto nameValue = optionsObject->getIfPropertyExists(lexicalGlobalObject, Identifier::fromString(vm, "name"_s))) { + if (auto nameValue = optionsObject->getIfPropertyExists(lexicalGlobalObject, vm.propertyNames->name)) { if (nameValue.isString()) { options.name = nameValue.toWTFString(lexicalGlobalObject); RETURN_IF_EXCEPTION(throwScope, encodedJSValue()); diff --git a/src/bun.js/bindings/webcore/JSWorkerOptions.cpp b/src/bun.js/bindings/webcore/JSWorkerOptions.cpp index 6bee7e2905..8103d23053 100644 --- a/src/bun.js/bindings/webcore/JSWorkerOptions.cpp +++ b/src/bun.js/bindings/webcore/JSWorkerOptions.cpp @@ -57,7 +57,7 @@ template<> WorkerOptions convertDictionary(JSGlobalObject& lexica if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSAesCbcCfbParams.cpp b/src/bun.js/bindings/webcrypto/JSAesCbcCfbParams.cpp index 04ee22b1f3..b9fd88ae77 100644 --- a/src/bun.js/bindings/webcrypto/JSAesCbcCfbParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSAesCbcCfbParams.cpp @@ -50,7 +50,7 @@ template<> CryptoAlgorithmAesCbcCfbParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSAesCtrParams.cpp b/src/bun.js/bindings/webcrypto/JSAesCtrParams.cpp index de9ae1cd98..fd21f0d58c 100644 --- a/src/bun.js/bindings/webcrypto/JSAesCtrParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSAesCtrParams.cpp @@ -51,7 +51,7 @@ template<> CryptoAlgorithmAesCtrParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSAesGcmParams.cpp b/src/bun.js/bindings/webcrypto/JSAesGcmParams.cpp index 02e7fd4125..94c8c6cc18 100644 --- a/src/bun.js/bindings/webcrypto/JSAesGcmParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSAesGcmParams.cpp @@ -51,7 +51,7 @@ template<> CryptoAlgorithmAesGcmParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSAesKeyParams.cpp b/src/bun.js/bindings/webcrypto/JSAesKeyParams.cpp index c1e84ea72f..b7be2bca4c 100644 --- a/src/bun.js/bindings/webcrypto/JSAesKeyParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSAesKeyParams.cpp @@ -48,7 +48,7 @@ template<> CryptoAlgorithmAesKeyParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSCryptoAesKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoAesKeyAlgorithm.cpp index 64227c786d..ba48c3da96 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoAesKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoAesKeyAlgorithm.cpp @@ -50,7 +50,7 @@ template<> CryptoAesKeyAlgorithm convertDictionary(JSGlob if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -86,10 +86,10 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto lengthValue = toJS(lexicalGlobalObject, throwScope, dictionary.length); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "length"_s), lengthValue); + result->putDirect(vm, vm.propertyNames->length, lengthValue); return result; } diff --git a/src/bun.js/bindings/webcrypto/JSCryptoAlgorithmParameters.cpp b/src/bun.js/bindings/webcrypto/JSCryptoAlgorithmParameters.cpp index 93b9590340..12ccfe8b0b 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoAlgorithmParameters.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoAlgorithmParameters.cpp @@ -47,7 +47,7 @@ template<> CryptoAlgorithmParameters convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSCryptoEcKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoEcKeyAlgorithm.cpp index dbf828497f..f86d63c3f1 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoEcKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoEcKeyAlgorithm.cpp @@ -49,7 +49,7 @@ template<> CryptoEcKeyAlgorithm convertDictionary(JSGlobal if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -85,7 +85,7 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto namedCurveValue = toJS(lexicalGlobalObject, throwScope, dictionary.namedCurve); RETURN_IF_EXCEPTION(throwScope, {}); result->putDirect(vm, JSC::Identifier::fromString(vm, "namedCurve"_s), namedCurveValue); diff --git a/src/bun.js/bindings/webcrypto/JSCryptoHmacKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoHmacKeyAlgorithm.cpp index 7a3f7811bf..fd0a85740e 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoHmacKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoHmacKeyAlgorithm.cpp @@ -51,7 +51,7 @@ template<> CryptoHmacKeyAlgorithm convertDictionary(JSGl if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -101,13 +101,13 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto hashValue = toJS>(lexicalGlobalObject, globalObject, throwScope, dictionary.hash); RETURN_IF_EXCEPTION(throwScope, {}); result->putDirect(vm, JSC::Identifier::fromString(vm, "hash"_s), hashValue); auto lengthValue = toJS(lexicalGlobalObject, throwScope, dictionary.length); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "length"_s), lengthValue); + result->putDirect(vm, vm.propertyNames->length, lengthValue); return result; } diff --git a/src/bun.js/bindings/webcrypto/JSCryptoKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoKeyAlgorithm.cpp index f192e0967a..aee7a47e8c 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoKeyAlgorithm.cpp @@ -49,7 +49,7 @@ template<> CryptoKeyAlgorithm convertDictionary(JSGlobalObje if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -71,7 +71,7 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); return result; } diff --git a/src/bun.js/bindings/webcrypto/JSCryptoRsaHashedKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoRsaHashedKeyAlgorithm.cpp index 11bc28258f..4b6393f980 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoRsaHashedKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoRsaHashedKeyAlgorithm.cpp @@ -52,7 +52,7 @@ template<> CryptoRsaHashedKeyAlgorithm convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -116,7 +116,7 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto modulusLengthValue = toJS(lexicalGlobalObject, throwScope, dictionary.modulusLength); RETURN_IF_EXCEPTION(throwScope, {}); result->putDirect(vm, JSC::Identifier::fromString(vm, "modulusLength"_s), modulusLengthValue); diff --git a/src/bun.js/bindings/webcrypto/JSCryptoRsaKeyAlgorithm.cpp b/src/bun.js/bindings/webcrypto/JSCryptoRsaKeyAlgorithm.cpp index 7cee62daf9..a75d16791c 100644 --- a/src/bun.js/bindings/webcrypto/JSCryptoRsaKeyAlgorithm.cpp +++ b/src/bun.js/bindings/webcrypto/JSCryptoRsaKeyAlgorithm.cpp @@ -51,7 +51,7 @@ template<> CryptoRsaKeyAlgorithm convertDictionary(JSGlob if (isNullOrUndefined) nameValue = jsUndefined(); else { - nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { @@ -101,7 +101,7 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J auto nameValue = toJS(lexicalGlobalObject, throwScope, dictionary.name); RETURN_IF_EXCEPTION(throwScope, {}); - result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue); + result->putDirect(vm, vm.propertyNames->name, nameValue); auto modulusLengthValue = toJS(lexicalGlobalObject, throwScope, dictionary.modulusLength); RETURN_IF_EXCEPTION(throwScope, {}); result->putDirect(vm, JSC::Identifier::fromString(vm, "modulusLength"_s), modulusLengthValue); diff --git a/src/bun.js/bindings/webcrypto/JSEcKeyParams.cpp b/src/bun.js/bindings/webcrypto/JSEcKeyParams.cpp index 26d6b6f901..7dfb4c136c 100644 --- a/src/bun.js/bindings/webcrypto/JSEcKeyParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSEcKeyParams.cpp @@ -47,7 +47,7 @@ template<> CryptoAlgorithmEcKeyParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSEcdhKeyDeriveParams.cpp b/src/bun.js/bindings/webcrypto/JSEcdhKeyDeriveParams.cpp index 0bd0bf9d3e..cae7acd814 100644 --- a/src/bun.js/bindings/webcrypto/JSEcdhKeyDeriveParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSEcdhKeyDeriveParams.cpp @@ -49,7 +49,7 @@ template<> CryptoAlgorithmEcdhKeyDeriveParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSEcdsaParams.cpp b/src/bun.js/bindings/webcrypto/JSEcdsaParams.cpp index 9fb39e31b1..b31e0bea2c 100644 --- a/src/bun.js/bindings/webcrypto/JSEcdsaParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSEcdsaParams.cpp @@ -50,7 +50,7 @@ template<> CryptoAlgorithmEcdsaParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSHkdfParams.cpp b/src/bun.js/bindings/webcrypto/JSHkdfParams.cpp index 1cde2096c6..01d5856320 100644 --- a/src/bun.js/bindings/webcrypto/JSHkdfParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSHkdfParams.cpp @@ -51,7 +51,7 @@ template<> CryptoAlgorithmHkdfParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSHmacKeyParams.cpp b/src/bun.js/bindings/webcrypto/JSHmacKeyParams.cpp index 00318802c5..48bd232531 100644 --- a/src/bun.js/bindings/webcrypto/JSHmacKeyParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSHmacKeyParams.cpp @@ -51,7 +51,7 @@ template<> CryptoAlgorithmHmacKeyParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSPbkdf2Params.cpp b/src/bun.js/bindings/webcrypto/JSPbkdf2Params.cpp index 99f7d04a2b..157b2685e3 100644 --- a/src/bun.js/bindings/webcrypto/JSPbkdf2Params.cpp +++ b/src/bun.js/bindings/webcrypto/JSPbkdf2Params.cpp @@ -52,7 +52,7 @@ template<> CryptoAlgorithmPbkdf2Params convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSRsaHashedImportParams.cpp b/src/bun.js/bindings/webcrypto/JSRsaHashedImportParams.cpp index 9d9e5532b8..25170eacc6 100644 --- a/src/bun.js/bindings/webcrypto/JSRsaHashedImportParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSRsaHashedImportParams.cpp @@ -50,7 +50,7 @@ template<> CryptoAlgorithmRsaHashedImportParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSRsaHashedKeyGenParams.cpp b/src/bun.js/bindings/webcrypto/JSRsaHashedKeyGenParams.cpp index f7f10165bf..59875582cf 100644 --- a/src/bun.js/bindings/webcrypto/JSRsaHashedKeyGenParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSRsaHashedKeyGenParams.cpp @@ -52,7 +52,7 @@ template<> CryptoAlgorithmRsaHashedKeyGenParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSRsaKeyGenParams.cpp b/src/bun.js/bindings/webcrypto/JSRsaKeyGenParams.cpp index ff755e1656..4f338bf9d1 100644 --- a/src/bun.js/bindings/webcrypto/JSRsaKeyGenParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSRsaKeyGenParams.cpp @@ -49,7 +49,7 @@ template<> CryptoAlgorithmRsaKeyGenParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSRsaOaepParams.cpp b/src/bun.js/bindings/webcrypto/JSRsaOaepParams.cpp index 82daf491e1..e0d461f1f9 100644 --- a/src/bun.js/bindings/webcrypto/JSRsaOaepParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSRsaOaepParams.cpp @@ -50,7 +50,7 @@ template<> CryptoAlgorithmRsaOaepParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/JSRsaPssParams.cpp b/src/bun.js/bindings/webcrypto/JSRsaPssParams.cpp index 372b60ef73..b93dfa2ffa 100644 --- a/src/bun.js/bindings/webcrypto/JSRsaPssParams.cpp +++ b/src/bun.js/bindings/webcrypto/JSRsaPssParams.cpp @@ -48,7 +48,7 @@ template<> CryptoAlgorithmRsaPssParams convertDictionaryget(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); + nameValue = object->get(&lexicalGlobalObject, vm.propertyNames->name); RETURN_IF_EXCEPTION(throwScope, {}); } if (!nameValue.isUndefined()) { diff --git a/src/bun.js/bindings/webcrypto/SubtleCrypto.cpp b/src/bun.js/bindings/webcrypto/SubtleCrypto.cpp index 8a1010b997..f41895cf5a 100644 --- a/src/bun.js/bindings/webcrypto/SubtleCrypto.cpp +++ b/src/bun.js/bindings/webcrypto/SubtleCrypto.cpp @@ -111,7 +111,7 @@ static ExceptionOr> normalizeCryptoAl if (std::holds_alternative(algorithmIdentifier)) { auto newParams = Strong(vm, constructEmptyObject(&state)); - newParams->putDirect(vm, Identifier::fromString(vm, "name"_s), jsString(vm, std::get(algorithmIdentifier))); + newParams->putDirect(vm, vm.propertyNames->name, jsString(vm, std::get(algorithmIdentifier))); return normalizeCryptoAlgorithmParameters(state, newParams, operation); } @@ -268,10 +268,10 @@ static ExceptionOr> normalizeCryptoAl switch (*identifier) { case CryptoAlgorithmIdentifier::ECDH: { // Remove this hack once https://bugs.webkit.org/show_bug.cgi?id=169333 is fixed. - JSValue nameValue = value.get()->get(&state, Identifier::fromString(vm, "name"_s)); + JSValue nameValue = value.get()->get(&state, vm.propertyNames->name); JSValue publicValue = value.get()->get(&state, Identifier::fromString(vm, "public"_s)); JSObject* newValue = constructEmptyObject(&state); - newValue->putDirect(vm, Identifier::fromString(vm, "name"_s), nameValue); + newValue->putDirect(vm, vm.propertyNames->name, nameValue); newValue->putDirect(vm, Identifier::fromString(vm, "publicKey"_s), publicValue); auto params = convertDictionary(state, newValue);