Skip to content

Commit

Permalink
Revert D15242046: [RN] Fabric: Removing references to MessageQueueThr…
Browse files Browse the repository at this point in the history
…ead in RCTSurfacePresenter

Differential Revision:
D15242046

Original commit changeset: 88a3e3c629d7

fbshipit-source-id: b1820e506a7701bbcc24a9310848d4bcb6658d1c
  • Loading branch information
shergin authored and facebook-github-bot committed May 12, 2019
1 parent bd95970 commit ddce743
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions React/Fabric/RCTSurfacePresenter.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import <objc/runtime.h>
#import <mutex>
#import <jsi/jsi.h>
#import <cxxreact/MessageQueueThread.h>

#import <React/RCTAssert.h>
#import <React/RCTBridge+Private.h>
Expand Down Expand Up @@ -40,6 +41,7 @@
using namespace facebook::react;

@interface RCTBridge ()
- (std::shared_ptr<facebook::react::MessageQueueThread>)jsMessageThread;
- (void)invokeAsync:(std::function<void()> &&)func;
@end

Expand Down Expand Up @@ -222,6 +224,12 @@ - (RCTScheduler *)_scheduler

_contextContainer->registerInstance(_reactNativeConfig, "ReactNativeConfig");

auto messageQueueThread = _batchedBridge.jsMessageThread;
if (messageQueueThread) {
// Make sure initializeBridge completed
messageQueueThread->runOnQueueSync([] {});
}

auto runtime = (facebook::jsi::Runtime *)((RCTCxxBridge *)_batchedBridge).runtime;

RuntimeExecutor runtimeExecutor = [self, runtime](std::function<void(facebook::jsi::Runtime & runtime)> &&callback) {
Expand Down

0 comments on commit ddce743

Please sign in to comment.