mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-02 23:05:01 +08:00
Decouple module callback mechanism from CatalystInstance
Summary: Create a JSInstance superinterface which doesn't include all the lifecycle stuff. Reviewed By: AaaChiuuu Differential Revision: D4614410 fbshipit-source-id: 16047bbcb1bb69bf36a0a13ef68f3a6aa396a991
This commit is contained in:
committed by
Facebook Github Bot
parent
7e4b8ff000
commit
6410e256c5
@@ -23,7 +23,8 @@ import com.facebook.react.common.annotations.VisibleForTesting;
|
||||
* Java APIs be invokable from JavaScript as well.
|
||||
*/
|
||||
@DoNotStrip
|
||||
public interface CatalystInstance extends MemoryPressureListener {
|
||||
public interface CatalystInstance
|
||||
extends MemoryPressureListener, JSInstance {
|
||||
void runJSBundle();
|
||||
|
||||
/**
|
||||
@@ -34,8 +35,11 @@ public interface CatalystInstance extends MemoryPressureListener {
|
||||
|
||||
// This is called from java code, so it won't be stripped anyway, but proguard will rename it,
|
||||
// which this prevents.
|
||||
@DoNotStrip
|
||||
void invokeCallback(ExecutorToken executorToken, final int callbackID, final NativeArray arguments);
|
||||
@Override @DoNotStrip
|
||||
void invokeCallback(
|
||||
ExecutorToken executorToken,
|
||||
int callbackID,
|
||||
NativeArray arguments);
|
||||
@DoNotStrip
|
||||
void callFunction(
|
||||
ExecutorToken executorToken,
|
||||
|
||||
Reference in New Issue
Block a user