From 9ad88c868fef78b697e695cd9654159f21b3ebec Mon Sep 17 00:00:00 2001 From: Alexander Blom Date: Fri, 8 Apr 2016 17:39:06 -0700 Subject: [PATCH] Enable creating ReadableNativeMap outside of OnLoad Reviewed By: mhorowitz Differential Revision: D3147576 fb-gh-sync-id: ddf3a4332cca69838d7bcce82b71bea5591b6395 fbshipit-source-id: ddf3a4332cca69838d7bcce82b71bea5591b6395 --- ReactAndroid/src/main/jni/react/jni/OnLoad.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp index 5bdc2c1ff..b9c4240d3 100644 --- a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +++ b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp @@ -204,6 +204,8 @@ jni::local_ref ReadableNativeArray::getArray } } +// Export getMap() so we can workaround constructing ReadableNativeMap +__attribute__((visibility("default"))) jobject ReadableNativeArray::getMap(jint index) { return createReadableNativeMapWithContents(Environment::current(), array.at(index)); }