mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-08 22:42:40 +08:00
Dispatch JS calls to JS thread from c++ bridge
Summary: Instead of dispatching calls to the JS thread in Java, do it in the C++ bridge. This moves us closer to the cxx bridge and will allow us to dispatch to the correct web worker in C++ instead of in Java Reviewed By: mhorowitz Differential Revision: D2954115 fb-gh-sync-id: 7e7d4eff2c72601b8b4416f1ccd8d2985aebd755 shipit-source-id: 7e7d4eff2c72601b8b4416f1ccd8d2985aebd755
This commit is contained in:
committed by
facebook-github-bot-5
parent
9e18b21904
commit
7176c5291e
@@ -70,14 +70,17 @@ public abstract class ReactIntegrationTestCase extends AndroidTestCase {
|
||||
mReactContext = null;
|
||||
mInstance = null;
|
||||
|
||||
final SimpleSettableFuture<Void> semaphore = new SimpleSettableFuture<>();
|
||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (contextToDestroy != null) {
|
||||
contextToDestroy.destroy();
|
||||
}
|
||||
semaphore.set(null);
|
||||
}
|
||||
});
|
||||
semaphore.getOrThrow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user