mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-09 17:13:46 +08:00
Revert D2926896 WebWorkers: Move web worker impl to JSCExecutor
Reviewed By: lexs Differential Revision: D2982150 fb-gh-sync-id: c75d05988df50b9788608e7c1bf00c4952ccfce1 shipit-source-id: c75d05988df50b9788608e7c1bf00c4952ccfce1
This commit is contained in:
committed by
Facebook Github Bot 0
parent
50141f9d3f
commit
c32e5fd84f
@@ -226,18 +226,24 @@ public class CatalystInstanceImpl implements CatalystInstance {
|
||||
listener.onTransitionToBridgeIdle();
|
||||
}
|
||||
}
|
||||
|
||||
Systrace.unregisterListener(mTraceListener);
|
||||
|
||||
// We can access the Bridge from any thread now because we know either we are on the JS thread
|
||||
// or the JS thread has finished via ReactQueueConfiguration#destroy()
|
||||
mBridge.dispose();
|
||||
}
|
||||
|
||||
private void synchronouslyDisposeBridgeOnJSThread() {
|
||||
final SimpleSettableFuture<Void> bridgeDisposeFuture = new SimpleSettableFuture<>();
|
||||
mReactQueueConfiguration.getJSQueueThread().runOnQueue(
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mBridge.dispose();
|
||||
bridgeDisposeFuture.set(null);
|
||||
}
|
||||
});
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
mBridge.dispose();
|
||||
bridgeDisposeFuture.set(null);
|
||||
}
|
||||
});
|
||||
bridgeDisposeFuture.getOrThrow();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user