/* This file is part of the WebKit open source project. This file has been generated by generate-bindings.pl. DO NOT MODIFY! This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include "config.h" #if ENABLE(WEB_CRYPTO) #include "JSEcdhKeyDeriveParams.h" #include "JSCryptoKey.h" #include "JSDOMConvertInterface.h" #include "JSDOMConvertStrings.h" #include namespace WebCore { using namespace JSC; #if ENABLE(WEB_CRYPTO) template<> CryptoAlgorithmEcdhKeyDeriveParams convertDictionary(JSGlobalObject& lexicalGlobalObject, JSValue value) { VM& vm = JSC::getVM(&lexicalGlobalObject); auto throwScope = DECLARE_THROW_SCOPE(vm); bool isNullOrUndefined = value.isUndefinedOrNull(); auto* object = isNullOrUndefined ? nullptr : value.getObject(); if (UNLIKELY(!isNullOrUndefined && !object)) { throwTypeError(&lexicalGlobalObject, throwScope); return { }; } CryptoAlgorithmEcdhKeyDeriveParams result; JSValue nameValue; if (isNullOrUndefined) nameValue = jsUndefined(); else { nameValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "name"_s)); RETURN_IF_EXCEPTION(throwScope, { }); } if (!nameValue.isUndefined()) { result.name = convert(lexicalGlobalObject, nameValue); RETURN_IF_EXCEPTION(throwScope, { }); } else { throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "name", "EcdhKeyDeriveParams", "DOMString"); return { }; } JSValue publicKeyValue; if (isNullOrUndefined) publicKeyValue = jsUndefined(); else { publicKeyValue = object->get(&lexicalGlobalObject, Identifier::fromString(vm, "publicKey"_s)); RETURN_IF_EXCEPTION(throwScope, { }); } if (!publicKeyValue.isUndefined()) { result.publicKey = convert>(lexicalGlobalObject, publicKeyValue); RETURN_IF_EXCEPTION(throwScope, { }); } else { throwRequiredMemberTypeError(lexicalGlobalObject, throwScope, "publicKey", "EcdhKeyDeriveParams", "CryptoKey"); return { }; } return result; } #endif } // namespace WebCore #endif // ENABLE(WEB_CRYPTO) rick/fix/bindings-mark-jscinitialize'>derrick/fix/bindings-mark-jscinitialize Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2023-02-17use mapGravatar Jarred Sumner 1-21/+70
2023-02-17More correct filesystem flags parsingGravatar Jarred Sumner 1-49/+55
2023-02-17Fix issue with express body-parser introduced by our async_hooks polyfillGravatar Jarred Sumner 2-3/+14
2023-02-17Fix a couple flaky testsGravatar Jarred Sumner 5-13/+17
2023-02-17use `bun.logger` instead of `bun.Output` (#2099)Gravatar Alex Lam S.L 4-99/+181
2023-02-17Fix flaky testGravatar Jarred Sumner 1-18/+19
2023-02-17Fix #1602 (#2066)Gravatar Justin Whear 12-94/+228
2023-02-17[install] support git dependencies (#2094)Gravatar Alex Lam S.L 9-279/+1020
2023-02-17Fix #2005 (#2096)Gravatar Justin Whear 2-1/+60
2023-02-17allow `bun add` of packages with capital letters (#2095)Gravatar Alex Lam S.L 3-2/+53
2023-02-16faster Buffer.byteLength("latin1")Gravatar Jarred Sumner 1-36/+28
2023-02-16Support yarn-like `"workspaces"."packages": string[]` (#2086)Gravatar Jarred Sumner 2-97/+253
2023-02-16Implement `machine` for Linux (#2088)Gravatar Justin Whear 3-0/+19
2023-02-16Fix #1516 (#2089)Gravatar Justin Whear 3-7/+14
2023-02-16Update globals.d.tsGravatar Jarred Sumner 1-0/+15
2023-02-16Add missing type definitionGravatar Jarred Sumner 1-0/+2
2023-02-16[napi] Fix crash in creating arrays > 8 elements longGravatar Jarred Sumner 1-10/+9
2023-02-16Clarify and clean up macOS build process (#2087)Gravatar Luke Deen Taylor 2-4/+4
2023-02-15Don't crash on null version stringGravatar Jarred Sumner 1-1/+1
2023-02-15Add disabled optimizationGravatar Jarred Sumner 1-0/+51
2023-02-15Add more logging to napiGravatar Jarred Sumner 1-30/+150
2023-02-15Incorrect implementation of `napi_create_threadsafe_function`Gravatar Jarred Sumner 1-21/+43
2023-02-15feat(fetch) AbortSignal (#2019)Gravatar Ciro Spaciari 17-58/+443
2023-02-15fix(webcrypto): fix ed25519 CryptoKey.algorithm (#2082)Gravatar Derrick Farris 2-9/+28
2023-02-15Fix 2063 (#2079)Gravatar Justin Whear 2-2/+11
2023-02-15Make sure we test * in tesconfigGravatar Jarred Sumner 2-1/+3
2023-02-15don't return an error thereGravatar Jarred Sumner 2-1/+3
2023-02-15Fix castGravatar Jarred Sumner 1-15/+17
2023-02-15ensure we allocate for > 6 argumentsGravatar Jarred Sumner 1-6/+13
2023-02-15Update async_hooks.exports.jsGravatar Jarred Sumner 1-2/+2
2023-02-15workaround prisma's usage of `eval("__dirname")`Gravatar Jarred Sumner 1-1/+23
2023-02-15some cleanupGravatar Jarred Sumner 2-15/+9
2023-02-15ED25519 WebCrypto (#1971)Gravatar Jarred Sumner 12-11/+1167
2023-02-14Fix up async_hooks polyfillGravatar Jarred Sumner 2-8/+63
2023-02-14Add temporary polyfill for async_hooksGravatar Jarred Sumner 5-108/+324
2023-02-14:mask: async_hooksGravatar Jarred Sumner 1-0/+4
2023-02-14[install] link network-delayed `.bin` scripts correctly (#2076)Gravatar Alex Lam S.L 3-16/+21
2023-02-14don't break esbuildGravatar Jarred Sumner 7-75/+50
2023-02-14Add workaround for `tls` and `worker_threads`Gravatar Jarred Sumner 3-1/+64
2023-02-14[install] improve `package.json` validation (#2074)Gravatar Alex Lam S.L 6-104/+342
2023-02-14[WIP] fix(node:fs): export `fs.ReadStream` and `fs.WriteStream` (#1798)Gravatar Derrick Farris 4-72/+326
2023-02-14Reject with error when invalid fetch() body (#2047)Gravatar Eric Zhang 2-12/+44
2023-02-13fix(FormData): make String explicit, thanks @dylan-conway (#2065)Gravatar Derrick Farris 1-1/+1
2023-02-13fix(FormData): add string literal operator (#2064)Gravatar Derrick Farris 1-2/+2
2023-02-13Add pretty printer for FormDataGravatar Jarred Sumner 5-1/+101
2023-02-13Add dynamic port assigning to Bun.serve (#2062)Gravatar MichaƂ Warda 3-5/+40
2023-02-13feat(napi): add `napi_get_value_bigint_words` (#2061)Gravatar Derrick Farris 3-0/+44
2023-02-13Fixes https://github.com/oven-sh/bun/issues/1456Gravatar Jarred Sumner 8-1/+148