Skip to content

Commit

Permalink
Revert D57329165: Shortcut emitDeviceEvent in bridgeless
Browse files Browse the repository at this point in the history
Differential Revision:
D57329165

Original commit changeset: 6506a7afb522

Original Phabricator Diff: D57329165

fbshipit-source-id: 98fb81b7c16a2330f1bd58ad6bbfee6f04934b57
  • Loading branch information
javache authored and facebook-github-bot committed May 15, 2024
1 parent 86dffb3 commit ad4c39e
Showing 1 changed file with 0 additions and 9 deletions.
Expand Up @@ -134,8 +134,6 @@ public <T extends JavaScriptModule> T getJSModule(Class<T> jsInterface) {
&& mInteropModuleRegistry.shouldReturnInteropModule(jsInterface)) {
return mInteropModuleRegistry.getInteropModule(jsInterface);
}

// TODO T189052462: ReactContext caches JavaScriptModule instances
JavaScriptModule interfaceProxy =
(JavaScriptModule)
Proxy.newProxyInstance(
Expand All @@ -145,13 +143,6 @@ public <T extends JavaScriptModule> T getJSModule(Class<T> jsInterface) {
return (T) interfaceProxy;
}

/** Shortcut RCTDeviceEventEmitter.emit since it's frequently used */
@Override
public void emitDeviceEvent(String eventName, @Nullable Object args) {
mReactHost.callFunctionOnModule(
"RCTDeviceEventEmitter", "emit", Arguments.fromJavaArgs(new Object[] {args}));
}

@Override
public <T extends NativeModule> boolean hasNativeModule(Class<T> nativeModuleInterface) {
return mReactHost.hasNativeModule(nativeModuleInterface);
Expand Down

0 comments on commit ad4c39e

Please sign in to comment.