Skip to content

Commit

Permalink
fixup! feat(ses): update comment
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu Hofman <[email protected]>
  • Loading branch information
2 people authored and naugtur committed Apr 30, 2024
1 parent 1079bdc commit f74eee9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ses/src/tame-symbol-constructor.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const tameSymbolConstructor = () => {
const SymbolPrototype = OriginalSymbol.prototype;

// Bypass Hermes bug, fixed in: https://github.com/facebook/hermes/commit/00f18c89c720e1c34592bb85a1a8d311e6e99599
// Increase JS spec fidelity by no longer defining SharedSymbol as an object literal short-hand method
// Make a "copy" of the primordial [Symbol "constructor"](https://tc39.es/ecma262/#sec-symbol-description) which maintains all observable behavior. The primordial explicitly throws on `[[Construct]]` and has a `[[Call]]` which ignores the receiver. Binding also maintains the `toString` source as a native function. The `name` is restored below when copying own properties.
const SharedSymbol = functionBind(Symbol, undefined);

defineProperties(SymbolPrototype, {
Expand Down

0 comments on commit f74eee9

Please sign in to comment.