summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2021-09-30 21:33:12 +0200
committerGitHub <noreply@github.com>2021-09-30 21:33:12 +0200
commit72836478f2737593fb9d932304e7d0279e82a2cc (patch)
tree34689780a3d09b5858c3dbfda69408cb61476cc9
parenta2632c86b1ddceae588886c7623a86f46e6098d5 (diff)
perf(webidl): optimize createDictionaryConverter() (#12279)
On a benchmark constructing Responses with headers this shaves off 25%
-rw-r--r--ext/webidl/00_webidl.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js
index d5bad4f15..08de5aba6 100644
--- a/ext/webidl/00_webidl.js
+++ b/ext/webidl/00_webidl.js
@@ -41,6 +41,7 @@
NumberMAX_SAFE_INTEGER,
// deno-lint-ignore camelcase
NumberMIN_SAFE_INTEGER,
+ ObjectAssign,
ObjectCreate,
ObjectDefineProperties,
ObjectDefineProperty,
@@ -726,7 +727,7 @@
}
const esDict = V;
- const idlDict = { ...defaultValues };
+ const idlDict = ObjectAssign({}, defaultValues);
// NOTE: fast path Null and Undefined.
if ((V === undefined || V === null) && !hasRequiredKey) {