Skip to content

JS Proxy on Clr Object #1644

Closed Answered by viruscamp
martinbu asked this question in Q&A
Oct 4, 2023 · 4 comments · 1 reply
Discussion options

You must be logged in to vote

@lahma Please reopen #1643 , I can comfirm it's a bug and I can provide a fix:

  1. provide detailed message for exceptions in JsProxy
  2. donot use ReferenceEquals on data property value comparing
  3. maybe we should mark all Clr Property and Indexer as js accessor property

That's a pure js example which works in V8, but failed in Jint, caused by ReferenceEquals

            let o = Object.defineProperty({}, 'value', {
              configurable: false,
              value: 'oz',
            });
            const handler = {
              get(target, property, receiver) {
                return 'Mozilla'.substring(1,3);
              }
            };
            let p = new Proxy(o, handler);

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@martinbu
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by lahma
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1643 on October 05, 2023 10:49.