[ReactNative] Preload ModuleData queue
Summary: The module's methodQueue wasn't being created when accessing the modules directly on the bridge, without going through JS. Preload the queue for now to fix internal breakages, but I'll figure out a better way to keep it lazy afterwards.
This commit is contained in:
parent
2d66e10ec4
commit
331e4a96e9
|
@ -305,6 +305,10 @@ id<RCTJavaScriptExecutor> RCTGetLatestExecutor(void)
|
|||
for (RCTModuleData *moduleData in _moduleDataByID) {
|
||||
config[moduleData.name] = moduleData.config;
|
||||
|
||||
|
||||
// HACK(tadeu): Ensure the queue has been loaded, make it lazy later inside RCTModuleMap
|
||||
(void)[moduleData queue];
|
||||
|
||||
if ([moduleData.instance conformsToProtocol:@protocol(RCTFrameUpdateObserver)]) {
|
||||
[_frameUpdateObservers addObject:moduleData];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue