Enable creating ReadableNativeMap outside of OnLoad

Reviewed By: mhorowitz

Differential Revision: D3147576

fb-gh-sync-id: ddf3a4332cca69838d7bcce82b71bea5591b6395
fbshipit-source-id: ddf3a4332cca69838d7bcce82b71bea5591b6395
This commit is contained in:
Alexander Blom 2016-04-08 17:39:06 -07:00 committed by Facebook Github Bot 5
parent 9923d3fa6f
commit 9ad88c868f
1 changed files with 2 additions and 0 deletions

View File

@ -204,6 +204,8 @@ jni::local_ref<ReadableNativeArray::jhybridobject> 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));
}