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 pull[bot] committed Sep 7, 2024
1 parent 188fa88 commit 8341174
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
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 8341174

Please sign in to comment.