Fixes and improvements for proxy and reflect#19
Closed
duonglaiquang wants to merge 4 commits into
Closed
Conversation
duonglaiquang
force-pushed
the
duong_reflect_and_proxy
branch
from
March 17, 2026 05:07
26c8bb5 to
da44309
Compare
Member
|
Thanks a lot, but this requires some time, something for the weekend ;-) |
Member
|
first pr is on the way mozilla#2347 |
Member
|
finally found the time to work on the ctor part - mozilla#2449 |
Member
|
@duonglaiquang as far as i remember all these are now implemented. The ctor stuff is already merged into core-js, have added some more test and made a new snapshot build available. Will do a fresh htmlunit snapshot later tody. Hopefully i have captured now all your open points, if not please wake me up.... Many, many thanks for all your contributions... |
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.
This PR does the following
Fix multiple issues in
NativeProxyandNativeReflect.1. NativeProxy: fix set trap not passing receiver object
put(String, ...),put(int, ...),put(Symbol, ...)now passthis(the proxy) as the 4th argument to the set trap.2. NativeReflect: fix Reflect.construct() with LambdaConstructor
Reflect.constructusedctorBaseFunction.call()to invoke the target, butLambdaConstructortargets can be non-callable as they only support.construct()which would result in aTypeErrorwhen called.Now we check if it's callable or constructable to decide what to do.
3. NativeReflect: re-implement Reflect.get() and Reflect.set() following official spec
The old implementation of
Reflect.getandReflect.setignored the optional receiver parameter entirely.