Skip to content

Commit 7cf2dad

Browse files
authored
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: #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>
1 parent 76215dc commit 7cf2dad

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lib/internal/blob.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ class Blob {
149149
}
150150
validateDictionary(options, 'options');
151151
let {
152-
type = '',
153152
endings = 'transparent',
153+
type = '',
154154
} = options ?? kEmptyObject;
155155

156156
endings = `${endings}`;

test/wpt/status/FileAPI/blob.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]",
1111
"blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]",
1212
"Getters and value conversions should happen in order until an exception is thrown.",
13-
"options properties should be accessed in lexicographic order.",
1413
"Arguments should be evaluated from left to right."
1514
],
1615
"flaky": [

0 commit comments

Comments
 (0)