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

Fixes #6031 The assert itself doesn't repro. However, ReverseHelper fails to recognize that this could be a TypedArray and seems to fail earlier than it should unable to find the Reverse method. #6280

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

atulkatti
Copy link
Contributor

No description provided.

…rseHelper fails to recognize that this could be a TypedArray and seems to fail earlier than it should unable to find the Reverse method.
Copy link
Contributor

@zenparsing zenparsing left a comment

Choose a reason for hiding this comment

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

The issue references an Ubuntu build. Have we tried the repro on Linux?


// If we came from Array.prototype.map and source object is not a JavascriptArray, source could be a TypedArray
if (typedArrayBase == nullptr && pArr == nullptr && VarIs<TypedArrayBase>(obj))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is the effect of moving this up just to change the methodName below, or is there something else?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes


In reply to: 323436676 [](ancestors = 323436676)

Copy link
Contributor

Choose a reason for hiding this comment

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

Would this name still be correct if we did something like Array.prototype.reverse.call(new Int8Array(2)) ? We're going to think the entry point was %TypedArray%.prototype.reverse, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will be %TypedArray%.prototype.reverse. Is that not correct?


In reply to: 323489092 [](ancestors = 323489092)

Copy link
Contributor

Choose a reason for hiding this comment

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

If you call Array.prototype.reverse (regardless of what you call it with) it should probably report that name in any error messages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah. The error message text is not spec'd but we want the name reported to match the actual entrypoint called - they're differently named functions in the spec, after all.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unless, there is a strong preference on the error message I will make this change. Let me know.


In reply to: 323510851 [](ancestors = 323510851)

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should probably stick with the current method of determining the methodName?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But that does cause a functional issue. In this particular case we will fail prematurely on Line#5620 as we will not find the method "Array.prototype.reverse"

const var_0 = new Uint8Array([1, 2, 3, 4]);
Object.defineProperty(var_0, 'length', { value: 4398046507008 });
Array.prototype.reverse.call(var_0);


In reply to: 324277790 [](ancestors = 324277790)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants