Intent to ship: upsert proposal

130 views
Skip to first unread message

Daniel Minor

unread,
Aug 19, 2025, 11:00:38 AMAug 19
to dev-pl...@mozilla.org
As of Firefox 144, I intend to enable the upsert proposal by default on all platforms. It is currently available in Nightly builds, but disabled by default and controlled by the `javascript.options.experimental.upsert` preference. The somewhat poorly named upsert proposal adds new getOrInsert and getOrInsertComputed methods to Map and WeakMap, that will either get or insert a default value depending upon whether the key is present. Our implementation was contributed by students at the University of Bergen, thank you!

The proposal reached Stage 3 of the TC39 process in July 2025, Safari shipped their implementation in 18.4 (https://developer.apple.com/documentation/safari-release-notes/safari-18_4-release-notes), work does not appear to have started in Chromium (https://issues.chromium.org/issues/434977728).

Bug to turn on by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1979917

Reply all
Reply to author
Forward
0 new messages