Commit 1f9fbad
util: fix deprecated class prototype
Ensure the wrapped class prototype is exactly the unwrapped class
prototype, rather than an object whose prototype is the unwrapped
class prototype.
This ensures that instances of the unwrapped class are instances
of the wrapped class. This is useful when both a wrapped class and
a factory for the unwrapped class are both exposed.
Ref: #8103
PR-URL: #8105
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>1 parent 091ba2c commit 1f9fbadCopy full SHA for 1f9fbad
File tree
Expand file treeCollapse file tree
2 files changed
+7
-1
lines changedOpen diff view settings
Filter options
- lib/internal
- test/fixtures
Expand file treeCollapse file tree
2 files changed
+7
-1
lines changedOpen diff view settings
Collapse file
+4-1Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
66 | 66 | |
67 | 67 | |
68 | 68 | |
69 | | - |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
70 | 73 | |
71 | 74 | |
72 | 75 | |
|
Collapse file
test/fixtures/deprecated-userland-class.js
Copy file name to clipboardExpand all lines: test/fixtures/deprecated-userland-class.js+3Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
7 | 7 | |
8 | 8 | |
9 | 9 | |
| 10 | + |
10 | 11 | |
11 | 12 | |
12 | 13 | |
| 14 | + |
| 15 | + |
0 commit comments