mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Refactored bridge to support transferrables (e.g. typed array buffers) and added transferable param to postMessage for op codes
This commit is contained in:
@@ -102,6 +102,11 @@ export default class Store extends EventEmitter {
|
||||
}
|
||||
|
||||
onBridgeOperations = (operations: Uint32Array) => {
|
||||
if (!(operations instanceof Uint32Array)) {
|
||||
// $FlowFixMe TODO HACK Temporary workaround for the fact that Chrome is not transferring the typed array.
|
||||
operations = Uint32Array.from(Object.values(operations));
|
||||
}
|
||||
|
||||
debug('onBridgeOperations', operations);
|
||||
|
||||
let haveRootsChanged = false;
|
||||
|
||||
Reference in New Issue
Block a user