kill bridge only after cleaning up NativeModules
Reviewed By: javache Differential Revision: D4734634 fbshipit-source-id: c2d425485679454397d18b1a0c389714c0e3c484
This commit is contained in:
parent
cbd46aaa7c
commit
5328d952a8
|
@ -292,11 +292,11 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
|||
|
||||
// TODO: tell all APIs to shut down
|
||||
mDestroyed = true;
|
||||
mHybridData.resetNative();
|
||||
mReactQueueConfiguration.getNativeModulesQueueThread().runOnQueue(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mJavaRegistry.notifyJSInstanceDestroy();
|
||||
mHybridData.resetNative();
|
||||
}
|
||||
});
|
||||
boolean wasIdle = (mPendingJSCalls.getAndSet(0) == 0);
|
||||
|
|
|
@ -171,7 +171,12 @@ public class EventDispatcher implements LifecycleEventListener {
|
|||
}
|
||||
|
||||
public void onCatalystInstanceDestroyed() {
|
||||
stopFrameCallback();
|
||||
UiThreadUtil.runOnUiThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
stopFrameCallback();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void stopFrameCallback() {
|
||||
|
|
Loading…
Reference in New Issue