mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-21 10:34:31 +08:00
Bind methods instead of using eval
Reviewed By: astreet Differential Revision: D3417452 fbshipit-source-id: 437daa2dfcd01efb749465a94c1a72ce8a2cb315
This commit is contained in:
committed by
Facebook Github Bot 0
parent
cd542f0656
commit
d63d4f0e9c
@@ -11,6 +11,9 @@ package com.facebook.react.cxxbridge;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.facebook.react.devsupport.DebugServerException;
|
||||
import com.facebook.react.devsupport.DevServerHelper;
|
||||
|
||||
/**
|
||||
* A class that stores JS bundle information and allows {@link CatalystInstance} to load a correct
|
||||
* bundle through {@link ReactBridge}.
|
||||
@@ -55,7 +58,11 @@ public abstract class JSBundleLoader {
|
||||
return new JSBundleLoader() {
|
||||
@Override
|
||||
public void loadScript(CatalystInstanceImpl instance) {
|
||||
instance.loadScriptFromFile(cachedFileLocation, sourceURL);
|
||||
try {
|
||||
instance.loadScriptFromFile(cachedFileLocation, sourceURL);
|
||||
} catch (Exception e) {
|
||||
throw DebugServerException.makeGeneric(e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user