Files
react-native/ReactAndroid/src/main/jni/react/Platform.cpp
Chris Hopman 75ca46e332 Inject some behavior from react/jni/ to react/
Summary:
So, this makes it so a set of behaviors that require accessing java can be injected from the jni/ folder. The behaviors are logging, perf logging, log markers and loading script from assets.

I'd argue that these should all actually be encapsulated by interfaces that are passed to the JSCExecutor/others (and I'd say that's regardless of whether they are injected from jni/ or not), but I wanted to stick to the least disruptive pattern for these changes.

public

Reviewed By: astreet

Differential Revision: D2905168

fb-gh-sync-id: 7c8c16cb77b8fc3d42750dacc6574259ad512ac2
2016-02-05 18:11:44 -08:00

25 lines
374 B
C++

// Copyright 2004-present Facebook. All Rights Reserved.
#include "Platform.h"
namespace facebook {
namespace react {
namespace ReactMarker {
LogMarker logMarker;
};
namespace WebWorkerUtil {
LoadScriptFromAssets loadScriptFromAssets;
};
namespace PerfLogging {
InstallNativeHooks installNativeHooks;
}
namespace JSLogging {
JSCNativeHook nativeHook = nullptr;
}
} }