Intent to Ship: Symbols as WeakMap keys

138 views
Skip to first unread message

Shu-yu Guo

unread,
Nov 1, 2022, 6:36:32 PM11/1/22
to blink-dev

Contact emails

s...@chromium.org

Explainer

https://github.com/tc39/proposal-symbols-as-weakmap-keys

Specification

https://tc39.es/proposal-symbols-as-weakmap-keys

Summary

This proposal allows Symbols to be used as keys in WeakMaps, WeakSet, as the referent in a WeakRef, and as the target in a FinalizationRegistry.



Blink component

Blink>JavaScript>Language

TAG review

This is a TC39 JS language feature that doesn't have any interaction with web APIs.

TAG review status

Not applicable

Risks



Interoperability and Compatibility



Gecko: Positive Stage 3 TC39 proposal

WebKit: Positive Stage 3 TC39 proposal

Web developers: No signals

Other signals:

WebView application risks

None?


Debuggability

This proposal adds Symbols as keys to weak collections and weak data structures, which already exist and are debuggable. The V8 inspector was extended [1] to support Symbols in collections. [1] https://chromium-review.googlesource.com/c/v8/v8/+/3930037



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes

Is this feature fully tested by web-platform-tests?


Flag name

--harmony-symbol-as-weakmap-key

Requires code in //chrome?

False

Tracking bug

https://bugs.chromium.org/p/v8/issues/detail?id=12947

Estimated milestones

DevTrial on desktop108
DevTrial on Android108


Anticipated spec changes

None



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/5124046206271488

This intent message was generated by Chrome Platform Status.

slightlyoff via Chromestatus

unread,
Nov 2, 2022, 11:20:48 AM11/2/22
to blin...@chromium.org
LGTM

rbyers via Chromestatus

unread,
Nov 2, 2022, 11:53:15 AM11/2/22
to blin...@chromium.org
LGTM2

Daniel Bratell

unread,
Nov 2, 2022, 11:54:06 AM11/2/22
to rbyers via Chromestatus, blin...@chromium.org

LGTM3

/Daniel

On 2022-11-02 16:53, rbyers via Chromestatus wrote:
LGTM2
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/0000000000005f69c905ec7ed60d%40google.com.
Reply all
Reply to author
Forward
0 new messages