-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: master
Are you sure you want to change the base?
Conversation
…rseHelper fails to recognize that this could be a TypedArray and seems to fail earlier than it should unable to find the Reverse method.
There was a problem hiding this 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)) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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
?
There was a problem hiding this comment.
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)
No description provided.