Enforce stronger types for ArrayBuffers and storage
This commit is contained in:
parent
61ac79e9ae
commit
8f5086227a
56 changed files with 748 additions and 675 deletions
|
@ -30,6 +30,7 @@
|
|||
import { connection as WebSocket, IMessage } from 'websocket';
|
||||
|
||||
import { ByteBufferClass } from '../window.d';
|
||||
import { typedArrayToArrayBuffer as toArrayBuffer } from '../Crypto';
|
||||
|
||||
import EventTarget from './EventTarget';
|
||||
|
||||
|
@ -153,7 +154,7 @@ export default class WebSocketResource extends EventTarget {
|
|||
}
|
||||
|
||||
const message = window.textsecure.protobuf.WebSocketMessage.decode(
|
||||
binaryData
|
||||
toArrayBuffer(binaryData)
|
||||
);
|
||||
if (
|
||||
message.type ===
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue