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

Assert failed for typedValNode is an ObjectLiteral Parse Node #35

Closed
jameslahm opened this issue Sep 29, 2022 · 0 comments · Fixed by #41
Closed

Assert failed for typedValNode is an ObjectLiteral Parse Node #35

jameslahm opened this issue Sep 29, 2022 · 0 comments · Fixed by #41

Comments

@jameslahm
Copy link

Consider the example below:

reviver = function(p, v) {
  if (p == "a") {
    this.b = { get x() {return null}, set x(_){throw 666} }
  }
  return v;
}
JSON.parse('{"a":0,"b":1}', reviver);

According to the spec, when calling InternalizeJSONProperty({a: 0, b: { get x() {return null}, set x(_){throw 666} }}, 'b', reviver, 1)

// According step 5.
val = { get x() {return null}, set x(_){throw 666} }
// According step 6.c
// This will fail, NumberLiteral Parse Node is not ObjectLiteral Parse Node.
Assert(1 is ObjectLiteral Parse Node) 
gibson042 added a commit to gibson042/proposal-json-parse-with-source that referenced this issue Jan 20, 2023
…ccess

Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes tc39#35
Fixes tc39#39
gibson042 added a commit to gibson042/proposal-json-parse-with-source that referenced this issue Jan 27, 2023
…ccess

Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes tc39#35
Fixes tc39#39
gibson042 added a commit to gibson042/proposal-json-parse-with-source that referenced this issue Jan 27, 2023
…ccess

Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes tc39#35
Fixes tc39#39
gibson042 added a commit to gibson042/proposal-json-parse-with-source that referenced this issue Jan 27, 2023
…ccess

Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes tc39#35
Fixes tc39#39
gibson042 added a commit that referenced this issue Sep 18, 2023
…ccess

Snapshot the initial data structure before exposing it to ECMAScript code.
Fixes #35
Fixes #39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant