-
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
Open
atulkatti
wants to merge
1
commit into
chakra-core:master
Choose a base branch
from
atulkatti:Issue.6031.1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
yes
In reply to: 323436676 [](ancestors = 323436676)
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)