lib: improve argument handling in Blob constructor

As specified in WebIDL (<https://webidl.spec.whatwg.org/#js-dictionary>),
the fields of a dictionary need to be read in lexicographical order.

PR-URL: https://github.com/nodejs/node/pull/61980
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Mattias Buelens <mattias@buelens.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Ms2ger authored and Antoine du Hamel committed 2026-04-10 14:52:14 +02:00
1 parent c0680d5df7
commit 16b8cc6643
2 files changed
+1 -2

No files matched your search

+1 -1
View File
@@ -149,8 +149,8 @@ class Blob {
}
validateDictionary(options, 'options');
let {
type = '',
endings = 'transparent',
type = '',
} = options ?? kEmptyObject;
endings = `${endings}`;
-1
View File
@@ -10,7 +10,6 @@
"blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]",
"blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]",
"Getters and value conversions should happen in order until an exception is thrown.",
"options properties should be accessed in lexicographic order.",
"Arguments should be evaluated from left to right."
],
"flaky": [