Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make resizableArrayBufferUtils not depend on syntax that may not be supported #4165

Merged

Conversation

p-bakker
Copy link
Contributor

@p-bakker p-bakker commented Jul 23, 2024

In order to not fail because harness code fails to load due to using not-supported EcmaScript features while not needed

Relates to ##3032

@p-bakker p-bakker requested a review from a team as a code owner July 23, 2024 16:07
@p-bakker p-bakker changed the title Make resizableArrayBufferUtils not depend on syntax that may not be Make resizableArrayBufferUtils not depend on syntax that may not be supported Jul 23, 2024
@p-bakker p-bakker force-pushed the 3022_dont_throw_on_unsupported_typed_array_types branch from ed53e08 to 3b42b6c Compare July 24, 2024 19:23
Copy link
Contributor

@ptomato ptomato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This time I made sure the resizable ArrayBuffer tests do still run on implementations that support them 😅

@ptomato ptomato force-pushed the 3022_dont_throw_on_unsupported_typed_array_types branch from 3b42b6c to 336115d Compare July 24, 2024 19:49
@ptomato ptomato merged commit 79df6ec into tc39:main Jul 24, 2024
8 checks passed
Comment on lines +21 to +24
// Using new Function()(); instead of just 'class x extends Y' as to not bomb out when `class` isn't supported
const MyUint8Array = new Function('return class MyUint8Array extends Uint8Array {}')();
const MyFloat32Array = new Function('return class MyFloat32Array extends Float32Array {}')();
const MyBigInt64Array = new Function('return class MyBigInt64Array extends BigInt64Array {}')();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it ok that these exceptions aren't caught?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, no, they are not. I'm sorry, juggling too many things at once and trying to rush it through, shouldn't have done that...

Will send an additional PR tomorrow... Sorry again for keeping you all occupied...

p-bakker added a commit to p-bakker/test262 that referenced this pull request Jul 25, 2024
Added catch to achieve the entire goal of the previous PR to prevent the
harness from loading if 'class' syntax isn't supported
ptomato pushed a commit that referenced this pull request Jul 25, 2024
Added catch to achieve the entire goal of the previous PR to prevent the
harness from loading if 'class' syntax isn't supported
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants