Summary:
X-link: https://github.com/facebook/react-native/pull/43098
Changelog: [Internal]
Wraps Hermes's `CDPHandler::getState()` API in an engine-agnostic abstraction (`RuntimeAgentDelegate::getExportedState`).
An Agent's lifetime ends when its Target is destroyed, but it can occasionally be useful to persist some state for the "next" Target+Agent of the same type (in the same session) to read.
`RuntimeAgentDelegate` is polymorphic and can't just write arbitrary data to SessionState. Instead, it can now *export* a state object that we'll store and pass to the next `RuntimeTargetDelegate::createAgentDelegate` call.
Reviewed By: huntie
Differential Revision: D53919696
fbshipit-source-id: a8e9b921bc8fc2d195c5dddea9537e6ead3d0358