By using this abstraction rather than accessing the properties directly,
we smooth the transition to https://github.com/endojs/endo/pull/1712,
tolerating both the legacy and current guard shapes.
Note that technically, tolerating the old LegacyAwaitArgGuardShape
is an exploitable bug, in that a record that matches this
shape is also a valid parameter pattern that should allow
an argument that matches that pattern, i.e., a copyRecord argument that
at least contains a klass: 'awaitArgGuard' property.
By using this abstraction rather than accessing the properties directly, we smooth the transition to https://github.com/endojs/endo/pull/1712, tolerating both the legacy and current guard shapes.
Note that technically, tolerating the old LegacyAwaitArgGuardShape is an exploitable bug, in that a record that matches this shape is also a valid parameter pattern that should allow an argument that matches that pattern, i.e., a copyRecord argument that at least contains a
klass: 'awaitArgGuard'
property.