From cf94a9ea9599ff1325fb31ba34c3ab913f2bf964 Mon Sep 17 00:00:00 2001 From: David Aurelio Date: Tue, 15 Dec 2015 05:46:24 -0800 Subject: [PATCH] Avoid copying the JS bundle unnecessarily MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: public When forwarding the unbundle code to the bridge, we’re passing the code by value. This changes the affected method to take it by reference. Reviewed By: astreet Differential Revision: D2759569 fb-gh-sync-id: 508d4f4d56bcbdd5a7df5610cf9040121f8878ef --- ReactAndroid/src/main/jni/react/jni/OnLoad.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp index 8867b0c9e..b5ad6a11f 100644 --- a/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +++ b/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp @@ -623,8 +623,8 @@ static void create(JNIEnv* env, jobject obj, jobject executor, jobject callback, static void executeApplicationScript( const RefPtr& bridge, - const std::string script, - const std::string sourceUri) { + const std::string& script, + const std::string& sourceUri) { try { // Execute the application script and collect/dispatch any native calls that might have occured bridge->executeApplicationScript(script, sourceUri);