Typed WeakMap receivers ignore own get, setPrototypeOf and a patched WeakMap.prototype.get
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 18/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript, rust, typescript
- Domain
- compilers
Research direction
The typed WeakMap dispatch lives in Perry's codegen, so start by finding where it emits direct calls to the builtin WeakMap get and has, and where the js_bm_* entries perform their pristine-prototype and plain-receiver checks. Reproduce by compiling a small TypeScript file that adds an own get, relinks the receiver with Object.setPrototypeOf, or patches WeakMap.prototype.get, and compare against node. Done means those cases fall back to the generic path and the Promise has() case throws a TypeError like node.
Written by the indexing model from the issue text.
Description
Found by the step 5 phase 2 lane; main has it too. Codegen's typed WeakMap dispatch calls the builtin directly even when the receiver has an own get, was relinked with Object.setPrototypeOf, or WeakMap.prototype.get was replaced. Related: has() called on a Promise through an untyped receiver doesn't throw (node throws TypeError). The typed dispatch needs the same pristine-prototype and plain-receiver proof as the new js_bm_* entries.
- Dominant language
- Rust
- Stars
- 4.9k
- Forks
- 166
- Avg merge
- 3h 23m
- Merged PRs (30d)
- 911
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from PerryTS/perry
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 76/100
Maintainers usually reply within 1 day
Similar issues
-
documentation P2
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
bug good first issue priority:high
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Konfirm-xyz/konfirm-contracts#163 ·
Maintainers usually reply within 1 day
-
area:gc-repack-output bug factory:dogfood factory:triaged priority:p3 type:bug type:ux
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
gitbutlerapp/grit#1161 · 1 comment ·
Maintainers usually reply within 1 day
-
feature performance
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
lance-format/lance#10137 ·
Maintainers usually reply within 2 days
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 85/100