Add the following item to the description of the Symbol type:
- Each Symbol value immutably holds a value called [[Private]] that is either true or false.
Add a clause specifying that well-known symbols have a [[Private]] value of false.
Modify the list of invariants:
- The return value must be a List.
- The returned list must not contain any duplicate entries.
- The Type of each element of the returned List is either String or Symbol.
- The returned list must not contain any symbols whose [[Private]] value is true.
- The returned List must contain at least the keys of all non-configurable non-private own properties that have previously been observed.
- If the object is non-extensible, the returned list must contain only the keys of all non-private own properties of the object that are observable using [[GetOwnProperty]].
The term "non-private own property" is not well-defined.
Modify step 4:
- For each own property key P of O that is a Symbol, in ascending chronological order of property creation, do
- If P's [[Private]] value is false, add P as the last element of keys.
Update identical steps for exotic object [[OwnPropertyKeys]]:
- 9.4.3.3 (String)
- 9.4.5.6 (Integer-Indexed)
Add after step 5:
- If Type(P) is Symbol and P's [[Private]] value is true, then
- Let trap be undefined.
- Else,
- Let trap be ? GetMethod(handler, "getOwnPropertyDescriptor").
Update similar steps for the following internal methods:
- 9.5.6 [[DefineOwnProperty]] ( P, Desc )
- 9.5.7 [[HasProperty]] ( P )
- 9.5.8 [[Get]] ( P, Receiver )
- 9.5.9 [[Set]] ( P, V, Receiver )
- 9.5.10 [[Delete]] ( P )
Add after step 9:
- If trapResult contains any Symbol values whose [[Private]] value is true, throw a TypeError exception.
Add the following item to the note:
- The returned List contains no Symbol values whose [[Private]] value is true.
Modify note regarding invariants:
- The result of [[OwnPropertyKeys]] is a List.
- The returned List contains no duplicate entries.
- The Type of each result List element is either String or Symbol.
- The returned list must not contain any symbols whose [[Private]] value is true.
- The result List must contain the keys of all non-configurable non-private own properties of the target object.
- If the target object is not extensible, then the result List must contain all the keys of the non-private own properties of the target object and no other values.
Modify step 4:
- Return a new unique Symbol value whose [[Description]] value is descString and whose [[Private]] value is false.
- If NewTarget is not undefined, throw a TypeError exception.
- If description is undefined, let descString be undefined.
- Else, let descString be ? ToString(description).
- Return a new unique Symbol value whose [[Description]] value is descString and whose [[Private]] value is true.
- Let sym be ? thisSymbolValue(this value).
- Let isPrivate be sym's [[Private]] value.
- Assert: Type(isPrivate) is Boolean.
- Return isPrivate.