mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-23 18:19:12 +01:00
less Buffer
This commit is contained in:
@@ -672,7 +672,12 @@ export class ExtHostExtensionService implements ExtHostExtensionServiceShape {
|
||||
}
|
||||
|
||||
public async $test_down(size: number): Promise<VSBuffer> {
|
||||
return VSBuffer.wrap(Buffer.alloc(size, Math.random() % 256));
|
||||
let buff = VSBuffer.alloc(size);
|
||||
let value = Math.random() % 256;
|
||||
for (let i = 0; i < size; i++) {
|
||||
buff.writeUint8(value, i);
|
||||
}
|
||||
return buff;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user