Skip to content

Commit 8a64849

Browse files
committed
Strip async generators
- fix Android release build (Metro bundle) error - fix getAnonymousIntrinsics runtime SES error - strip async generators and iterators - strip from intrinsics (control abstraction objects) - no longer attempt to repair them
1 parent 144cd37 commit 8a64849

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

ses.cjs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -3460,24 +3460,6 @@ const permitted= {
34603460
'@@toStringTag': 'string'},
34613461

34623462

3463-
'%InertAsyncGeneratorFunction%': {
3464-
// Properties of the AsyncGeneratorFunction Constructor
3465-
'[[Proto]]': '%InertFunction%',
3466-
prototype: '%AsyncGenerator%'},
3467-
3468-
3469-
'%AsyncGenerator%': {
3470-
// Properties of the AsyncGeneratorFunction Prototype Object
3471-
'[[Proto]]': '%FunctionPrototype%',
3472-
constructor: '%InertAsyncGeneratorFunction%',
3473-
prototype: '%AsyncGeneratorPrototype%',
3474-
// length prop added here for React Native jsc-android
3475-
// https://github.com/endojs/endo/issues/660
3476-
// https://github.com/react-native-community/jsc-android-buildscripts/issues/181
3477-
length: 'number',
3478-
'@@toStringTag': 'string'},
3479-
3480-
34813463
'%GeneratorPrototype%': {
34823464
// Properties of the Generator Prototype Object
34833465
'[[Proto]]': '%IteratorPrototype%',
@@ -3488,16 +3470,6 @@ const permitted= {
34883470
'@@toStringTag': 'string'},
34893471

34903472

3491-
'%AsyncGeneratorPrototype%': {
3492-
// Properties of the AsyncGenerator Prototype Object
3493-
'[[Proto]]': '%AsyncIteratorPrototype%',
3494-
constructor: '%AsyncGenerator%',
3495-
next: fn,
3496-
return: fn,
3497-
throw: fn,
3498-
'@@toStringTag': 'string'},
3499-
3500-
35013473
// TODO: To be replaced with Promise.delegate
35023474
//
35033475
// The HandledPromise global variable shimmed by `@agoric/eventual-send/shim`
@@ -4270,11 +4242,6 @@ function tameFunctionConstructors() {
42704242
'%InertAsyncFunction%',
42714243
'(async function(){})');
42724244

4273-
repairFunction(
4274-
'AsyncGeneratorFunction',
4275-
'%InertAsyncGeneratorFunction%',
4276-
'(async function*(){})');
4277-
42784245

42794246
return newIntrinsics;
42804247
}$h‍_once.default( tameFunctionConstructors);
@@ -9723,20 +9690,6 @@ const getAnonymousIntrinsics= ()=> {
97239690

97249691
const Generator= GeneratorFunction.prototype;
97259692

9726-
// 25.3.1 The AsyncGeneratorFunction Constructor
9727-
9728-
// eslint-disable-next-line no-empty-function
9729-
async function* AsyncGeneratorFunctionInstance() { }
9730-
const AsyncGeneratorFunction= getConstructorOf(
9731-
AsyncGeneratorFunctionInstance);
9732-
9733-
9734-
// 25.3.2.2 AsyncGeneratorFunction.prototype
9735-
const AsyncGenerator= AsyncGeneratorFunction.prototype;
9736-
// 25.5.1 Properties of the AsyncGenerator Prototype Object
9737-
const AsyncGeneratorPrototype= AsyncGenerator.prototype;
9738-
const AsyncIteratorPrototype= getPrototypeOf(AsyncGeneratorPrototype);
9739-
97409693
// 25.7.1 The AsyncFunction Constructor
97419694

97429695
// eslint-disable-next-line no-empty-function
@@ -9747,10 +9700,6 @@ const getAnonymousIntrinsics= ()=> {
97479700
'%InertFunction%': InertFunction,
97489701
'%ArrayIteratorPrototype%': ArrayIteratorPrototype,
97499702
'%InertAsyncFunction%': AsyncFunction,
9750-
'%AsyncGenerator%': AsyncGenerator,
9751-
'%InertAsyncGeneratorFunction%': AsyncGeneratorFunction,
9752-
'%AsyncGeneratorPrototype%': AsyncGeneratorPrototype,
9753-
'%AsyncIteratorPrototype%': AsyncIteratorPrototype,
97549703
'%Generator%': Generator,
97559704
'%InertGeneratorFunction%': GeneratorFunction,
97569705
'%IteratorPrototype%': IteratorPrototype,

0 commit comments

Comments
 (0)