| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 800f7c4 commit ea7aaf3
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -49,7 +49,6 @@ if (internalBinding('config').hasInspector) { | |||
| 49 | 49 | } | |
| 50 | 50 | ||
| 51 | 51 | const assert = require('internal/assert'); | |
| 52 | - const { copy } = internalBinding('buffer'); | ||
| 53 | 52 | const { inspect } = require('internal/util/inspect'); | |
| 54 | 53 | const { FastBuffer } = require('internal/buffer'); | |
| 55 | 54 | const { getValidatedPath } = require('internal/fs/utils'); | |
@@ -368,7 +367,7 @@ class DefaultDeserializer extends Deserializer { | |||
| 368 | 367 | } | |
| 369 | 368 | // Copy to an aligned buffer first. | |
| 370 | 369 | const buffer_copy = Buffer.allocUnsafe(byteLength); | |
| 371 | - copy(this.buffer, buffer_copy, 0, byteOffset, byteOffset + byteLength); | ||
| 370 | + buffer_copy.set(new Uint8Array(this.buffer.buffer, this.buffer.byteOffset + byteOffset, byteLength)); | ||
| 372 | 371 | return new ctor(buffer_copy.buffer, | |
| 373 | 372 | buffer_copy.byteOffset, | |
| 374 | 373 | byteLength / BYTES_PER_ELEMENT); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,3 +5,7 @@ const v8 = require('v8'); | |||
| 5 | 5 | ||
| 6 | 6 | process.on('warning', common.mustNotCall()); | |
| 7 | 7 | v8.deserialize(v8.serialize(Buffer.alloc(0))); | |
| 8 | + v8.deserialize(v8.serialize({ a: new Int32Array(1024) })); | ||
| 9 | + v8.deserialize(v8.serialize({ b: new Int16Array(8192) })); | ||
| 10 | + v8.deserialize(v8.serialize({ c: new Uint32Array(1024) })); | ||
| 11 | + v8.deserialize(v8.serialize({ d: new Uint16Array(8192) })); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments