fix(ses): Add HandledPromise to the whitelist
This is a temporary fix until lockdown gets a more disciplined way of updating the whitelist with vetted shims. In any event, it is a step toward Promise.delegate, but that standard hasn't yet been implemented in
MODIFY
packages/ses/NEWS.md
packages/ses/NEWS.md
@@ -2,7 +2,9 @@ User-visible changes in SES:
## Next release
-* No changes yet.
+* Updates the whitelist to allow a `HandledPromise` global, which is provided
+ by `@agoric/eventual-send`, an early implementation of
+ https://github.com/tc39/proposal-eventual-send.
## Release 0.10.0 (8-August-2020)

MODIFY
packages/ses/src/whitelist.js
packages/ses/src/whitelist.js
@@ -90,6 +90,7 @@ export const universalPropertyNames = {
lockdown: 'lockdown',
harden: 'harden',
+ HandledPromise: 'HandledPromise', // TODO: Until Promise.delegate (see below).
StaticModuleRecord: 'StaticModuleRecord',
};
@@ -1644,6 +1645,27 @@ export const whitelist = {
'@@toStringTag': 'string',
},
+ // TODO: To be replaced with Promise.delegate
+ //
+ // The HandledPromise global variable shimmed by `@agoric/eventual-send/shim`
+ // implements an initial version of the eventual send specification at:
+ // https://github.com/tc39/proposal-eventual-send
+ //
+ // We will likely change this to add a property to Promise called
+ // Promise.delegate and put static methods on it, which will necessitate
+ // another whitelist change to update to the current proposed standard.
+ HandledPromise: {
+ '[[Proto]]': 'Promise',
+ applyFunction: fn,
+ applyFunctionSendOnly: fn,
+ applyMethod: fn,
+ applyMethodSendOnly: fn,
+ get: fn,
+ getSendOnly: fn,
+ prototype: '%PromisePrototype%',
+ resolve: fn,
+ },
+
Promise: {
// 25.6.4 Properties of the Promise Constructor
'[[Proto]]': '%FunctionPrototype%',

fix(ses): Add HandledPromise to the whitelist (#416)

This is a temporary fix until lockdown gets a more disciplined way of updating the whitelist with vetted shims. In any event, it is a step toward Promise.delegate, but that standard hasn't yet been implemented in @agoric/eventual-send/shim.