WebKit upgrade (#12246)

Co-authored-by: Jarred-Sumner <Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2024-07-01 23:27:59 -07:00
committed by GitHub
parent dd057613b9
commit b0018465cc
207 changed files with 6457 additions and 6338 deletions

View File

@@ -31,7 +31,6 @@
#include <JavaScriptCore/JSCInlines.h>
#include <JavaScriptCore/ObjectConstructor.h>
namespace WebCore {
using namespace JSC;
@@ -45,7 +44,7 @@ template<> CryptoRsaKeyAlgorithm convertDictionary<CryptoRsaKeyAlgorithm>(JSGlob
auto* object = isNullOrUndefined ? nullptr : value.getObject();
if (UNLIKELY(!isNullOrUndefined && !object)) {
throwTypeError(&lexicalGlobalObject, throwScope);
return { };
return {};
}
CryptoRsaKeyAlgorithm result;
JSValue nameValue;
@@ -53,42 +52,42 @@ template<> CryptoRsaKeyAlgorithm convertDictionary<CryptoRsaKeyAlgorithm>(JSGlob
nameValue = jsUndefined();
else {
nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s));
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
}
if (!nameValue.isUndefined()) {
result.name = convert<IDLDOMString>(lexicalGlobalObject, nameValue);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
} else {
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "name", "CryptoRsaKeyAlgorithm", "DOMString");
return { };
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "name"_s, "CryptoRsaKeyAlgorithm"_s, "DOMString"_s);
return {};
}
JSValue modulusLengthValue;
if (isNullOrUndefined)
modulusLengthValue = jsUndefined();
else {
modulusLengthValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "modulusLength"_s));
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
}
if (!modulusLengthValue.isUndefined()) {
result.modulusLength = convert<IDLUnsignedLong>(lexicalGlobalObject, modulusLengthValue);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
} else {
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "modulusLength", "CryptoRsaKeyAlgorithm", "unsigned long");
return { };
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "modulusLength"_s, "CryptoRsaKeyAlgorithm"_s, "unsigned long"_s);
return {};
}
JSValue publicExponentValue;
if (isNullOrUndefined)
publicExponentValue = jsUndefined();
else {
publicExponentValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "publicExponent"_s));
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
}
if (!publicExponentValue.isUndefined()) {
result.publicExponent = convert<IDLUint8Array>(lexicalGlobalObject, publicExponentValue);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
} else {
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "publicExponent", "CryptoRsaKeyAlgorithm", "Uint8Array");
return { };
throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "publicExponent"_s, "CryptoRsaKeyAlgorithm"_s, "Uint8Array"_s);
return {};
}
return result;
}
@@ -101,13 +100,13 @@ JSC::JSObject* convertDictionaryToJS(JSC::JSGlobalObject& lexicalGlobalObject, J
auto result = constructEmptyObject(&lexicalGlobalObject, globalObject.objectPrototype());
auto nameValue = toJS<IDLDOMString>(lexicalGlobalObject, throwScope, dictionary.name);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
result->putDirect(vm, JSC::Identifier::fromString(vm, "name"_s), nameValue);
auto modulusLengthValue = toJS<IDLUnsignedLong>(lexicalGlobalObject, throwScope, dictionary.modulusLength);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
result->putDirect(vm, JSC::Identifier::fromString(vm, "modulusLength"_s), modulusLengthValue);
auto publicExponentValue = toJS<IDLUint8Array>(lexicalGlobalObject, globalObject, throwScope, dictionary.publicExponent);
RETURN_IF_EXCEPTION(throwScope, { });
RETURN_IF_EXCEPTION(throwScope, {});
result->putDirect(vm, JSC::Identifier::fromString(vm, "publicExponent"_s), publicExponentValue);
return result;
}