mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 22:42:13 +08:00
[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:
@@ -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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user