mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-03 17:45:12 +08:00
Add getName() method
Summary: adds a `getName()` method to all `JavaScriptExecutor` classes that can be used by `ReactInstanceManager` to identify the bridge type when logging markers. Reviewed By: fromcelticpark Differential Revision: D7790531 fbshipit-source-id: efe485588738a38936accc4a7956840784b2dd08
This commit is contained in:
committed by
Facebook Github Bot
parent
837d496ac8
commit
8e3105dbce
@@ -20,5 +20,11 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||
super(initHybrid(jscConfig));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "JSCJavaScriptExecutor";
|
||||
}
|
||||
|
||||
|
||||
private native static HybridData initHybrid(ReadableNativeMap jscConfig);
|
||||
}
|
||||
|
||||
@@ -26,4 +26,9 @@ public abstract class JavaScriptExecutor {
|
||||
public void close() {
|
||||
mHybridData.resetNative();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the executor, identifying the underlying runtime.
|
||||
*/
|
||||
abstract public String getName();
|
||||
}
|
||||
|
||||
@@ -59,5 +59,10 @@ public class ProxyJavaScriptExecutor extends JavaScriptExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "ProxyJavaScriptExecutor";
|
||||
}
|
||||
|
||||
private native static HybridData initHybrid(JavaJSExecutor executor);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user