mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
14686259d9
Summary: Adding an instrumentation endpoint that allows us to write a snapshot out to an arbitrary output stream. This is in addition to `createSnapshotFromFile`. I reserve the right to replace the latter with the former in a later diff. This is necessary to allow snapshots to be requested over the chrome debugger protocol. The protocol sends the snapshot over the wire in chunks so we need to be able to use an output stream that can do the chunking. Because LLVM types are not available at the JSI layer, we accept a `std::ostream` reference which we wrap with `llvm::raw_os_ostream` within Hermes. We should not incur the static initializer cost (or other code bloat) of using ostreams as a result. Reviewed By: cwdick Differential Revision: D16016319 fbshipit-source-id: 2d0b4848fd5cbe9ddee371d856cd8eb19dd80396