| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -58,8 +58,8 @@ function Buffer(arg) { | |||
| 58 | 58 | return fromObject(arg); | |
| 59 | 59 | } | |
| 60 | 60 | ||
| 61 | - Buffer.prototype.__proto__ = Uint8Array.prototype; | ||
| 62 | - Buffer.__proto__ = Uint8Array; | ||
| 61 | + Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype); | ||
| 62 | + Object.setPrototypeOf(Buffer, Uint8Array); | ||
| 63 | 63 | ||
| 64 | 64 | ||
| 65 | 65 | function SlowBuffer(length) { | |
@@ -72,8 +72,8 @@ function SlowBuffer(length) { | |||
| 72 | 72 | return ui8; | |
| 73 | 73 | } | |
| 74 | 74 | ||
| 75 | - SlowBuffer.prototype.__proto__ = Buffer.prototype; | ||
| 76 | - SlowBuffer.__proto__ = Buffer; | ||
| 75 | + Object.setPrototypeOf(SlowBuffer.prototype, Uint8Array.prototype); | ||
| 76 | + Object.setPrototypeOf(SlowBuffer, Uint8Array); | ||
| 77 | 77 | ||
| 78 | 78 | ||
| 79 | 79 | function allocate(size) { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments