Conversation
Make sure all descriptors are attached to the one and only iterator prototype.
saghul
commented
Nov 15, 2024
| test262/test/built-ins/Iterator/from/return-method-returns-iterator-result.js:18: strict mode: TypeError: not a function | ||
| test262/test/built-ins/Iterator/from/return-method-throws-for-invalid-this.js:16: TypeError: not a function | ||
| test262/test/built-ins/Iterator/from/return-method-throws-for-invalid-this.js:16: strict mode: TypeError: not a function | ||
| test262/test/built-ins/Iterator/prototype/Symbol.iterator/prop-desc.js:15: Test262Error: obj should have an own property Symbol(Symbol.iterator) |
Contributor
Author
There was a problem hiding this comment.
This is what made me realize something was off.
| test262/test/built-ins/Date/prototype/setUTCSeconds/date-value-read-before-tonumber-when-date-is-invalid.js:26: strict mode: Test262Error: time updated in valueOf Expected SameValue(«NaN», «0») to be true | ||
| test262/test/built-ins/Iterator/from/get-return-method-when-call-return.js:24: TypeError: not a function | ||
| test262/test/built-ins/Iterator/from/get-return-method-when-call-return.js:24: strict mode: TypeError: not a function | ||
| test262/test/built-ins/Iterator/from/result-proto.js:10: unexpected error: Test262Error: Expected SameValue(«[object Object]», «[object Iterator]») to be true |
Contributor
Author
There was a problem hiding this comment.
I'll fix this as part of #689 which I'll rebase on top of this PR.
| JS_NewObjectProtoClass(ctx, ctx->class_proto[JS_CLASS_ITERATOR], | ||
| JS_CLASS_ITERATOR); | ||
|
|
||
| ctx->class_proto[JS_CLASS_ITERATOR_HELPER] = JS_NewObjectProto(ctx, ctx->iterator_proto); |
Contributor
Author
There was a problem hiding this comment.
Note how we had 2 iterator prototypes, sort of. Oops!
bnoordhuis
approved these changes
Nov 15, 2024
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Make sure all descriptors are attached to the one and only iterator prototype.