mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
e6f3388541
Summary: Changelog: [Internal] The inspector API doesn't really need a `HermesRuntime`, all it needs is a `jsi::Runtime` and a `Debugger &`. Change the return type of `RuntimeAdapter::getRuntime` to be `jsi::Runtime`. This will allow the inspector to use the tracing runtime instead of the direct hermes runtime. Reviewed By: willholen Differential Revision: D18973867 fbshipit-source-id: 6809e52452a35e62be9ca8143aeaba8964c98eaa
36 lines
828 B
C++
36 lines
828 B
C++
/*
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "RuntimeAdapter.h"
|
|
|
|
namespace facebook {
|
|
namespace hermes {
|
|
namespace inspector {
|
|
|
|
RuntimeAdapter::~RuntimeAdapter() = default;
|
|
|
|
void RuntimeAdapter::tickleJs() {}
|
|
|
|
SharedRuntimeAdapter::SharedRuntimeAdapter(
|
|
std::shared_ptr<jsi::Runtime> runtime,
|
|
debugger::Debugger &debugger)
|
|
: runtime_(std::move(runtime)), debugger_(debugger) {}
|
|
|
|
SharedRuntimeAdapter::~SharedRuntimeAdapter() = default;
|
|
|
|
jsi::Runtime &SharedRuntimeAdapter::getRuntime() {
|
|
return *runtime_;
|
|
}
|
|
|
|
debugger::Debugger &SharedRuntimeAdapter::getDebugger() {
|
|
return debugger_;
|
|
}
|
|
|
|
} // namespace inspector
|
|
} // namespace hermes
|
|
} // namespace facebook
|