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:
parent
837d496ac8
commit
8e3105dbce
|
@ -20,5 +20,11 @@ import com.facebook.proguard.annotations.DoNotStrip;
|
||||||
super(initHybrid(jscConfig));
|
super(initHybrid(jscConfig));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName() {
|
||||||
|
return "JSCJavaScriptExecutor";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private native static HybridData initHybrid(ReadableNativeMap jscConfig);
|
private native static HybridData initHybrid(ReadableNativeMap jscConfig);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,4 +26,9 @@ public abstract class JavaScriptExecutor {
|
||||||
public void close() {
|
public void close() {
|
||||||
mHybridData.resetNative();
|
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);
|
private native static HybridData initHybrid(JavaJSExecutor executor);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue