mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Add "jsEngine: hermes" to JS runtime Error prototype (#48401)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/48401 This change adds a flag to JS Error's prototype to specify the jsEngine. Reviewed By: fkgozali Differential Revision: D67665484 fbshipit-source-id: 64b7b4bd986bcbd45d58e70c1a16de6752b05ccd
This commit is contained in:
1 parent
9ceabd341d
commit
85bdd75828
1 file changed
+5
@@ -153,6 +153,11 @@ std::unique_ptr<JSRuntime> HermesInstance::createJSRuntime(
|
||||
std::unique_ptr<HermesRuntime> hermesRuntime =
|
||||
hermes::makeHermesRuntime(runtimeConfigBuilder.build());
|
||||
|
||||
auto errorPrototype = hermesRuntime->global()
|
||||
.getPropertyAsObject(*hermesRuntime, "Error")
|
||||
.getPropertyAsObject(*hermesRuntime, "prototype");
|
||||
errorPrototype.setProperty(*hermesRuntime, "jsEngine", "hermes");
|
||||
|
||||
#ifdef HERMES_ENABLE_DEBUGGER
|
||||
auto& inspectorFlags = jsinspector_modern::InspectorFlags::getInstance();
|
||||
if (!inspectorFlags.getFuseboxEnabled()) {
|
||||
|
||||
Reference in new issue
Block a user