Skip to content

Commit

Permalink
Strip async generators
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
leotm committed May 28, 2024
1 parent 144cd37 commit 8a64849
Showing 1 changed file with 0 additions and 51 deletions.
51 changes: 0 additions & 51 deletions ses.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3460,24 +3460,6 @@ const permitted= {
'@@toStringTag': 'string'},


'%InertAsyncGeneratorFunction%': {
// Properties of the AsyncGeneratorFunction Constructor
'[[Proto]]': '%InertFunction%',
prototype: '%AsyncGenerator%'},


'%AsyncGenerator%': {
// Properties of the AsyncGeneratorFunction Prototype Object
'[[Proto]]': '%FunctionPrototype%',
constructor: '%InertAsyncGeneratorFunction%',
prototype: '%AsyncGeneratorPrototype%',
// length prop added here for React Native jsc-android
// https://github.com/endojs/endo/issues/660
// https://github.com/react-native-community/jsc-android-buildscripts/issues/181
length: 'number',
'@@toStringTag': 'string'},


'%GeneratorPrototype%': {
// Properties of the Generator Prototype Object
'[[Proto]]': '%IteratorPrototype%',
Expand All @@ -3488,16 +3470,6 @@ const permitted= {
'@@toStringTag': 'string'},


'%AsyncGeneratorPrototype%': {
// Properties of the AsyncGenerator Prototype Object
'[[Proto]]': '%AsyncIteratorPrototype%',
constructor: '%AsyncGenerator%',
next: fn,
return: fn,
throw: fn,
'@@toStringTag': 'string'},


// TODO: To be replaced with Promise.delegate
//
// The HandledPromise global variable shimmed by `@agoric/eventual-send/shim`
Expand Down Expand Up @@ -4270,11 +4242,6 @@ function tameFunctionConstructors() {
'%InertAsyncFunction%',
'(async function(){})');

repairFunction(
'AsyncGeneratorFunction',
'%InertAsyncGeneratorFunction%',
'(async function*(){})');


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

const Generator= GeneratorFunction.prototype;

// 25.3.1 The AsyncGeneratorFunction Constructor

// eslint-disable-next-line no-empty-function
async function* AsyncGeneratorFunctionInstance() { }
const AsyncGeneratorFunction= getConstructorOf(
AsyncGeneratorFunctionInstance);


// 25.3.2.2 AsyncGeneratorFunction.prototype
const AsyncGenerator= AsyncGeneratorFunction.prototype;
// 25.5.1 Properties of the AsyncGenerator Prototype Object
const AsyncGeneratorPrototype= AsyncGenerator.prototype;
const AsyncIteratorPrototype= getPrototypeOf(AsyncGeneratorPrototype);

// 25.7.1 The AsyncFunction Constructor

// eslint-disable-next-line no-empty-function
Expand All @@ -9747,10 +9700,6 @@ const getAnonymousIntrinsics= ()=> {
'%InertFunction%': InertFunction,
'%ArrayIteratorPrototype%': ArrayIteratorPrototype,
'%InertAsyncFunction%': AsyncFunction,
'%AsyncGenerator%': AsyncGenerator,
'%InertAsyncGeneratorFunction%': AsyncGeneratorFunction,
'%AsyncGeneratorPrototype%': AsyncGeneratorPrototype,
'%AsyncIteratorPrototype%': AsyncIteratorPrototype,
'%Generator%': Generator,
'%InertGeneratorFunction%': GeneratorFunction,
'%IteratorPrototype%': IteratorPrototype,
Expand Down

0 comments on commit 8a64849

Please sign in to comment.